ctrlX Data Layer API for Python  3.4.0
The ctrlX Data Layer API allows access to the ctrlX Data Layer with Python
Provider Class Reference

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)
 

Detailed Description

Definition at line 16 of file provider.py.

Member Function Documentation

◆ get_registered_node_paths()

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.

◆ get_registered_type()

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.

◆ get_rejected_node_paths()

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.

◆ get_token()

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

Returns
<Variant> current token

Definition at line 125 of file provider.py.

◆ is_connected()

bool is_connected (   self)

returns whether provider is connected

Returns
status of connection

Definition at line 118 of file provider.py.

◆ publish_event()

Result publish_event (   self,
Variant  data,
Variant  event_type 
)

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.

◆ register_node()

Result register_node (   self,
str  address,
ProviderNode  node 
)

Register a node to the datalayer.

Parameters
[in]addressAddress of the node to register (wildcards allowed)
[in]nodeNode to register
Returns
<Result>, status of function call

Definition at line 76 of file provider.py.

◆ register_type()

Result register_type (   self,
str  address,
str  pathname 
)

Register a type to the datalayer.

Parameters
[in]addressAddress of the node to register (no wildcards allowed)
[in]pathnamePath to flatbuffer bfbs
Returns
<Result>, status of function call

Definition at line 56 of file provider.py.

◆ register_type_variant()

Result register_type_variant (   self,
str  address,
Variant  data 
)

Register a type to the datalayer.

Parameters
[in]addressAddress of the node to register (no wildcards allowed)
[in]dataVariant with flatbuffer type
Returns
<Result>, status of function call

Definition at line 134 of file provider.py.

◆ set_timeout_node()

Result set_timeout_node (   self,
ProviderNode  node,
int  timeout_ms 
)

Set timeout for a node for asynchron requests (default value is 1000ms)

Parameters
[in]nodeNode to set timeout for
[in]timeoutMSTimeout in milliseconds for this node
Returns
<Result>, status of function call

Definition at line 95 of file provider.py.

◆ start()

Result start (   self)

Start the provider.

Returns
<Result>, status of function call

Definition at line 104 of file provider.py.

◆ stop()

Result stop (   self)

Stop the provider.

Returns
<Result>, status of function call

Definition at line 111 of file provider.py.

Referenced by System.close().

◆ unregister_node()

Result unregister_node (   self,
str  address 
)

Unregister a node from the datalayer.

Parameters
[in]addressAddress of the node to register (wildcards allowed)
Returns
<Result>, status of function call

Definition at line 85 of file provider.py.

◆ unregister_type()

Result unregister_type (   self,
str  address 
)

Unregister a type from the datalayer.

Parameters
[in]addressAddress of the node to register (wildcards allowed)
Returns
<Result>, status of function call

Definition at line 66 of file provider.py.