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 communicationnamespace (string) – Namespace on which to initialize the PluginClient
- IsAlive(timeoutMs: int = 1000)¶
Returns
True
if the Service Server is detected online beforetimeoutMs
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
- 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
- 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
- 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
- SetConfiguration(configuration, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission 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
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
- 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
- PauseAction(actioninstancehandle, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATE
permission 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
OPERATE
permission 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
OPERATE
permission 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_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 returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- 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 returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- 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 returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- 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
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_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
- 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 returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- 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
- 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