![]() |
ctrlX Data Layer API for Python
3.3.0
The ctrlX Data Layer API allows access to the ctrlX Data Layer with Python
|
Public Member Functions | |
def | __init__ (self, C_DLR_PROVIDER c_provider) |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_val, exc_tb) |
def | close (self) |
Variant | get_token (self) |
bool | is_connected (self) |
Result | register_node (self, str address, ProviderNode node) |
Result | register_type (self, str address, str pathname) |
Result | register_type_variant (self, str address, Variant data) |
Result | set_timeout_node (self, ProviderNode node, int timeout_ms) |
Result | start (self) |
Result | stop (self) |
Result | unregister_node (self, str address) |
Result | unregister_type (self, str address) |
Definition at line 14 of file provider.py.
Variant get_token | ( | self | ) |
return the current token of the current request.You can call this function during your onRead, onWrite, ...
methods of your ProviderNodes. If there is no current request the method return an empty token
Definition at line 123 of file provider.py.
bool is_connected | ( | self | ) |
returns whether provider is connected
Definition at line 116 of file provider.py.
Result register_node | ( | self, | |
str | address, | ||
ProviderNode | node | ||
) |
Register a node to the datalayer.
[in] | address | Address of the node to register (wildcards allowed) |
[in] | node | Node to register |
Definition at line 74 of file provider.py.
Result register_type | ( | self, | |
str | address, | ||
str | pathname | ||
) |
Register a type to the datalayer.
[in] | address | Address of the node to register (no wildcards allowed) |
[in] | pathname | Path to flatbuffer bfbs |
Definition at line 54 of file provider.py.
Register a type to the datalayer.
[in] | address | Address of the node to register (no wildcards allowed) |
[in] | data | Variant with flatbuffer type |
Definition at line 132 of file provider.py.
Result set_timeout_node | ( | self, | |
ProviderNode | node, | ||
int | timeout_ms | ||
) |
Set timeout for a node for asynchron requests (default value is 1000ms)
[in] | node | Node to set timeout for |
[in] | timeoutMS | Timeout in milliseconds for this node |
Definition at line 93 of file provider.py.
Result start | ( | self | ) |
Start the provider.
Definition at line 102 of file provider.py.
Result stop | ( | self | ) |
Stop the provider.
Definition at line 109 of file provider.py.
Referenced by System.close().
Result unregister_node | ( | self, | |
str | address | ||
) |
Unregister a node from the datalayer.
[in] | address | Address of the node to register (wildcards allowed) |
Definition at line 83 of file provider.py.
Result unregister_type | ( | self, | |
str | address | ||
) |
Unregister a type from the datalayer.
[in] | address | Address of the node to register (wildcards allowed) |
Definition at line 64 of file provider.py.