5 import ctrlxdatalayer.clib_system
12 Datalayer System Instance
14 Hint: see python context manager for instance handling
16 __slots__ = [
'__system',
'__closed']
20 Creates a datalayer system
21 @param[in] ipc_path Path for interprocess communication - use null pointer for automatic detection
23 b_ipc_path = ipc_path.encode(
'utf-8')
24 self.
__system__system = ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemCreate(
30 use the python context manager
34 def __exit__(self, exc_type, exc_val, exc_tb):
36 use the python context manager
42 closes the system instance
48 ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemDelete(self.
__system__system)
52 handle value of system
56 def start(self, bo_start_broker: bool):
58 Starts a datalayer system
59 @param[in] bo_start_broker Use true to start a broker. If you are a user of the datalayer - call with false!
61 ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemStart(
62 self.
__system__system, bo_start_broker)
64 def stop(self, bo_force_provider_stop: bool) -> bool:
66 Stops a datalayer system
67 @param[in] bo_force_provider_stop Force stop off all created providers for this datalayer system
68 @returns <bool> false if there is a client or provider active
70 return ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemStop(
71 self.
__system__system, bo_force_provider_stop)
75 Returns the factory to create clients and provider for the datalayer
78 c_factory = ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemFactory(
84 Returns converter between JSON and Variant
87 c_converter = ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemJsonConverter(
93 Sets the base path to bfbs files
94 @param[in] path Base path to bfbs files
96 b_path = path.encode(
'utf-8')
97 ctrlxdatalayer.clib.libcomm_datalayer.DLR_systemSetBfbsPath(
Datalayer System Instance.
def set_bfbs_path(self, path)
Sets the base path to bfbs files.
def __exit__(self, exc_type, exc_val, exc_tb)
use the python context manager
Factory factory(self)
Returns the factory to create clients and provider for the datalayer.
def __enter__(self)
use the python context manager
def start(self, bool bo_start_broker)
Starts a datalayer system.
def close(self)
closes the system instance
def get_handle(self)
handle value of system
bool stop(self, bool bo_force_provider_stop)
Stops a datalayer system.
Converter json_converter(self)
Returns converter between JSON and Variant.
def __init__(self, str ipc_path)
Creates a datalayer system.