Plugin

class PluginClient
Canonical

kortex_api.autogen.client_stubs.PluginClientRpc

__init__(router, namespace)

Constructs a PluginClient with an initialized RouterClient and a namespace.

Parameters
  • router (RouterClient) – RouterClient used for the communication

  • namespace (string) – Namespace on which to initialize the PluginClient

IsAlive(timeoutMs: int = 1000)

Returns True if the Service Server is detected online before timeoutMs is expired, False otherwise.

Parameters

timeoutMs (unsigned int) – The maximum time to wait for an answer from the server

Return type

bool

GetStatus(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

Status

GetMetaData(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Get the plugin’s meta data
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

MetaData

GetConfiguration(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Get the plugin’s current configuration
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

Configuration

GetConfigurationSchema(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Get the plugin’s current configuration schema
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

ConfigurationSchema

SetConfiguration(configuration, deviceId=0, options=RouterClientSendOptions())
The CONFIGURE permission is necessary to call this RPC.

Set the plugin’s configuration
Parameters
ResetConfiguration(deviceId = 0, options = RouterClientSendOptions())
The CONFIGURE permission is necessary to call this RPC.

Set the plugin’s configuration to its default configuration
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

GetActionTypes(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Get Plugin’s available Action Types list
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

ActionDescriptionList

StartAction(action, deviceId=0, options=RouterClientSendOptions())
The OPERATE permission is necessary to call this RPC.

Start an Action
Parameters
  • action (Action) –

  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

ActionInstanceHandle

PauseAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())
The OPERATE permission is necessary to call this RPC.

Pause an ongoing Action
Parameters
ResumeAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())
The OPERATE permission is necessary to call this RPC.

Resume a paused Action
Parameters
StopAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())
The OPERATE permission is necessary to call this RPC.

Stop an ongoing Action
Parameters
OnNotificationStateTopic(callback, notificationoptions)
The READ_ONLY permission is necessary to call this RPC.

Subscribes to State change topic for the Plugin
Parameters
  • callback (function) – Function callback taking a Kinova.Api.Plugin.StateNotification as only argument, and returning None.

  • notificationoptions (NotificationOptions) – Notification options

Return type

NotificationHandle

OnNotificationConfigurationChangeTopic(callback, notificationoptions)
The READ_ONLY permission is necessary to call this RPC.

Subscribes to Configuration change topic for the Plugin
Parameters
  • callback (function) – Function callback taking a Kinova.Api.Plugin.ConfigurationChangeNotification as only argument, and returning None.

  • notificationoptions (NotificationOptions) – Notification options

Return type

NotificationHandle

OnNotificationActionTopic(callback, notificationoptions)
The READ_ONLY permission is necessary to call this RPC.

Subscribes to Action notifications for the Plugin
Parameters
  • callback (function) – Function callback taking a Kinova.Api.Plugin.ActionNotification as only argument, and returning None.

  • notificationoptions (NotificationOptions) – Notification options

Return type

NotificationHandle

Unsubscribe(notificationhandle, deviceId=0, options=RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Unsubscribes client from receiving notifications for the specified topic
Parameters
GetVisualizers(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Getter for the visualizers the Plugin offers
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

VisualizerList

OnNotificationInfoChangeTopic(callback, notificationoptions)
The READ_ONLY permission is necessary to call this RPC.

Subscribes to Info change topic for the Plugin
Parameters
  • callback (function) – Function callback taking a Kinova.Api.Plugin.InfoChangeNotification as only argument, and returning None.

  • notificationoptions (NotificationOptions) – Notification options

Return type

NotificationHandle

GetFeedback(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Get the plugin’s current feedback
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

Feedback

GetFeedbackSchema(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Get the plugin’s current feedback schema
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

FeedbackSchema