S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_address_space.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef SOPC_ADDRESS_SPACE_H_
21#define SOPC_ADDRESS_SPACE_H_
22
23#include <stdint.h>
24
25#include "sopc_types.h"
26
37#define FOR_EACH_ELEMENT_TYPE(x, extra) \
38 x(DataType, data_type, extra) x(Method, method, extra) x(Object, object, extra) x(ObjectType, object_type, extra) \
39 x(ReferenceType, reference_type, extra) x(Variable, variable, extra) x(VariableType, variable_type, extra) \
40 x(View, view, extra)
41
47
66
67/* Address space structure */
68typedef struct _SOPC_AddressSpace SOPC_AddressSpace;
69
81
91
115 uint32_t nb_variables,
116 SOPC_Variant* variables);
117
126
137
146
148
157typedef void SOPC_AddressSpace_ForEach_Fct(const uintptr_t key, const uintptr_t value, uintptr_t user_data);
158
160
161/* Common attributes */
164 SOPC_AttributeId attribute);
174/* Variable and VariableType common attributes */
176
184/* Types common attribute */
186
189
192
193/* Address space node structure */
196 OpcUa_NodeClass element_type);
198
199#endif /* SOPC_ADDRESS_SPACE_H_ */
SOPC_Boolean * SOPC_AddressSpace_Get_IsAbstract(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
OpcUa_NodeClass * SOPC_AddressSpace_Get_NodeClass(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
void SOPC_AddressSpace_Delete(SOPC_AddressSpace *space)
Deletes the AddressSpace content. It clears the Variable / VariableType nodes values and clear/free e...
SOPC_Variant * SOPC_AddressSpace_Get_Value(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
bool SOPC_AddressSpace_AreNodesReleasable(const SOPC_AddressSpace *space)
Returns true if the AddressSpace will release nodes on SOPC_AddressSpace_Delete. It means it has been...
void SOPC_AddressSpace_Node_Initialize(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node, OpcUa_NodeClass element_type)
void SOPC_AddressSpace_ForEach_Fct(const uintptr_t key, const uintptr_t value, uintptr_t user_data)
Type of callback functions for SOPC_AddressSpace_ForEach. Both the key and value belong to the addres...
Definition sopc_address_space.h:157
SOPC_StatusCode SOPC_AddressSpace_Get_StatusCode(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_ExtensionObject * SOPC_AddressSpace_Get_DataTypeDefinition(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
int32_t * SOPC_AddressSpace_Get_NoOfReferences(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
bool SOPC_AddressSpace_Has_Attribute(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node, SOPC_AttributeId attribute)
bool SOPC_AddressSpace_Set_StatusCode(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node, SOPC_StatusCode status)
int32_t * SOPC_AddressSpace_Get_ValueRank(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_NodeId * SOPC_AddressSpace_Get_DataType(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
bool SOPC_AddressSpace_AreReadOnlyNodes(const SOPC_AddressSpace *space)
Returns true if the AddressSpace has been created using SOPC_AddressSpace_CreateReadOnlyNodes.
void SOPC_AddressSpace_ForEach(SOPC_AddressSpace *space, SOPC_AddressSpace_ForEach_Fct *pFunc, uintptr_t user_data)
void SOPC_AddressSpace_Node_Clear(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
int32_t SOPC_AddressSpace_Get_NoOfArrayDimensions(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_LocalizedText * SOPC_AddressSpace_Get_DisplayName(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
bool SOPC_AddressSpace_Set_SourceTs(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node, SOPC_Value_Timestamp ts)
SOPC_AddressSpace * SOPC_AddressSpace_Create(bool free_nodes)
Create an empty AddressSpace to fill with nodes with SOPC_AddressSpace_Append.
SOPC_AddressSpace_Node * SOPC_AddressSpace_Get_Node(SOPC_AddressSpace *space, const SOPC_NodeId *key, bool *found)
SOPC_NodeId * SOPC_AddressSpace_Get_NodeId(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
struct _SOPC_AddressSpace SOPC_AddressSpace
Definition sopc_address_space.h:68
uint32_t * SOPC_AddressSpace_Get_WriteMask(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_Value_Timestamp SOPC_AddressSpace_Get_SourceTs(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_AddressSpace * SOPC_AddressSpace_CreateReadOnlyNodes(uint32_t nb_nodes, SOPC_AddressSpace_Node *nodes, uint32_t nb_variables, SOPC_Variant *variables)
Create an AddressSpace filled with given nodes and variants for variables values. The nodes are read ...
SOPC_Byte SOPC_AddressSpace_Get_AccessLevel(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_LocalizedText * SOPC_AddressSpace_Get_Description(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
uint32_t * SOPC_AddressSpace_Get_UserWriteMask(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
uint32_t * SOPC_AddressSpace_Get_ArrayDimensions(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_QualifiedName * SOPC_AddressSpace_Get_BrowseName(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_Boolean SOPC_AddressSpace_Get_Executable(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
OpcUa_ReferenceNode ** SOPC_AddressSpace_Get_References(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
SOPC_ReturnStatus SOPC_AddressSpace_Append(SOPC_AddressSpace *space, SOPC_AddressSpace_Node *node)
Appends a new node to the AddressSpace.
struct SOPC_Value_Timestamp SOPC_Value_Timestamp
uint8_t SOPC_Byte
Definition sopc_builtintypes.h:138
SOPC_Byte SOPC_Boolean
Definition sopc_builtintypes.h:140
int64_t SOPC_DateTime
OPC UA timestamp format which is 100 nanoseconds from 1601/01/01 00:00:00 UTC.
Definition sopc_builtintypes.h:160
uint32_t SOPC_StatusCode
Definition sopc_builtintypes.h:36
enum _SOPC_AttributeId SOPC_AttributeId
Enumerated for all possible OPC UA attribute ids.
enum _OpcUa_NodeClass OpcUa_NodeClass
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Definition sopc_address_space.h:49
OpcUa_ObjectNode object
Definition sopc_address_space.h:57
SOPC_StatusCode value_status
Definition sopc_address_space.h:51
OpcUa_ObjectTypeNode object_type
Definition sopc_address_space.h:58
SOPC_Value_Timestamp value_source_ts
Definition sopc_address_space.h:52
OpcUa_DataTypeNode data_type
Definition sopc_address_space.h:55
OpcUa_VariableNode variable
Definition sopc_address_space.h:61
OpcUa_MethodNode method
Definition sopc_address_space.h:56
OpcUa_VariableTypeNode variable_type
Definition sopc_address_space.h:62
OpcUa_NodeClass node_class
Definition sopc_address_space.h:50
OpcUa_ViewNode view
Definition sopc_address_space.h:63
OpcUa_ReferenceTypeNode reference_type
Definition sopc_address_space.h:59
An ExtensionObject is a container for any Structured DataTypes which cannot be encoded as one of the ...
Definition sopc_builtintypes.h:262
Definition sopc_builtintypes.h:234
This structure describes a basic NodeID in OPC UA.
Definition sopc_builtintypes.h:189
Definition sopc_builtintypes.h:228
Definition sopc_address_space.h:43
uint16_t picoSeconds
Definition sopc_address_space.h:45
SOPC_DateTime timestamp
Definition sopc_address_space.h:44
This structure provides variant encapsulation.
Definition sopc_builtintypes.h:374
Definition sopc_types.h:2026
Definition sopc_types.h:1954
Definition sopc_types.h:1763
Definition sopc_types.h:1798
Definition sopc_types.h:1638
Definition sopc_types.h:1917
Definition sopc_types.h:1833
Definition sopc_types.h:1877
Definition sopc_types.h:1990