S2OPC OPCUA Toolkit
sopc_encoder.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_ENCODER_H_
21 #define SOPC_ENCODER_H_
22 
23 #include "sopc_buffer.h"
24 #include "sopc_builtintypes.h"
25 #include "sopc_encodeabletype.h"
26 #include "sopc_enums.h"
27 
28 typedef enum
29 {
40 
41 typedef enum
42 {
51 
52 typedef enum
53 {
57 
58 typedef enum
59 {
67 
73 SOPC_ReturnStatus SOPC_Byte_Write(const SOPC_Byte* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
74 SOPC_ReturnStatus SOPC_Byte_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
75 SOPC_ReturnStatus SOPC_Byte_Read(SOPC_Byte* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
76 SOPC_ReturnStatus SOPC_Byte_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
77 SOPC_ReturnStatus SOPC_Boolean_Write(const SOPC_Boolean* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
78 SOPC_ReturnStatus SOPC_Boolean_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
79 SOPC_ReturnStatus SOPC_Boolean_Read(SOPC_Boolean* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
80 SOPC_ReturnStatus SOPC_Boolean_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
81 SOPC_ReturnStatus SOPC_SByte_Write(const SOPC_SByte* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
82 SOPC_ReturnStatus SOPC_SByte_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
83 SOPC_ReturnStatus SOPC_SByte_Read(SOPC_SByte* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
84 SOPC_ReturnStatus SOPC_SByte_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
85 SOPC_ReturnStatus SOPC_Int16_Write(const int16_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
86 SOPC_ReturnStatus SOPC_Int16_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
87 SOPC_ReturnStatus SOPC_Int16_Read(int16_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
88 SOPC_ReturnStatus SOPC_Int16_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
89 SOPC_ReturnStatus SOPC_UInt16_Write(const uint16_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
90 SOPC_ReturnStatus SOPC_UInt16_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
91 SOPC_ReturnStatus SOPC_UInt16_Read(uint16_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
92 SOPC_ReturnStatus SOPC_UInt16_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
93 SOPC_ReturnStatus SOPC_Int32_Write(const int32_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
94 SOPC_ReturnStatus SOPC_Int32_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
95 SOPC_ReturnStatus SOPC_Int32_Read(int32_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
96 SOPC_ReturnStatus SOPC_Int32_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
97 SOPC_ReturnStatus SOPC_UInt32_Write(const uint32_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
98 SOPC_ReturnStatus SOPC_UInt32_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
99 SOPC_ReturnStatus SOPC_UInt32_Read(uint32_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
100 SOPC_ReturnStatus SOPC_UInt32_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
101 SOPC_ReturnStatus SOPC_Int64_Write(const int64_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
102 SOPC_ReturnStatus SOPC_Int64_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
103 SOPC_ReturnStatus SOPC_Int64_Read(int64_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
104 SOPC_ReturnStatus SOPC_Int64_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
105 SOPC_ReturnStatus SOPC_UInt64_Write(const uint64_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
106 SOPC_ReturnStatus SOPC_UInt64_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
107 SOPC_ReturnStatus SOPC_UInt64_Read(uint64_t* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
108 SOPC_ReturnStatus SOPC_UInt64_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
109 SOPC_ReturnStatus SOPC_Float_Write(const float* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
110 SOPC_ReturnStatus SOPC_Float_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
111 SOPC_ReturnStatus SOPC_Float_Read(float* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
112 SOPC_ReturnStatus SOPC_Float_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
113 SOPC_ReturnStatus SOPC_Double_Write(const double* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
114 SOPC_ReturnStatus SOPC_Double_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
115 SOPC_ReturnStatus SOPC_Double_Read(double* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
116 SOPC_ReturnStatus SOPC_Double_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
117 SOPC_ReturnStatus SOPC_DateTime_Write(const SOPC_DateTime* date, SOPC_Buffer* buf, uint32_t nestedStructLevel);
118 SOPC_ReturnStatus SOPC_DateTime_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
119 SOPC_ReturnStatus SOPC_DateTime_Read(SOPC_DateTime* date, SOPC_Buffer* buf, uint32_t nestedStructLevel);
120 SOPC_ReturnStatus SOPC_DateTime_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
121 
122 SOPC_ReturnStatus SOPC_ByteString_Write(const SOPC_ByteString* str, SOPC_Buffer* buf, uint32_t nestedStructLevel);
123 SOPC_ReturnStatus SOPC_ByteString_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
124 SOPC_ReturnStatus SOPC_ByteString_Read(SOPC_ByteString* str, SOPC_Buffer* buf, uint32_t nestedStructLevel);
125 SOPC_ReturnStatus SOPC_ByteString_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
126 SOPC_ReturnStatus SOPC_String_Write(const SOPC_String* str, SOPC_Buffer* buf, uint32_t nestedStructLevel);
127 SOPC_ReturnStatus SOPC_String_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
128 SOPC_ReturnStatus SOPC_String_Read(SOPC_String* str, SOPC_Buffer* buf, uint32_t nestedStructLevel);
129 // Read with a limited length, returns SOPC_WOULD_BLOCK if length is more than restricted
131  int32_t maxLength,
132  SOPC_Buffer* buf,
133  uint32_t nestedStructLevel);
134 SOPC_ReturnStatus SOPC_String_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
135 SOPC_ReturnStatus SOPC_XmlElement_Write(const SOPC_XmlElement* xml, SOPC_Buffer* buf, uint32_t nestedStructLevel);
136 SOPC_ReturnStatus SOPC_XmlElement_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
137 SOPC_ReturnStatus SOPC_XmlElement_Read(SOPC_XmlElement* xml, SOPC_Buffer* buf, uint32_t nestedStructLevel);
138 SOPC_ReturnStatus SOPC_XmlElement_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
139 SOPC_ReturnStatus SOPC_Guid_Write(const SOPC_Guid* guid, SOPC_Buffer* buf, uint32_t nestedStructLevel);
140 SOPC_ReturnStatus SOPC_Guid_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
141 SOPC_ReturnStatus SOPC_Guid_Read(SOPC_Guid* guid, SOPC_Buffer* buf, uint32_t nestedStructLevel);
142 SOPC_ReturnStatus SOPC_Guid_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
143 SOPC_ReturnStatus SOPC_NodeId_Write(const SOPC_NodeId* nodeId, SOPC_Buffer* buf, uint32_t nestedStructLevel);
144 SOPC_ReturnStatus SOPC_NodeId_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
145 SOPC_ReturnStatus SOPC_NodeId_Read(SOPC_NodeId* nodeId, SOPC_Buffer* buf, uint32_t nestedStructLevel);
146 SOPC_ReturnStatus SOPC_NodeId_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
148  SOPC_Buffer* buf,
149  uint32_t nestedStructLevel);
150 SOPC_ReturnStatus SOPC_ExpandedNodeId_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
152  SOPC_Buffer* buf,
153  uint32_t nestedStructLevel);
154 SOPC_ReturnStatus SOPC_ExpandedNodeId_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
155 SOPC_ReturnStatus SOPC_StatusCode_Write(const SOPC_StatusCode* status, SOPC_Buffer* buf, uint32_t nestedStructLevel);
156 SOPC_ReturnStatus SOPC_StatusCode_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
157 SOPC_ReturnStatus SOPC_StatusCode_Read(SOPC_StatusCode* status, SOPC_Buffer* buf, uint32_t nestedStructLevel);
158 SOPC_ReturnStatus SOPC_StatusCode_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
160  SOPC_Buffer* buf,
161  uint32_t nestedStructLevel);
162 SOPC_ReturnStatus SOPC_DiagnosticInfo_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
163 SOPC_ReturnStatus SOPC_DiagnosticInfo_Read(SOPC_DiagnosticInfo* diagInfo, SOPC_Buffer* buf, uint32_t nestedStructLevel);
164 SOPC_ReturnStatus SOPC_DiagnosticInfo_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
166  SOPC_Buffer* buf,
167  uint32_t nestedStructLevel);
168 SOPC_ReturnStatus SOPC_QualifiedName_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
170 SOPC_ReturnStatus SOPC_QualifiedName_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
171 // Note: write only the defaultLocale and defaultText fields (should be the ones to send)
173  SOPC_Buffer* buf,
174  uint32_t nestedStructLevel);
175 SOPC_ReturnStatus SOPC_LocalizedText_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
176 // Note: set only the defaultLocale and defaultText fields since unique value received
178  SOPC_Buffer* buf,
179  uint32_t nestedStructLevel);
180 SOPC_ReturnStatus SOPC_LocalizedText_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
182  SOPC_Buffer* buf,
183  uint32_t nestedStructLevel);
184 SOPC_ReturnStatus SOPC_ExtensionObject_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
186 SOPC_ReturnStatus SOPC_ExtensionObject_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
187 SOPC_ReturnStatus SOPC_Variant_Write(const SOPC_Variant* variant, SOPC_Buffer* buf, uint32_t nestedStructLevel);
188 SOPC_ReturnStatus SOPC_Variant_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
189 SOPC_ReturnStatus SOPC_Variant_WriteAux_Nested(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
190 SOPC_ReturnStatus SOPC_Variant_Read(SOPC_Variant* variant, SOPC_Buffer* buf, uint32_t nestedStructLevel);
191 SOPC_ReturnStatus SOPC_Variant_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
192 SOPC_ReturnStatus SOPC_Variant_ReadAux_Nested(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
193 SOPC_ReturnStatus SOPC_DataValue_Write(const SOPC_DataValue* dataValue, SOPC_Buffer* buf, uint32_t nestedStructLevel);
194 SOPC_ReturnStatus SOPC_DataValue_WriteAux(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
195 SOPC_ReturnStatus SOPC_DataValue_WriteAux_Nested(const void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
196 SOPC_ReturnStatus SOPC_DataValue_Read(SOPC_DataValue* dataValue, SOPC_Buffer* buf, uint32_t nestedStructLevel);
197 SOPC_ReturnStatus SOPC_DataValue_ReadAux(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
198 SOPC_ReturnStatus SOPC_DataValue_ReadAux_Nested(void* value, SOPC_Buffer* buf, uint32_t nestedStructLevel);
199 
201  int32_t* noOfElts,
202  void** eltsArray,
203  size_t sizeOfElt,
207  uint32_t nestedStructLevel);
209  const int32_t* const noOfElts,
210  const void* const* eltsArray,
211  size_t sizeOfElt,
213  uint32_t nestedStructLevel);
214 
215 // Encode msg body type as node id + msg header + msg body content from encodeable type and corresponding structure
217  SOPC_EncodeableType* encType,
218  SOPC_EncodeableType* headerType,
219  void* msgHeader,
220  void* msgBody);
221 
222 // Read the msg body type from buffer and return the encodeable type of the msg body
224 
226  SOPC_EncodeableType* msgEncType,
227  void** encodeableObj);
228 
234 {
238 
245 
246 #endif /* SOPC_ENCODER_H_ */
SOPC_NodeIdEncoding_Invalid
@ SOPC_NodeIdEncoding_Invalid
Definition: sopc_encoder.h:38
SOPC_NodeId
This structure describes a basic NodeID in OPC UA.
Definition: sopc_builtintypes.h:187
SOPC_DiagInfo_EncodingFlag
SOPC_DiagInfo_EncodingFlag
Definition: sopc_encoder.h:42
SOPC_Int32_Write
SOPC_ReturnStatus SOPC_Int32_Write(const int32_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt64_WriteAux
SOPC_ReturnStatus SOPC_UInt64_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt64_Read
SOPC_ReturnStatus SOPC_UInt64_Read(uint64_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Variant_WriteAux_Nested
SOPC_ReturnStatus SOPC_Variant_WriteAux_Nested(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeIdEncoding_TwoBytes
@ SOPC_NodeIdEncoding_TwoBytes
Definition: sopc_encoder.h:30
SOPC_Float_Read
SOPC_ReturnStatus SOPC_Float_Read(float *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt32_WriteAux
SOPC_ReturnStatus SOPC_UInt32_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExtensionObject
An ExtensionObject is a container for any Structured DataTypes which cannot be encoded as one of the ...
Definition: sopc_builtintypes.h:260
SOPC_StatusCode
uint32_t SOPC_StatusCode
Definition: libs2opc_client.h:60
SOPC_SByte_WriteAux
SOPC_ReturnStatus SOPC_SByte_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Double_Write
SOPC_ReturnStatus SOPC_Double_Write(const double *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExtensionObject_ReadAux
SOPC_ReturnStatus SOPC_ExtensionObject_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_LocalizedText
Definition: sopc_builtintypes.h:232
SOPC_UInt32_ReadAux
SOPC_ReturnStatus SOPC_UInt32_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_LocalizedText_Read
SOPC_ReturnStatus SOPC_LocalizedText_Read(SOPC_LocalizedText *localizedText, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeId_WriteAux
SOPC_ReturnStatus SOPC_NodeId_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagInfoEncoding_LocalizedTest
@ SOPC_DiagInfoEncoding_LocalizedTest
Definition: sopc_encoder.h:45
SOPC_Variant_WriteAux
SOPC_ReturnStatus SOPC_Variant_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_BuiltInType_Encoding::encode
SOPC_EncodeableObject_PfnEncode * encode
Definition: sopc_encoder.h:235
SOPC_ByteString_Read
SOPC_ReturnStatus SOPC_ByteString_Read(SOPC_ByteString *str, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Guid_Write
SOPC_ReturnStatus SOPC_Guid_Write(const SOPC_Guid *guid, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Boolean_ReadAux
SOPC_ReturnStatus SOPC_Boolean_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeIdEncoding_Guid
@ SOPC_NodeIdEncoding_Guid
Definition: sopc_encoder.h:34
SOPC_BuiltInType_Encoding
Generic built-in type encoding. Provides all the generic service functions for encoding and decoding ...
Definition: sopc_encoder.h:234
SOPC_Int16_Read
SOPC_ReturnStatus SOPC_Int16_Read(int16_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_StatusCode_Read
SOPC_ReturnStatus SOPC_StatusCode_Read(SOPC_StatusCode *status, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_NotMinSourceDate
@ SOPC_DataValue_NotMinSourceDate
Definition: sopc_encoder.h:62
SOPC_EncodeableObject_PfnClear
void() SOPC_EncodeableObject_PfnClear(void *value)
Clear function generic signature for an encodeable object.
Definition: sopc_encodeabletype.h:61
SOPC_NodeId_ReadAux
SOPC_ReturnStatus SOPC_NodeId_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_Read
SOPC_ReturnStatus SOPC_DataValue_Read(SOPC_DataValue *dataValue, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_StatusCode_WriteAux
SOPC_ReturnStatus SOPC_StatusCode_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt32_Read
SOPC_ReturnStatus SOPC_UInt32_Read(uint32_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_BuiltInType_EncodingTable
const SOPC_BuiltInType_Encoding SOPC_BuiltInType_EncodingTable[SOPC_BUILTINID_MAX+1]
Table of all built-in type encoding. To be indexed with a SOPC_BuiltinId. Provides all the generic en...
SOPC_Variant_Read
SOPC_ReturnStatus SOPC_Variant_Read(SOPC_Variant *variant, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExpandedNodeId
ExpandedNodeId allows the namespace to be specified explicitly as a string or with an index in the Se...
Definition: sopc_builtintypes.h:205
SOPC_Int32_WriteAux
SOPC_ReturnStatus SOPC_Int32_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ByteString_Write
SOPC_ReturnStatus SOPC_ByteString_Write(const SOPC_ByteString *str, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Guid_Read
SOPC_ReturnStatus SOPC_Guid_Read(SOPC_Guid *guid, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_BuiltInType_Encoding::decode
SOPC_EncodeableObject_PfnDecode * decode
Definition: sopc_encoder.h:236
SOPC_ByteString_WriteAux
SOPC_ReturnStatus SOPC_ByteString_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_NotMinServerDate
@ SOPC_DataValue_NotMinServerDate
Definition: sopc_encoder.h:63
SOPC_NodeIdEncoding_NamespaceUriFlag
@ SOPC_NodeIdEncoding_NamespaceUriFlag
Definition: sopc_encoder.h:36
SOPC_Guid
Definition: sopc_builtintypes.h:161
SOPC_UInt16_WriteAux
SOPC_ReturnStatus SOPC_UInt16_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Int64_ReadAux
SOPC_ReturnStatus SOPC_Int64_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_XmlElement_ReadAux
SOPC_ReturnStatus SOPC_XmlElement_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DateTime_WriteAux
SOPC_ReturnStatus SOPC_DateTime_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_String_WriteAux
SOPC_ReturnStatus SOPC_String_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Guid_WriteAux
SOPC_ReturnStatus SOPC_Guid_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeId_DataEncoding
SOPC_NodeId_DataEncoding
Definition: sopc_encoder.h:29
SOPC_DataValue_NotZeroServerPico
@ SOPC_DataValue_NotZeroServerPico
Definition: sopc_encoder.h:65
SOPC_XmlElement_Write
SOPC_ReturnStatus SOPC_XmlElement_Write(const SOPC_XmlElement *xml, SOPC_Buffer *buf, uint32_t nestedStructLevel)
sopc_encodeabletype.h
EncodeableType and services on encodeable object.
SOPC_Int32_Read
SOPC_ReturnStatus SOPC_Int32_Read(int32_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeIdEncoding_ServerIndexFlag
@ SOPC_NodeIdEncoding_ServerIndexFlag
Definition: sopc_encoder.h:37
SOPC_EncodeableObject_PfnDecode
SOPC_ReturnStatus() SOPC_EncodeableObject_PfnDecode(void *value, SOPC_Buffer *msgBuffer, uint32_t nestedStructLevel)
Decoding function generic signature for an encodeable object.
Definition: sopc_encodeabletype.h:89
SOPC_Buffer
Bytes buffer structure.
Definition: sopc_buffer.h:38
SOPC_DataValue_NotNullValue
@ SOPC_DataValue_NotNullValue
Definition: sopc_encoder.h:60
sopc_enums.h
SOPC_DateTime_Read
SOPC_ReturnStatus SOPC_DateTime_Read(SOPC_DateTime *date, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExtensionObject_WriteAux
SOPC_ReturnStatus SOPC_ExtensionObject_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DateTime_Write
SOPC_ReturnStatus SOPC_DateTime_Write(const SOPC_DateTime *date, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagInfoEncoding_InnerStatusCode
@ SOPC_DiagInfoEncoding_InnerStatusCode
Definition: sopc_encoder.h:48
SOPC_DiagInfoEncoding_SymbolicId
@ SOPC_DiagInfoEncoding_SymbolicId
Definition: sopc_encoder.h:43
SOPC_DateTime_ReadAux
SOPC_ReturnStatus SOPC_DateTime_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_NotGoodStatusCode
@ SOPC_DataValue_NotGoodStatusCode
Definition: sopc_encoder.h:61
sopc_builtintypes.h
SOPC_Float_Write
SOPC_ReturnStatus SOPC_Float_Write(const float *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Int64_WriteAux
SOPC_ReturnStatus SOPC_Int64_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_String
This structure provides string encapsulation.
Definition: sopc_builtintypes.h:149
SOPC_DecodeMsg_HeaderOrBody
SOPC_ReturnStatus SOPC_DecodeMsg_HeaderOrBody(SOPC_Buffer *buffer, SOPC_EncodeableType *msgEncType, void **encodeableObj)
SOPC_MsgBodyType_Read
SOPC_ReturnStatus SOPC_MsgBodyType_Read(SOPC_Buffer *buf, SOPC_EncodeableType **receivedEncType)
SOPC_NodeId_Write
SOPC_ReturnStatus SOPC_NodeId_Write(const SOPC_NodeId *nodeId, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagnosticInfo
This structure provides vendor specific diagnostic information.
Definition: sopc_builtintypes.h:215
SOPC_NodeIdEncoding_Numeric
@ SOPC_NodeIdEncoding_Numeric
Definition: sopc_encoder.h:32
SOPC_DataValue_ReadAux_Nested
SOPC_ReturnStatus SOPC_DataValue_ReadAux_Nested(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_QualifiedName_Write
SOPC_ReturnStatus SOPC_QualifiedName_Write(const SOPC_QualifiedName *qname, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagnosticInfo_Read
SOPC_ReturnStatus SOPC_DiagnosticInfo_Read(SOPC_DiagnosticInfo *diagInfo, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExpandedNodeId_Write
SOPC_ReturnStatus SOPC_ExpandedNodeId_Write(const SOPC_ExpandedNodeId *expNodeId, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_BuiltInType_Encoding
struct SOPC_BuiltInType_Encoding SOPC_BuiltInType_Encoding
Generic built-in type encoding. Provides all the generic service functions for encoding and decoding ...
SOPC_ExpandedNodeId_WriteAux
SOPC_ReturnStatus SOPC_ExpandedNodeId_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagnosticInfo_ReadAux
SOPC_ReturnStatus SOPC_DiagnosticInfo_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_BUILTINID_MAX
#define SOPC_BUILTINID_MAX
Definition: sopc_builtintypes.h:137
SOPC_Int16_ReadAux
SOPC_ReturnStatus SOPC_Int16_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Byte_WriteAux
SOPC_ReturnStatus SOPC_Byte_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_String_ReadWithLimitedLength
SOPC_ReturnStatus SOPC_String_ReadWithLimitedLength(SOPC_String *str, int32_t maxLength, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Double_ReadAux
SOPC_ReturnStatus SOPC_Double_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_StatusCode_Write
SOPC_ReturnStatus SOPC_StatusCode_Write(const SOPC_StatusCode *status, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_ReadAux
SOPC_ReturnStatus SOPC_DataValue_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt16_Write
SOPC_ReturnStatus SOPC_UInt16_Write(const uint16_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt32_Write
SOPC_ReturnStatus SOPC_UInt32_Write(const uint32_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Double_WriteAux
SOPC_ReturnStatus SOPC_Double_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt64_ReadAux
SOPC_ReturnStatus SOPC_UInt64_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_String_ReadAux
SOPC_ReturnStatus SOPC_String_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagnosticInfo_Write
SOPC_ReturnStatus SOPC_DiagnosticInfo_Write(const SOPC_DiagnosticInfo *diagInfo, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagInfoEncoding_InnerDianosticInfo
@ SOPC_DiagInfoEncoding_InnerDianosticInfo
Definition: sopc_encoder.h:49
SOPC_Float_WriteAux
SOPC_ReturnStatus SOPC_Float_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Byte_Read
SOPC_ReturnStatus SOPC_Byte_Read(SOPC_Byte *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Float_ReadAux
SOPC_ReturnStatus SOPC_Float_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Int16_Write
SOPC_ReturnStatus SOPC_Int16_Write(const int16_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Variant_ReadAux_Nested
SOPC_ReturnStatus SOPC_Variant_ReadAux_Nested(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExpandedNodeId_ReadAux
SOPC_ReturnStatus SOPC_ExpandedNodeId_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Byte
uint8_t SOPC_Byte
Definition: sopc_builtintypes.h:139
SOPC_DiagnosticInfo_WriteAux
SOPC_ReturnStatus SOPC_DiagnosticInfo_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt64_Write
SOPC_ReturnStatus SOPC_UInt64_Write(const uint64_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeIdEncoding_FourBytes
@ SOPC_NodeIdEncoding_FourBytes
Definition: sopc_encoder.h:31
SOPC_DiagInfoEncoding_Locale
@ SOPC_DiagInfoEncoding_Locale
Definition: sopc_encoder.h:46
SOPC_Guid_ReadAux
SOPC_ReturnStatus SOPC_Guid_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_SByte_Read
SOPC_ReturnStatus SOPC_SByte_Read(SOPC_SByte *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_StatusCode_ReadAux
SOPC_ReturnStatus SOPC_StatusCode_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_LocalizedText_Locale
@ SOPC_LocalizedText_Locale
Definition: sopc_encoder.h:54
SOPC_QualifiedName_ReadAux
SOPC_ReturnStatus SOPC_QualifiedName_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Variant
This structure provides variant encapsulation.
Definition: sopc_builtintypes.h:374
SOPC_String_Write
SOPC_ReturnStatus SOPC_String_Write(const SOPC_String *str, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_SByte
int8_t SOPC_SByte
Definition: sopc_builtintypes.h:143
SOPC_NodeIdEncoding_String
@ SOPC_NodeIdEncoding_String
Definition: sopc_encoder.h:33
SOPC_EncodeMsg_Type_Header_Body
SOPC_ReturnStatus SOPC_EncodeMsg_Type_Header_Body(SOPC_Buffer *buf, SOPC_EncodeableType *encType, SOPC_EncodeableType *headerType, void *msgHeader, void *msgBody)
SOPC_DataValue_EncodingFlag
SOPC_DataValue_EncodingFlag
Definition: sopc_encoder.h:59
SOPC_DateTime
int64_t SOPC_DateTime
Definition: sopc_builtintypes.h:158
SOPC_Write_Array
SOPC_ReturnStatus SOPC_Write_Array(SOPC_Buffer *msgBuf, const int32_t *const noOfElts, const void *const *eltsArray, size_t sizeOfElt, SOPC_EncodeableObject_PfnEncode *encodeFct, uint32_t nestedStructLevel)
SOPC_NodeIdEncoding_ByteString
@ SOPC_NodeIdEncoding_ByteString
Definition: sopc_encoder.h:35
SOPC_QualifiedName_Read
SOPC_ReturnStatus SOPC_QualifiedName_Read(SOPC_QualifiedName *qname, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Variant_Write
SOPC_ReturnStatus SOPC_Variant_Write(const SOPC_Variant *variant, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_Write
SOPC_ReturnStatus SOPC_DataValue_Write(const SOPC_DataValue *dataValue, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_LocalizedText_WriteAux
SOPC_ReturnStatus SOPC_LocalizedText_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Boolean
SOPC_Byte SOPC_Boolean
Definition: sopc_builtintypes.h:141
SOPC_DiagInfoEncoding_Namespace
@ SOPC_DiagInfoEncoding_Namespace
Definition: sopc_encoder.h:44
SOPC_Int64_Read
SOPC_ReturnStatus SOPC_Int64_Read(int64_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_SByte_ReadAux
SOPC_ReturnStatus SOPC_SByte_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Boolean_WriteAux
SOPC_ReturnStatus SOPC_Boolean_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Boolean_Read
SOPC_ReturnStatus SOPC_Boolean_Read(SOPC_Boolean *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Variant_ReadAux
SOPC_ReturnStatus SOPC_Variant_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue
Each attribute in OPC UA has a DataValue caracterized by the following structure.
Definition: sopc_builtintypes.h:385
SOPC_Int16_WriteAux
SOPC_ReturnStatus SOPC_Int16_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_NotZeroSourcePico
@ SOPC_DataValue_NotZeroSourcePico
Definition: sopc_encoder.h:64
SOPC_QualifiedName
Definition: sopc_builtintypes.h:226
SOPC_Read_Array
SOPC_ReturnStatus SOPC_Read_Array(SOPC_Buffer *msgBuf, int32_t *noOfElts, void **eltsArray, size_t sizeOfElt, SOPC_EncodeableObject_PfnDecode *decodeFct, SOPC_EncodeableObject_PfnInitialize *initializeFct, SOPC_EncodeableObject_PfnClear *clearFct, uint32_t nestedStructLevel)
SOPC_LocalizedText_ReadAux
SOPC_ReturnStatus SOPC_LocalizedText_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_NodeId_Read
SOPC_ReturnStatus SOPC_NodeId_Read(SOPC_NodeId *nodeId, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_EncodeableObject_PfnInitialize
void() SOPC_EncodeableObject_PfnInitialize(void *value)
Initialization function generic signature for an encodeable object.
Definition: sopc_encodeabletype.h:56
SOPC_LocalizedText_Write
SOPC_ReturnStatus SOPC_LocalizedText_Write(const SOPC_LocalizedText *localizedText, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Boolean_Write
SOPC_ReturnStatus SOPC_Boolean_Write(const SOPC_Boolean *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DiagInfoEncoding_AdditionalInfo
@ SOPC_DiagInfoEncoding_AdditionalInfo
Definition: sopc_encoder.h:47
SOPC_ByteString_ReadAux
SOPC_ReturnStatus SOPC_ByteString_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Int64_Write
SOPC_ReturnStatus SOPC_Int64_Write(const int64_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Double_Read
SOPC_ReturnStatus SOPC_Double_Read(double *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_XmlElement_WriteAux
SOPC_ReturnStatus SOPC_XmlElement_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_EncodeableObject_PfnEncode
SOPC_ReturnStatus() SOPC_EncodeableObject_PfnEncode(const void *value, SOPC_Buffer *buffer, uint32_t nestedStructLevel)
Encoding function generic signature for an encodeable object *.
Definition: sopc_encodeabletype.h:74
SOPC_String_Read
SOPC_ReturnStatus SOPC_String_Read(SOPC_String *str, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_SByte_Write
SOPC_ReturnStatus SOPC_SByte_Write(const SOPC_SByte *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_EncodeableType_Struct
Encodeable object type structure definition. It provides all the services functions associated with t...
Definition: sopc_encodeabletype.h:161
SOPC_ExtensionObject_Write
SOPC_ReturnStatus SOPC_ExtensionObject_Write(const SOPC_ExtensionObject *extObj, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ExtensionObject_Read
SOPC_ReturnStatus SOPC_ExtensionObject_Read(SOPC_ExtensionObject *extObj, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_LocalizedText_Text
@ SOPC_LocalizedText_Text
Definition: sopc_encoder.h:55
SOPC_Int32_ReadAux
SOPC_ReturnStatus SOPC_Int32_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Byte_ReadAux
SOPC_ReturnStatus SOPC_Byte_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_WriteAux_Nested
SOPC_ReturnStatus SOPC_DataValue_WriteAux_Nested(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_LocalizedText_EncodingFlag
SOPC_LocalizedText_EncodingFlag
Definition: sopc_encoder.h:53
SOPC_ExpandedNodeId_Read
SOPC_ReturnStatus SOPC_ExpandedNodeId_Read(SOPC_ExpandedNodeId *expNodeId, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt16_ReadAux
SOPC_ReturnStatus SOPC_UInt16_ReadAux(void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_QualifiedName_WriteAux
SOPC_ReturnStatus SOPC_QualifiedName_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
sopc_buffer.h
A buffer of bytes with a maximum size, length and position.
SOPC_XmlElement_Read
SOPC_ReturnStatus SOPC_XmlElement_Read(SOPC_XmlElement *xml, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_Byte_Write
SOPC_ReturnStatus SOPC_Byte_Write(const SOPC_Byte *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_DataValue_WriteAux
SOPC_ReturnStatus SOPC_DataValue_WriteAux(const void *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_UInt16_Read
SOPC_ReturnStatus SOPC_UInt16_Read(uint16_t *value, SOPC_Buffer *buf, uint32_t nestedStructLevel)
SOPC_ReturnStatus
SOPC_ReturnStatus
Definition: libs2opc_client.h:64