C++ Based OPC UA Client/Server SDK  1.6.3.406
opcua_encodeableobject.h File Reference
#include <opcua_buffer.h>
#include <opcua_stream.h>
#include <opcua_stringtable.h>

Classes

struct  OpcUa_EncodeableType
 Describes an encodeable object. More...
 
struct  OpcUa_EncodeableTypeTable
 A table of encodeable object types. More...
 

Typedefs

typedef OpcUa_Void( OpcUa_EncodeableObject_PfnInitialize )(OpcUa_Void *pValue)
 Initializes an encodeable object. More...
 
typedef OpcUa_Void( OpcUa_EncodeableObject_PfnClear )(OpcUa_Void *pValue)
 Clear an encodeable object. More...
 
typedef OpcUa_StatusCodeOpcUa_EncodeableObject_PfnGetSize )(OpcUa_Void *pValue, struct _OpcUa_Encoder *pEncoder, OpcUa_Int32 *pSize)
 Calculates the size the serialized form an encodeable object. More...
 
typedef OpcUa_StatusCodeOpcUa_EncodeableObject_PfnEncode )(OpcUa_Void *pValue, struct _OpcUa_Encoder *pEncoder)
 Encodes an encodeable object. More...
 
typedef OpcUa_StatusCodeOpcUa_EncodeableObject_PfnDecode )(OpcUa_Void *pValue, struct _OpcUa_Decoder *pDecoder)
 Decodes an encodeable object. More...
 
typedef OpcUa_Int( OpcUa_EncodeableObject_PfnCompare )(OpcUa_Void *pValue1, OpcUa_Void *pValue2)
 Compares two encodeable object. More...
 
typedef OpcUa_StatusCodeOpcUa_EncodeableObject_PfnCopy )(OpcUa_Void *pSource, OpcUa_Void **ppCopy)
 Creates a copy of an encodeable object. More...
 
typedef OpcUa_StatusCodeOpcUa_EncodeableObject_PfnCopyTo )(OpcUa_Void *pSource, OpcUa_Void *pDestination)
 Copies content of an encodeable object to another. More...
 

Functions

OPCUA_EXPORT OpcUa_Int OPCUA_CDECL OpcUa_EncodeableType_Compare (const OpcUa_EncodeableType *pType1, const OpcUa_EncodeableType *pType2)
 Compares two Encodeable Types and returns 0 if they are equal. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableTypeTable_Create (OpcUa_EncodeableTypeTable *pTable)
 Initializes an encodeable object type table. More...
 
OPCUA_EXPORT OpcUa_Void OpcUa_EncodeableTypeTable_Delete (OpcUa_EncodeableTypeTable *pTable)
 Clears an encodeable object type table. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableTypeTable_AddTypes (OpcUa_EncodeableTypeTable *pTable, OpcUa_EncodeableType **ppTypes)
 Populates and sorts an encodeable object type table. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableTypeTable_Find (OpcUa_EncodeableTypeTable *pTable, OpcUa_UInt32 nTypeId, OpcUa_StringA sNamespaceUri, OpcUa_EncodeableType **ppType)
 Finds a encodeable object type in a table. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_Create (OpcUa_EncodeableType *pType, OpcUa_Void **ppEncodeable)
 Creates and initializes an encodeable object. More...
 
OPCUA_EXPORT OpcUa_Void OpcUa_EncodeableObject_Delete (OpcUa_EncodeableType *pType, OpcUa_Void **ppEncodeable)
 Deletes an encodeable object. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_CreateExtension (OpcUa_EncodeableType *pType, OpcUa_ExtensionObject *pExtension, OpcUa_Void **ppEncodeableObject)
 Creates an Encodeable Object at the given ExtensionObject. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_ParseExtension (OpcUa_ExtensionObject *pExtension, struct _OpcUa_MessageContext *pContext, OpcUa_EncodeableType *pType, OpcUa_Void **ppEncodeableObject)
 Extracts an encodeable object from an extension object. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_Encode (const OpcUa_EncodeableType *pObjectType, OpcUa_Void *pObject, OpcUa_StringTable *pNamespaceUris, OpcUa_OutputStream *pOutputStream)
 Encode object of specified encodeable object type into output stream. More...
 
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_Decode (const OpcUa_EncodeableType *pObjectType, OpcUa_InputStream *pInputStream, OpcUa_StringTable *pNamespaceUris, OpcUa_Void *pObject)
 Decode object of specified encodeable object type from input stream into given memory. More...
 

Typedef Documentation

typedef OpcUa_Void( OpcUa_EncodeableObject_PfnClear)(OpcUa_Void *pValue)

Clear an encodeable object.

This function must free all memory referenced by the object and set it to a known state.

Parameters
pValue[in] The encodeable object to clear.
typedef OpcUa_Int( OpcUa_EncodeableObject_PfnCompare)(OpcUa_Void *pValue1, OpcUa_Void *pValue2)

Compares two encodeable object.

Parameters
pValue1[in] The first operand.
pValue2[in] The second operand.
typedef OpcUa_StatusCode( OpcUa_EncodeableObject_PfnCopy)(OpcUa_Void *pSource, OpcUa_Void **ppCopy)

Creates a copy of an encodeable object.

Parameters
pSource[in] The source object.
pCopy[in] The created copy of the source object.
typedef OpcUa_StatusCode( OpcUa_EncodeableObject_PfnCopyTo)(OpcUa_Void *pSource, OpcUa_Void *pDestination)

