def __init__(self, data=None, val=None, is_pointer=True): if data is not None: val = ffi.new_handle(data) elif val is None: val = ffi.NULL super().__init__(ffi.cast("void*", _ptr(val)), is_pointer)
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 _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 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 _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 _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 _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): if self._is_pointer: self._value = _ptr(val, "UA_SByte") else: self._value[0] = ffi.cast("UA_SByte", _val(val))
def _set_value(self, val): if self._is_pointer: self._value = _ptr(val, "UA_Logger") else: self._value[0] = _val(val)