def _set_value(self, val): if _val(val) in self.val_to_string.keys(): if self._is_pointer: self._value = _ptr(val, "UA_SecurityTokenRequestType") else: self._value[0] = _val(val) else: raise OverflowError(f"{val} is not a valid member of this class")
def _set_value(self, val): if _val(val) in self.val_to_string.keys(): if self._is_pointer: self._value = _ptr(val, "UA_AttributeId") else: self._value[0] = _val(val) else: raise OverflowError(f"{val} is not a valid member of this class")
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if isinstance(val, UaType): val = ffi.cast("UA_AttributeId*", val._ptr) if val is None: super().__init__(ffi.new("UA_AttributeId*"), is_pointer) else: super().__init__(ffi.cast("UA_AttributeId", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_BrowseDirection*", val._ptr) if val is None: super().__init__(ffi.new("UA_BrowseDirection*"), is_pointer) else: super().__init__(ffi.cast("UA_BrowseDirection", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_SecurityTokenRequestType*", val._ptr) if val is None: super().__init__(ffi.new("UA_SecurityTokenRequestType*"), is_pointer) else: super().__init__(ffi.cast("UA_SecurityTokenRequestType", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_TimestampsToReturn*", val._ptr) if val is None: super().__init__(ffi.new("UA_TimestampsToReturn*"), is_pointer) else: super().__init__(ffi.cast("UA_TimestampsToReturn", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_NodeAttributesMask*", val._ptr) if val is None: super().__init__(ffi.new("UA_NodeAttributesMask*"), is_pointer) else: super().__init__(ffi.cast("UA_NodeAttributesMask", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_DataChangeTrigger*", val._ptr) if val is None: super().__init__(ffi.new("UA_DataChangeTrigger*"), is_pointer) else: super().__init__(ffi.cast("UA_DataChangeTrigger", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_RedundancySupport*", val._ptr) if val is None: super().__init__(ffi.new("UA_RedundancySupport*"), is_pointer) else: super().__init__(ffi.cast("UA_RedundancySupport", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_MonitoringMode*", val._ptr) if val is None: super().__init__(ffi.new("UA_MonitoringMode*"), is_pointer) else: super().__init__(ffi.cast("UA_MonitoringMode", _val(val)), is_pointer)
def __init__(self, val: int = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_LogLevel*", val._ptr) if val is None: super().__init__(ffi.new("UA_LogLevel*"), is_pointer) else: super().__init__(ffi.cast("UA_LogLevel", _val(val)), is_pointer)
def __init__(self, val: Union[int, Void] = None, is_pointer=False): if isinstance(val, UaType): val = ffi.cast("UA_SecureChannelState*", val._ptr) if val is None: super().__init__(ffi.new("UA_SecureChannelState*"), is_pointer) else: super().__init__(ffi.cast("UA_SecureChannelState", _val(val)), is_pointer)
def __init__(self, val=None, is_pointer=False): if val is None: super().__init__(ffi.new("UA_Double*"), is_pointer) else: if type(val) is list: super().__init__(ffi.new("UA_Double[]", val), True) elif is_pointer: super().__init__(val, is_pointer) else: super().__init__(ffi.new("UA_Double*", _val(val)), is_pointer)
def __init__(self, val=None, is_pointer=False): if type(val) is Void: val = ffi.cast("size_t*", val._ptr) if val is None: super().__init__(ffi.new("size_t*"), is_pointer) else: if is_pointer: super().__init__(val, is_pointer) else: super().__init__(ffi.new("size_t*", _val(val)), is_pointer)
def __init__(self, val=None, is_pointer=False): if isinstance(val, UaType): val = ffi.cast("UA_UInt32*", val._ptr) if val is None: super().__init__(ffi.new("UA_UInt32*"), is_pointer) else: if type(val) is list: super().__init__(ffi.new("UA_UInt32[]", val), True) elif is_pointer: super().__init__(val, is_pointer) else: super().__init__(ffi.new("UA_UInt32*", _val(val)), is_pointer)
def __init__(self, val: Union[Void, int, List[int]] = None, is_pointer=False): if isinstance(val, UaType): val = ffi.cast("UA_StatusCode*", val._ptr) if val is None: super().__init__(ffi.new("UA_StatusCode*"), is_pointer) else: if type(val) is list: super().__init__(ffi.new("UA_StatusCode[]", val), True) elif is_pointer: super().__init__(val, is_pointer) else: super().__init__(ffi.new("UA_StatusCode*", _val(val)), is_pointer)
def __init__(self, val: Union[Void, float, List[float]] = None, is_pointer=False): if type(val) is Void: val = ffi.cast("UA_Float*", val._ptr) if val is None: super().__init__(ffi.new("UA_Float*"), is_pointer) else: if type(val) is list: super().__init__(ffi.new("UA_Float[]", val), True) elif is_pointer: super().__init__(val, is_pointer) else: super().__init__(ffi.new("UA_Float*", _val(val)), is_pointer)
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_SecureChannelStatistics") else: self._value[0] = _val(val) if not _is_null(val): self._current_channel_count._value[0] = _val( val.currentChannelCount) self._cumulated_channel_count._value[0] = _val( val.cumulatedChannelCount) self._rejected_channel_count._value[0] = _val( val.rejectedChannelCount) self._channel_timeout_count._value[0] = _val( val.channelTimeoutCount) self._channel_abort_count._value[0] = _val(val.channelAbortCount) self._channel_purge_count._value[0] = _val(val.channelPurgeCount)
def __init__(self, val: Union[Void, float, List[float]] = None, size: int = None, is_pointer=False): if type(val) is Void: if size is None: val = ffi.cast("UA_Double*", val._ptr) else: val = ffi.cast(f"UA_Double[{size}]", val._ptr) is_pointer = True if val is None: super().__init__(ffi.new("UA_Double*"), is_pointer) else: if type(val) is list: super().__init__(ffi.new("UA_Double[]", val), True) elif is_pointer: super().__init__(val, is_pointer) else: super().__init__(ffi.new("UA_Double*", _val(val)), is_pointer) self._size = size
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_NetworkStatistics") else: self._value[0] = _val(val) if not _is_null(val): self._current_connection_count._value[0] = _val( val.currentConnectionCount) self._cumulated_connection_count._value[0] = _val( val.cumulatedConnectionCount) self._rejected_connection_count._value[0] = _val( val.rejectedConnectionCount) self._connection_timeout_count._value[0] = _val( val.connectionTimeoutCount) self._connection_abort_count._value[0] = _val( val.connectionAbortCount)
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_ClientConfig") else: self._value[0] = _val(val) if not _is_null(val): self._client_context = val.clientContext self._logger._value[0] = _val(val.logger) self._timeout._value[0] = _val(val.timeout) self._client_description._value[0] = _val(val.clientDescription) self._user_identity_token._value[0] = _val(val.userIdentityToken) self._security_mode._value[0] = _val(val.securityMode) self._security_policy_uri._value[0] = _val(val.securityPolicyUri) self._endpoint._value[0] = _val(val.endpoint) self._user_token_policy._value[0] = _val(val.userTokenPolicy) self._secure_channel_life_time._value[0] = _val( val.secureChannelLifeTime) self._requested_session_timeout._value[0] = _val( val.requestedSessionTimeout) self._connectivity_check_interval._value[0] = _val( val.connectivityCheckInterval) self._custom_data_types = val.customDataTypes
def __init__(self, val: int = None, is_pointer=False): if val is None: super().__init__(ffi.new("UA_AttributeId*"), is_pointer) else: super().__init__(ffi.cast("UA_AttributeId", _val(val)), is_pointer)
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_SByte") else: self._value[0] = ffi.cast("UA_SByte", _val(val))
def __init__(self, val=None, is_pointer=False): if val is None: super().__init__(ffi.new("UA_Node *"), is_pointer) else: super().__init__(ffi.new("UA_Node *"), _val(val), is_pointer)
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_ServerConfig") else: self._value[0] = _val(val) if not _is_null(val): self._logger._value[0] = _val(val.logger) self._build_info._value[0] = _val(val.build_info) self._app_description._value[0] = _val(val.app_description) self._server_cert._value[0] = _val(val.server_cert) self._shutdown_delay._value[0] = _val(val.shutdown_delay) self._verify_req_timestamp._value[0] = _val( val.verify_req_timestamp) self._allow_empty_vars._value[0] = _val(val.allow_empty_vars) self._custom_data_types._value = _val(val.custom_data_types) self._network_layer_size._value[0] = _val(val.network_layer_size) self._network_layers._value._value[0] = _val(val.network_layers) self._custom_hostname._value[0] = _val(val.custom_hostname) self._security_policies_size._value[0] = _val( val.security_policies_size) self._security_policy._value = _val(val.security_policy) self._endpoints_size._value[0] = _val(val.endpoints_size) self._endpoints._value = _val(val.endpoints) self._security_policy_none_discovery_only._value[0] = _val( val.security_policy_none_iscovery_only) self._node_lifecycle._value[0] = _val(val.node_lifecycle) self._access_control._value[0] = _val(val.access_control) self._nodestore._value[0] = _val(val.nodestore) self._certificate_verification._value[0] = _val( val.certificate_verification) self._max_security_channels._value[0] = _val( val.max_security_channels) self._max_security_token_lifetime._value[0] = _val( val.max_security_token_lifetime) self._max_nodes_per_read._value[0] = _val(val.max_nodes_per_read) self._max_nodes_per_write._value[0] = _val(val.max_nodes_per_write) self._max_nodes_per_method_call._value[0] = _val( val.max_nodes_per_method_call) self._max_nodes_per_browse._value[0] = _val( val.max_nodes_per_browse) self._max_nodes_per_register_nodes._value[0] = _val( val.max_nodes_per_register_nodes) self._max_nodes_per_translate_browse_paths_to_node_ids._value[ 0] = _val(val.max_nodes_per_translate_browse_paths_to_node_ids) self._max_nodes_per_node_management._value[0] = _val( val.max_nodes_per_node_management) self._max_monitored_items_per_call._value[0] = _val( val.max_monitored_items_per_call) self._max_references_per_node._value[0] = _val( val.max_references_per_node) self._max_monitored_items._value[0] = _val(val.max_monitored_items) self._max_monitored_items_per_subscription._value[0] = _val( val.max_monitored_items_per_subscription) self._sampling_interval_limits._value[0] = _val( val.sampling_interval_limits) self._queue_size_limits._value[0] = _val(val.queue_size_limits) self._max_publish_req_per_session._value[0] = _val( val.max_publish_req_per_session) self._max_monitored_item_register_callback._value = _val( val.max_monitored_item_register_callback)
def _set_value(self, val): self._value = ffi.cast("void*", _val(val))
def __init__(self, val: int = None, is_pointer=False): if val is None: super().__init__(ffi.new("UA_SessionState*"), is_pointer) else: super().__init__(ffi.cast("UA_SessionState", _val(val)), is_pointer)
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_Logger") else: self._value[0] = _val(val)
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "size_t") else: self._value[0] = ffi.cast("size_t", _val(val))
def __init__(self, val: int = None, is_pointer=False): if val is None: super().__init__(ffi.new("UA_RuleHandling*"), is_pointer) else: super().__init__(ffi.cast("UA_RuleHandling", _val(val)), is_pointer)