Copies content of an encodeable object to another.

Parameters
pSource[in] The source object.
pValue[in] The copy of the source object.
typedef OpcUa_StatusCode( OpcUa_EncodeableObject_PfnDecode)(OpcUa_Void *pValue, struct _OpcUa_Decoder *pDecoder)

Decodes an encodeable object.

Parameters
pDecoder[in] The decoder used to deserialize the object.
pValue[in] The object to decode.
typedef OpcUa_StatusCode( OpcUa_EncodeableObject_PfnEncode)(OpcUa_Void *pValue, struct _OpcUa_Encoder *pEncoder)

Encodes an encodeable object.

Parameters
pEncoder[in] The encoder used to serialize the object.
pValue[in] The object to encode.
typedef OpcUa_StatusCode( OpcUa_EncodeableObject_PfnGetSize)(OpcUa_Void *pValue, struct _OpcUa_Encoder *pEncoder, OpcUa_Int32 *pSize)

Calculates the size the serialized form an encodeable object.

Returns Bad_NotSupported if it is not possible to calculate the size.

Parameters
pValue[in] The object to encode.
pEncoder[in] The encoder used to serialize the object.
pSize[out] The size of the encoded object in bytes.
typedef OpcUa_Void( OpcUa_EncodeableObject_PfnInitialize)(OpcUa_Void *pValue)

Initializes an encodeable object.

This function should set the object to a known state. It should not allocate memory.

Parameters
pValue[in] The encodeable object to initialize.

Function Documentation

OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_Create ( OpcUa_EncodeableType pType,
OpcUa_Void **  ppEncodeable 
)

Creates and initializes an encodeable object.

Parameters
pType[in] The type of the object to create.
ppEncodeable[out] The new encodeable object.
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_CreateExtension ( OpcUa_EncodeableType pType,
OpcUa_ExtensionObject pExtension,
OpcUa_Void **  ppEncodeableObject 
)

Creates an Encodeable Object at the given ExtensionObject.

Parameters
pType[in] The type of the object.
pExtension[in/out] The extension object to which the encodeable object gets attached.
ppEncodeableObject[in/out] Pointer to the encodeable object.
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_Decode ( const OpcUa_EncodeableType pObjectType,
OpcUa_InputStream *  pInputStream,
OpcUa_StringTable *  pNamespaceUris,
OpcUa_Void *  pObject 
)

Decode object of specified encodeable object type from input stream into given memory.

Parameters
pObjectType[ in] Type of the object to decode.
pInputStream[ in] Stream with encoded object.
pNamespaceUris[ in] Current namespaces.
pObject[out] Destination buffer.
OPCUA_EXPORT OpcUa_Void OpcUa_EncodeableObject_Delete ( OpcUa_EncodeableType pType,
OpcUa_Void **  ppEncodeable 
)

Deletes an encodeable object.

Parameters
pType[in] The type of the object.
ppEncodeable[in/out] The encodeable object.
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_Encode ( const OpcUa_EncodeableType pObjectType,
OpcUa_Void *  pObject,
OpcUa_StringTable *  pNamespaceUris,
OpcUa_OutputStream *  pOutputStream 
)

Encode object of specified encodeable object type into output stream.

Parameters
pObjectType[ in] Type of the object to encode.
pObject[ in] The object.
pNamespaceUris[ in] Current namespaces.
pOutputStream[out] The destination stream.
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableObject_ParseExtension ( OpcUa_ExtensionObject pExtension,
struct _OpcUa_MessageContext *  pContext,
OpcUa_EncodeableType pType,
OpcUa_Void **  ppEncodeableObject 
)

Extracts an encodeable object from an extension object.

Parameters
pExtension[in] The extension object to parse.
pContext[in] The message context to use during parsing.
pType[in] The type of object to extract.
ppEncodeableObject[in/out] Pointer to the encodeable object.
OPCUA_EXPORT OpcUa_Int OPCUA_CDECL OpcUa_EncodeableType_Compare ( const OpcUa_EncodeableType pType1,
const OpcUa_EncodeableType pType2 
)

Compares two Encodeable Types and returns 0 if they are equal.

Parameters
pType1[in] First operand.
pType2[in] Second operand.
Returns
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableTypeTable_AddTypes ( OpcUa_EncodeableTypeTable pTable,
OpcUa_EncodeableType **  ppTypes 
)

Populates and sorts an encodeable object type table.

The new types are added to the table if it has already contains types.

Parameters
pTable[in] The table to update.
ppTypes[in] A null terminated list of encodeable object types.
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableTypeTable_Create ( OpcUa_EncodeableTypeTable pTable)

Initializes an encodeable object type table.

Parameters
pTable[in] The table to clear.
OPCUA_EXPORT OpcUa_Void OpcUa_EncodeableTypeTable_Delete ( OpcUa_EncodeableTypeTable pTable)

Clears an encodeable object type table.

Parameters
pTable[in] The table to clear.
OPCUA_EXPORT OpcUa_StatusCode OpcUa_EncodeableTypeTable_Find ( OpcUa_EncodeableTypeTable pTable,
OpcUa_UInt32  nTypeId,
OpcUa_StringA  sNamespaceUri,
OpcUa_EncodeableType **  ppType 
)

Finds a encodeable object type in a table.

Parameters
pTable[in] The table to search.
nTypeId[in] The type identifier for the encodeable object.
sNamespaceUri[in] The namespace uri that qualifies the type identifier.
ppType[out] The matching encodeable object type.