EventBroker¶
- class EventBrokerClient¶
- Canonical
kortex_api.autogen.client_stubs.EventBrokerClientRpc
- __init__(router, namespace=None)¶
Constructs a EventBrokerClient with an initialized
RouterClient
and an optional namespace.- Parameters
router (RouterClient) –
RouterClient
used for the communicationnamespace (string) – Optional namespace on which to initialize the EventBrokerClient (defaults to
None
)
- 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
- LogEvent(event, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATE
permission is necessary to call this RPC.Log an event- Parameters
event (Event) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- LogEvents(eventlist, deviceId=0, options=RouterClientSendOptions())¶
- The
OPERATE
permission is necessary to call this RPC.Log a list of events- Parameters
eventlist (EventList) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetEvents(geteventsparameter, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Get the list of persisted events- Parameters
geteventsparameter (GetEventsParameter) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- ClearEvent(eventhandle, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Clear one persisted eventError thrown (ERROR_INTERNAL, METHOD_FAILED) if the input parameter EventHandle is not from an event that has been previously loggedor if it has already been cleared.- Parameters
eventhandle (EventHandle) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- ClearAllEvents(deviceId = 0, options = RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Clear all persisted events- Parameters
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- OnNotificationEventTopic(callback, notificationoptions)¶
- The
READ_ONLY
permission is necessary to call this RPC.Subscribes to new events notifications- Parameters
callback (function) – Function callback taking a
Kinova.Api.EventBroker.EventNotification
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