Plugin¶
- class PluginClient¶
- Canonical
kortex_api.autogen.client_stubs.PluginClientRpc
- __init__(router, namespace)¶
Constructs a PluginClient with an initialized
RouterClientand a namespace.- Parameters
router (RouterClient) –
RouterClientused for the communicationnamespace (string) – Namespace on which to initialize the PluginClient
- IsAlive(timeoutMs: int = 1000)¶
Returns
Trueif the Service Server is detected online beforetimeoutMsis expired,Falseotherwise.- 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_ONLYpermission 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
- GetMetaData(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLYpermission 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
- GetConfiguration(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLYpermission 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
- GetConfigurationSchema(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLYpermission 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
- SetConfiguration(configuration, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGUREpermission is necessary to call this RPC.Set the plugin’s configuration- Parameters
configuration (Configuration) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- ResetConfiguration(deviceId = 0, options = RouterClientSendOptions())¶
- The
CONFIGUREpermission 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_ONLYpermission 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
- StartAction(action, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATEpermission 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
- PauseAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATEpermission is necessary to call this RPC.Pause an ongoing Action- Parameters
actioninstancehandle (ActionInstanceHandle) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- ResumeAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATEpermission is necessary to call this RPC.Resume a paused Action- Parameters
actioninstancehandle (ActionInstanceHandle) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- StopAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATEpermission is necessary to call this RPC.Stop an ongoing Action- Parameters
actioninstancehandle (ActionInstanceHandle) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- OnNotificationStateTopic(callback, notificationoptions)¶
- The
READ_ONLYpermission is necessary to call this RPC.Subscribes to State change topic for the Plugin- Parameters
callback (function) – Function callback taking a
Kinova.Api.Plugin.StateNotificationas only argument, and returningNone.notificationoptions (NotificationOptions) – Notification options
- Return type
- OnNotificationConfigurationChangeTopic(callback, notificationoptions)¶
- The
READ_ONLYpermission is necessary to call this RPC.Subscribes to Configuration change topic for the Plugin- Parameters
callback (function) – Function callback taking a
Kinova.Api.Plugin.ConfigurationChangeNotificationas only argument, and returningNone.notificationoptions (NotificationOptions) – Notification options
- Return type
- OnNotificationActionTopic(callback, notificationoptions)¶
- The
READ_ONLYpermission is necessary to call this RPC.Subscribes to Action notifications for the Plugin- Parameters
callback (function) – Function callback taking a
Kinova.Api.Plugin.ActionNotificationas only argument, and returningNone.notificationoptions (NotificationOptions) – Notification options
- Return type
- Unsubscribe(notificationhandle, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLYpermission is necessary to call this RPC.Unsubscribes client from receiving notifications for the specified topic- Parameters
notificationhandle (NotificationHandle) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetVisualizers(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLYpermission 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
- OnNotificationInfoChangeTopic(callback, notificationoptions)¶
- The
READ_ONLYpermission is necessary to call this RPC.Subscribes to Info change topic for the Plugin- Parameters
callback (function) – Function callback taking a
Kinova.Api.Plugin.InfoChangeNotificationas only argument, and returningNone.notificationoptions (NotificationOptions) – Notification options
- Return type
- GetFeedback(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLYpermission 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
- GetFeedbackSchema(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLYpermission 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