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)
예제 #3
0
    def __init__(self, val: Union[str, Void] = None, is_pointer=False):
        if isinstance(val, UaType):
            val = ffi.cast("UA_String*", val._ptr)
        elif type(val) is str:
            val = ffi.new("UA_String*", lib.UA_String_fromChars(bytes(val, 'utf-8')))
        elif type(val) is bytes:
            val = ffi.new("UA_String*", lib.UA_String_fromChars(val))
        elif type(val) is not None:
            if not is_pointer:
                val = ffi.new("UA_String*", val)
        else:
            val = ffi.new("UA_String*")

        super().__init__(val=val, is_pointer=is_pointer)

        if not self._null:
            self._length = SizeT(val=val.length, is_pointer=False)
            self._data = UaByte(val=val.data, is_pointer=True)
            if _is_null(self._data):
                self._null = True
예제 #4
0
    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, "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)