![]() |
ctrlX Data Layer API for Python
1.6.0
The ctrlX Data Layer API allows access to the ctrlX Data Layer with Python
|
Public Member Functions | |
def | __init__ (self, datalayer.client.Client client) |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_val, exc_tb) |
def | close (self) |
str | id (self) |
def | on_close (self) |
Result | subscribe (self, str address, datalayer.client.ResponseCallback cb, userData_c_void_p userdata=None) |
Result | subscribe_multi (self, typing.List[str] address, datalayer.client.ResponseCallback cb, userData_c_void_p userdata=None) |
Result | unsubscribe (self, str address, datalayer.client.ResponseCallback cb, userData_c_void_p userdata=None) |
Result | unsubscribe_all (self, datalayer.client.ResponseCallback cb, userData_c_void_p userdata=None) |
Result | unsubscribe_multi (self, typing.List[str] address, datalayer.client.ResponseCallback cb, userData_c_void_p userdata=None) |
bool | wait_on_response_cb (self, int wait=5) |
Definition at line 21 of file subscription_async.py.
def __init__ | ( | self, | |
datalayer.client.Client | client | ||
) |
[in] | client | Reference to the client |
Definition at line 28 of file subscription_async.py.
References SubscriptionAsync.__client, Provider.__closed, SubscriptionAsync.__closed, Client.__closed, ProviderNode.__closed, SubscriptionAsync.__id, SubscriptionAsync.__on_cb, SubscriptionAsync.__ptr_notify, and SubscriptionAsync.__ptr_resp.
Result subscribe | ( | self, | |
str | address, | ||
datalayer.client.ResponseCallback | cb, | ||
userData_c_void_p | userdata = None |
||
) |
Setup a subscription to a node.
[in] | address | Address of the node to add a subscription to |
[in] | callback | Callback to called when data is subscribed |
[in] | userdata | User data - will be returned in callback as userdata. You can use this userdata to identify your request |
Definition at line 178 of file subscription_async.py.
References SubscriptionAsync.__client, SubscriptionAsync.__create_response_callback(), and Subscription.id().
Result subscribe_multi | ( | self, | |
typing.List[str] | address, | ||
datalayer.client.ResponseCallback | cb, | ||
userData_c_void_p | userdata = None |
||
) |
Setup a subscription to multiple nodes.
[in] | address | Set of addresses of nodes, that should be removed to the given subscription. |
[in] | count | Count of addresses. |
[in] | callback | Callback to called when data is subscribed |
[in] | userdata | User data - will be returned in callback as userdata. You can use this userdata to identify your request |
Definition at line 213 of file subscription_async.py.
References SubscriptionAsync.__client, SubscriptionAsync.__create_response_callback(), and Subscription.id().
Result unsubscribe | ( | self, | |
str | address, | ||
datalayer.client.ResponseCallback | cb, | ||
userData_c_void_p | userdata = None |
||
) |
Removes a node from a subscription id.
[in] | address | Address of a node, that should be removed to the given subscription. |
[in] | callback | Callback to called when data is subscribed |
[in] | userdata | User data - will be returned in callback as userdata. You can use this userdata to identify your request |
Definition at line 195 of file subscription_async.py.
References SubscriptionAsync.__client, SubscriptionAsync.__create_response_callback(), and Subscription.id().
Result unsubscribe_all | ( | self, | |
datalayer.client.ResponseCallback | cb, | ||
userData_c_void_p | userdata = None |
||
) |
Removes all subscriptions from a subscription id.
[in] | callback | Callback to called when data is subscribed |
[in] | userdata | User data - will be returned in callback as userdata. You can use this userdata to identify your request |
Definition at line 250 of file subscription_async.py.
References SubscriptionAsync.__client, SubscriptionAsync.__create_response_callback(), and Subscription.id().
Referenced by SubscriptionSync.close().
Result unsubscribe_multi | ( | self, | |
typing.List[str] | address, | ||
datalayer.client.ResponseCallback | cb, | ||
userData_c_void_p | userdata = None |
||
) |
Removes a set of nodes from a subscription id.
[in] | address | Address of a node, that should be removed to the given subscription. |
[in] | callback | Callback to called when data is subscribed |
[in] | userdata | User data - will be returned in callback as userdata. You can use this userdata to identify your request |
Definition at line 232 of file subscription_async.py.
References SubscriptionAsync.__client, SubscriptionAsync.__create_response_callback(), and Subscription.id().