![]() |
ctrlX Data Layer API for Python
3.4.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) |
def | get_registered_node_paths (self) |
def | get_registered_type (self, str address) |
def | get_rejected_node_paths (self) |
Variant | get_token (self) |
bool | is_connected (self) |
Result | publish_event (self, Variant data, Variant event_type) |
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 16 of file provider.py.
def get_registered_node_paths | ( | self | ) |
get_registered_node_paths
return status of the function call and the current registered node paths
Definition at line 155 of file provider.py.
def get_registered_type | ( | self, | |
str | address | ||
) |
get_registered_type
Get the variant of a registered type @param[in] address Address of the type to get type (no wildcards allowed) result status of function call and Variant to stored type
Definition at line 144 of file provider.py.
def get_rejected_node_paths | ( | self | ) |
get_rejected_node_paths
return status of the function call and the current rejected node paths
Definition at line 166 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 125 of file provider.py.
bool is_connected | ( | self | ) |
returns whether provider is connected
Definition at line 118 of file provider.py.
publish_event
Publishes an event @param[in] data The payload data of the event. Has to match the type, that is given in the notifyInfo. @param[in] notifyInfo Contains additional info about the event with type event_info.fbs @returns <Result>, status of function call
Definition at line 180 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 76 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 56 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 134 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 95 of file provider.py.
Result start | ( | self | ) |
Start the provider.
Definition at line 104 of file provider.py.
Result stop | ( | self | ) |
Stop the provider.
Definition at line 111 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 85 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 66 of file provider.py.