S2OPC OPCUA Toolkit
Functions
libs2opc_request_builder.h File Reference

High level interface to build OPC UA request and access OPC UA response. More...

#include "sopc_types.h"

Go to the source code of this file.

Functions

OpcUa_ReadRequestSOPC_ReadRequest_Create (size_t nbReadValues, OpcUa_TimestampsToReturn tsToReturn)
 Creates a read request. More...
 
SOPC_ReturnStatus SOPC_ReadRequest_SetMaxAge (OpcUa_ReadRequest *readRequest, double maxAge)
 Indicates to the server of maximum age of the data it should return. More...
 
SOPC_ReturnStatus SOPC_ReadRequest_SetReadValueFromStrings (OpcUa_ReadRequest *readRequest, size_t index, const char *nodeId, SOPC_AttributeId attribute, const char *indexRange)
 Sets the value to read at given index in read request (using C strings for node id and index range) More...
 
SOPC_ReturnStatus SOPC_ReadRequest_SetReadValue (OpcUa_ReadRequest *readRequest, size_t index, const SOPC_NodeId *nodeId, SOPC_AttributeId attribute, const SOPC_String *indexRange)
 Sets the value to read at given index in read request. More...
 
SOPC_ReturnStatus SOPC_ReadRequest_SetReadValueDataEncoding (OpcUa_ReadRequest *readRequest, size_t index, const SOPC_QualifiedName *dataEncoding)
 Sets the data encoding of the value to read. More...
 
OpcUa_WriteRequestSOPC_WriteRequest_Create (size_t nbWriteValues)
 Creates a write request. More...
 
SOPC_ReturnStatus SOPC_WriteRequest_SetWriteValueFromStrings (OpcUa_WriteRequest *writeRequest, size_t index, const char *nodeId, SOPC_AttributeId attribute, const char *indexRange, const SOPC_DataValue *value)
 Sets the value to write at given index in write request (using C strings for node id and index range) More...
 
SOPC_ReturnStatus SOPC_WriteRequest_SetWriteValue (OpcUa_WriteRequest *writeRequest, size_t index, const SOPC_NodeId *nodeId, SOPC_AttributeId attribute, const SOPC_String *indexRange, const SOPC_DataValue *value)
 Sets the value to write at given index in write request. More...
 
OpcUa_BrowseRequestSOPC_BrowseRequest_Create (size_t nbNodesToBrowse, size_t maxReferencesPerNode, const OpcUa_ViewDescription *optView)
 Enumerated result fields mask values authorized for use with SOPC_BrowseRequest_SetBrowseDescription. Those values are masks which means they might be used with OR bitwise operation to select several result fields. More...
 
SOPC_ReturnStatus SOPC_BrowseRequest_SetBrowseDescriptionFromStrings (OpcUa_BrowseRequest *browseRequest, size_t index, const char *nodeId, OpcUa_BrowseDirection browseDirection, const char *referenceTypeId, bool includeSubtypes, OpcUa_NodeClass nodeClassMask, OpcUa_BrowseResultMask resultMask)
 Sets the node to browse at given index in browse request (using C strings for node id and reference type id) More...
 
SOPC_ReturnStatus SOPC_BrowseRequest_SetBrowseDescription (OpcUa_BrowseRequest *browseRequest, size_t index, const SOPC_NodeId *nodeId, OpcUa_BrowseDirection browseDirection, const SOPC_NodeId *referenceTypeId, bool includeSubtypes, OpcUa_NodeClass nodeClassMask, OpcUa_BrowseResultMask resultMask)
 Sets the node to browse at given index in browse request. More...
 
OpcUa_BrowseNextRequestSOPC_BrowseNextRequest_Create (bool releaseContinuationPoints, size_t nbContinuationPoints)
 Creates a browse next request. More...
 
OpcUa_TranslateBrowsePathsToNodeIdsRequestSOPC_TranslateBrowsePathsRequest_Create (size_t nbTranslateBrowsePaths)
 Create a translate browse paths request. More...
 
SOPC_ReturnStatus SOPC_TranslateBrowsePathRequest_SetPathFromString (OpcUa_TranslateBrowsePathsToNodeIdsRequest *tbpRequest, size_t index, const char *startingNodeId, size_t nbPathElements, OpcUa_RelativePathElement *pathElements)
 Sets the browse path to translate at given index in translate browse paths request (using C strings for node id) More...
 
SOPC_ReturnStatus SOPC_TranslateBrowsePathRequest_SetPath (OpcUa_TranslateBrowsePathsToNodeIdsRequest *tbpRequest, size_t index, SOPC_NodeId *startingNodeId, size_t nbPathElements, OpcUa_RelativePathElement *pathElements)
 Sets the browse path to translate at given index in translate browse paths request. More...
 
OpcUa_RelativePathElementSOPC_RelativePathElements_Create (size_t nbPathElements)
 Creates an array of relative path element to be used in translate browse path. More...
 
SOPC_ReturnStatus SOPC_RelativePathElements_SetPathElement (OpcUa_RelativePathElement *pathElementsArray, size_t index, const SOPC_NodeId *referenceTypeId, bool isInverse, bool includeSubtypes, uint16_t targetNsIndex, const char *targetName)
 Sets the path element at given index in relative path element array. More...
 
SOPC_ReturnStatus SOPC_BrowseNextRequest_SetContinuationPoint (OpcUa_BrowseNextRequest *browseNextRequest, size_t index, const SOPC_ByteString *continuationPoint)
 Sets the continuation point to browse at given index in browse next request. More...
 
OpcUa_GetEndpointsRequestSOPC_GetEndpointsRequest_Create (const char *endpointURL)
 Creates a GetEndpoint request for the given endpoint URL. More...
 
SOPC_ReturnStatus SOPC_GetEndpointsRequest_SetPreferredLocales (OpcUa_GetEndpointsRequest *getEndpointsReq, size_t nbLocales, char *const *localeIds)
 Requests preferred locales for the endpoints to be returned by the get endpoints service (Optional) Preferred locale order is the order of localesIds array. More...
 
SOPC_ReturnStatus SOPC_GetEndpointsRequest_SetProfileURIs (OpcUa_GetEndpointsRequest *getEndpointsReq, size_t nbProfiles, char *const *profileURIs)
 Requests profile URIs for the endpoints to be returned by the get endpoints service (Optional) Endpoints of all transport profile types available are returned if SOPC_GetEndpointsRequest_SetProfileURIs unused. More...
 
OpcUa_RegisterServer2RequestSOPC_RegisterServer2Request_CreateFromServerConfiguration (void)
 Creates a complete RegisterServer2 request from the current server configuration. It shall be used to register the current server for FindServer and FindServerOnNetwork services. More...
 
OpcUa_AddNodesRequestSOPC_AddNodesRequest_Create (size_t nbAddNodes)
 Creates an add nodes request. More...
 
SOPC_ReturnStatus SOPC_AddNodeRequest_SetVariableAttributes (OpcUa_AddNodesRequest *addNodesRequest, size_t index, const SOPC_ExpandedNodeId *parentNodeId, const SOPC_NodeId *referenceTypeId, const SOPC_ExpandedNodeId *optRequestedNodeId, const SOPC_QualifiedName *browseName, const SOPC_ExpandedNodeId *typeDefinition, const SOPC_LocalizedText *optDisplayName, const SOPC_LocalizedText *optDescription, const uint32_t *optWriteMask, const uint32_t *optUserWriteMask, const SOPC_Variant *optValue, const SOPC_NodeId *optDataType, const int32_t *optValueRank, int32_t noOfArrayDimensions, const uint32_t *optArrayDimensions, const SOPC_Byte *optAccessLevel, const SOPC_Byte *optUserAccessLevel, const double *optMinimumSamplingInterval, SOPC_Boolean *optHistorizing)
 Sets the attributes values requested for the Variable node to add. Optional parameters are prefixed by "opt" and shall be NULL if not defined. If optional parameters are not defined the server will choose values for this attributes. More...
 
OpcUa_CreateSubscriptionRequestSOPC_CreateSubscriptionRequest_CreateDefault (void)
 Creates a CreateSubscription request with default parameters values Default parameters are the following: More...
 
OpcUa_CreateSubscriptionRequestSOPC_CreateSubscriptionRequest_Create (double reqPublishingInterval, uint32_t reqLifetimeCount, uint32_t reqMaxKeepAliveCount, uint32_t maxNotifPerPublish, SOPC_Boolean publishingEnabled, SOPC_Byte priority)
 Creates a CreateSubscription request with given parameters values. More...
 
OpcUa_CreateMonitoredItemsRequestSOPC_CreateMonitoredItemsRequest_CreateDefault (uint32_t subscriptionId, size_t nbMonitoredItems, const SOPC_NodeId *nodeIdsToMonitor, OpcUa_TimestampsToReturn ts)
 Creates a CreateMonitoredItems request for the given node ids with default parameters values: More...
 
OpcUa_CreateMonitoredItemsRequestSOPC_CreateMonitoredItemsRequest_CreateDefaultFromStrings (uint32_t subscriptionId, size_t nbMonitoredItems, char *const *nodeIdsToMonitor, OpcUa_TimestampsToReturn ts)
 Creates a CreateMonitoredItems request for the given node ids C strings with default parameters values: More...
 
OpcUa_CreateMonitoredItemsRequestSOPC_CreateMonitoredItemsRequest_Create (uint32_t subscriptionId, size_t nbMonitoredItems, OpcUa_TimestampsToReturn ts)
 Creates a CreateMonitoredItems request. More...
 
SOPC_ReturnStatus SOPC_CreateMonitoredItemsRequest_SetMonitoredItemId (OpcUa_CreateMonitoredItemsRequest *createMIrequest, size_t index, const SOPC_NodeId *nodeId, SOPC_AttributeId attribute, const SOPC_String *indexRange)
 Sets the monitored item identification parameters. It should be completed by a call to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams for the same index to configure monitoring parameters. Otherwise default parameter values are applied: More...
 
SOPC_ReturnStatus SOPC_CreateMonitoredItemsRequest_SetMonitoredItemIdFromStrings (OpcUa_CreateMonitoredItemsRequest *createMIrequest, size_t index, const char *nodeId, SOPC_AttributeId attribute, const char *indexRange)
 Sets the monitored item identification parameters using C string parameters. It shall be completed by a call to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams for the same index to configure monitoring parameters. Otherwise default parameter values are applied: More...
 
SOPC_ExtensionObjectSOPC_MonitoredItem_DataChangeFilter (OpcUa_DataChangeTrigger trigger, OpcUa_DeadbandType deadbandType, double deadbandValue)
 Creates and allocates a DataChangeFilter filter parameter to be provided to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams. See part 4 §7.17.2 for detailed DataChangeFilter documentation. More...
 
SOPC_ReturnStatus SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams (OpcUa_CreateMonitoredItemsRequest *createMIrequest, size_t index, OpcUa_MonitoringMode monitoringMode, uint32_t clientHandle, double samplingInterval, SOPC_ExtensionObject *optFilter, uint32_t queueSize, SOPC_Boolean discardOldest)
 Sets the monitored item monitoring parameters. It shall be completed by a call to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemId for the same index to configure monitored item identification. See part 4 §7.16 for detailed MonitoringParameters documentation. More...
 
OpcUa_ModifyMonitoredItemsRequestSOPC_ModifyMonitoredItemsRequest_Create (uint32_t subscriptionId, size_t nbMonitoredItems, OpcUa_TimestampsToReturn ts)
 Creates a ModifyMonitoredItems request. More...
 
SOPC_ReturnStatus SOPC_ModifyMonitoredItemsRequest_SetMonitoredItemParams (OpcUa_ModifyMonitoredItemsRequest *modifyMIrequest, size_t index, uint32_t monitoredItemId, uint32_t clientHandle, double samplingInterval, SOPC_ExtensionObject *optFilter, uint32_t queueSize, SOPC_Boolean discardOldest)
 Sets the monitored item monitoring parameters to modify. See part 4 §7.16 for detailed MonitoringParameters documentation. More...
 
OpcUa_DeleteMonitoredItemsRequestSOPC_DeleteMonitoredItemsRequest_Create (uint32_t subscriptionId, size_t nbMonitoredItems, const uint32_t *optMonitoredItemIds)
 Creates an DeleteMonitoredItems request. More...
 
SOPC_ReturnStatus SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId (OpcUa_DeleteMonitoredItemsRequest *deleteMIrequest, size_t index, uint32_t monitoredItemId)
 Sets the monitored item identifier to delete. More...
 
OpcUa_CallRequestSOPC_CallRequest_Create (size_t nbMethodsToCalls)
 Creates a Call request for the given number of method calls. More...
 
SOPC_ReturnStatus SOPC_CallRequest_SetMethodToCall (OpcUa_CallRequest *callRequest, size_t index, const SOPC_NodeId *objectId, const SOPC_NodeId *methodId, int32_t nbOfInputArguments, const SOPC_Variant *inputArguments)
 Sets the method call parameters for the given index in the the call request. More...
 

Detailed Description

High level interface to build OPC UA request and access OPC UA response.

Note
All parameters provided to request builders are copied and might be deallocated after builder call (unless specified otherwise).
Allocated requests will be deallocated by the library after service call. Once a service called (e.g. SOPC_ServerHelper_LocalServiceSync), the request is transferred to library and shall not be accessed anymore.

Function Documentation

◆ SOPC_ReadRequest_Create()

OpcUa_ReadRequest* SOPC_ReadRequest_Create ( size_t  nbReadValues,
OpcUa_TimestampsToReturn  tsToReturn 
)

Creates a read request.

Parameters
nbReadValuesNumber of items (node, attribute, index range) to read with this read request. nbReadValue <= INT32_MAX. SOPC_ReadRequest_SetReadValueFromStrings or SOPC_ReadRequest_SetReadValue shall be called for each read value index. Otherwise empty read value is sent for the index not configured.
tsToReturnThe kind of Timestamps to be returned for each requested Variable Value Attribute
Returns
allocated read request in case of success, NULL in case of failure (invalid timestamp kind or out of memory)

◆ SOPC_ReadRequest_SetMaxAge()

SOPC_ReturnStatus SOPC_ReadRequest_SetMaxAge ( OpcUa_ReadRequest readRequest,
double  maxAge 
)

Indicates to the server of maximum age of the data it should return.

   Default value is 0 to indicate to the server to return a fresh data value if applicable,
   value >= INT32_MAX might be used to request a cached value if applicable to server data.
Parameters
readRequestThe read request to configure
maxAgeMaximum age of the value to be read in milliseconds
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid read request (NULL)

◆ SOPC_ReadRequest_SetReadValueFromStrings()

SOPC_ReturnStatus SOPC_ReadRequest_SetReadValueFromStrings ( OpcUa_ReadRequest readRequest,
size_t  index,
const char *  nodeId,
SOPC_AttributeId  attribute,
const char *  indexRange 
)

Sets the value to read at given index in read request (using C strings for node id and index range)

Parameters
readRequestThe read request to configure
indexIndex of the read value to configure in the read request. index < number of read value configured in SOPC_ReadRequest_Create
nodeIdThe id of the node to read as a C string, e.g. 'ns=1;s=MyNode'. nodeId shall not be NULL. Format is described in OPC UA specification.
attributeThe attribute to read in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid
indexRangeThe index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the read value requested it should be NULL. Format is described in OPC UA specification.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid read request, index, nodeId or attribute.

◆ SOPC_ReadRequest_SetReadValue()

SOPC_ReturnStatus SOPC_ReadRequest_SetReadValue ( OpcUa_ReadRequest readRequest,
size_t  index,
const SOPC_NodeId nodeId,
SOPC_AttributeId  attribute,
const SOPC_String indexRange 
)

Sets the value to read at given index in read request.

Parameters
readRequestThe read request to configure
indexIndex of the read value to configure in the read request. index < number of read value configured in SOPC_ReadRequest_Create
nodeIdThe id of the node to read. nodeId shall not be NULL
attributeThe attribute to read in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid
indexRangeThe index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the read value requested it should be NULL. Format is described in OPC UA specification.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid read request, index, nodeId or attribute.

◆ SOPC_ReadRequest_SetReadValueDataEncoding()

SOPC_ReturnStatus SOPC_ReadRequest_SetReadValueDataEncoding ( OpcUa_ReadRequest readRequest,
size_t  index,
const SOPC_QualifiedName dataEncoding 
)

Sets the data encoding of the value to read.

Parameters
readRequestThe read request to configure
indexIndex of the read value to configure in the read request. index < number of read value configured in SOPC_ReadRequest_Create
dataEncodingThe data encoding to use

◆ SOPC_WriteRequest_Create()

OpcUa_WriteRequest* SOPC_WriteRequest_Create ( size_t  nbWriteValues)

Creates a write request.

Parameters
nbWriteValuesNumber of items (node, attribute, index range) to write with this write request. nbWriteValue <= INT32_MAX. SOPC_WriteRequest_SetWriteValueFromStrings or SOPC_WriteRequest_SetWriteValue shall be called for each write value index. Otherwise empty write value is sent for the index not configured.
Returns
allocated write request in case of success, NULL in case of failure (out of memory)

◆ SOPC_WriteRequest_SetWriteValueFromStrings()

SOPC_ReturnStatus SOPC_WriteRequest_SetWriteValueFromStrings ( OpcUa_WriteRequest writeRequest,
size_t  index,
const char *  nodeId,
SOPC_AttributeId  attribute,
const char *  indexRange,
const SOPC_DataValue value 
)

Sets the value to write at given index in write request (using C strings for node id and index range)

Parameters
writeRequestThe write request to configure
indexIndex of the write value to configure in the write request. index < number of write value configured in SOPC_WriteRequest_Create
nodeIdThe id of the node to write as a C string, e.g. 'ns=1;s=MyNode'. nodeId shall not be NULL. Format is described in OPC UA specification.
attributeThe attribute to write in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid.
indexRangeThe index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the write value requested it should be NULL. Format is described in OPC UA specification. If the indexRange parameter is specified then the Value in value shall be an array even if only one element is being written.
valueThe value to write for given item (node, attribute, index range). value shall not be NULL
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid write request, index, nodeId, attribute or value.
Note
Only SOPC_AttributeId_Value attribute write is supported by s2opc server

◆ SOPC_WriteRequest_SetWriteValue()

SOPC_ReturnStatus SOPC_WriteRequest_SetWriteValue ( OpcUa_WriteRequest writeRequest,
size_t  index,
const SOPC_NodeId nodeId,
SOPC_AttributeId  attribute,
const SOPC_String indexRange,
const SOPC_DataValue value 
)

Sets the value to write at given index in write request.

Parameters
writeRequestThe write request to configure
indexIndex of the write value to configure in the write request. index < number of write value configured in SOPC_WriteRequest_Create
nodeIdThe id of the node to write. nodeId shall not be NULL
attributeThe attribute to write in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid.
indexRangeThe index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the write value requested it should be NULL. Format is described in OPC UA specification. If the indexRange parameter is specified then the Value in value shall be an array even if only one element is being written.
valueThe value to write for given item (node, attribute, index range). value shall not be NULL
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid write request, index, nodeId, attribute or value.
Note
Only SOPC_AttributeId_Value attribute write is supported by s2opc server

◆ SOPC_BrowseRequest_Create()

OpcUa_BrowseRequest* SOPC_BrowseRequest_Create ( size_t  nbNodesToBrowse,
size_t  maxReferencesPerNode,
const OpcUa_ViewDescription optView 
)

Enumerated result fields mask values authorized for use with SOPC_BrowseRequest_SetBrowseDescription. Those values are masks which means they might be used with OR bitwise operation to select several result fields.

Creates a browse request

Parameters
nbNodesToBrowseNumber of nodes to browse with this browse request. nbNodesToBrowse <= INT32_MAX. SOPC_BrowseRequest_SetBrowseDescriptionFromStrings or SOPC_BrowseRequest_SetBrowseDescription shall be called for each browse description index. Otherwise empty browse description is sent for the index not configured.
maxReferencesPerNodeIndicates the maximum number of references to return for each starting node specified in the request (0 means no limitation).
optView(Optional) Description of the View to browse. If no view used, it should be NULL.
Returns
allocated browse request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_BrowseRequest_SetBrowseDescriptionFromStrings()

SOPC_ReturnStatus SOPC_BrowseRequest_SetBrowseDescriptionFromStrings ( OpcUa_BrowseRequest browseRequest,
size_t  index,
const char *  nodeId,
OpcUa_BrowseDirection  browseDirection,
const char *  referenceTypeId,
bool  includeSubtypes,
OpcUa_NodeClass  nodeClassMask,
OpcUa_BrowseResultMask  resultMask 
)

Sets the node to browse at given index in browse request (using C strings for node id and reference type id)

Parameters
browseRequestThe browse request to configure
indexIndex of the browse description to configure in the browse request. index < number of nodes to browse configured in SOPC_BrowseRequest_Create
nodeIdThe id of the node to browse as a C string, e.g. 'ns=1;s=MyNode'. nodeId shall not be NULL. Format is described in OPC UA specification.
browseDirectionThe browse direction to use browseDirection shall be in the range of OpcUa_BrowseDirection.
referenceTypeIdThe node id of the reference type to browse as a C string, e.g. 'ns=0;i=35' or 'i=35'. If not specified then all References are returned and includeSubtypes is ignored. If not used for to browse this node it should be NULL. Format is described in OPC UA specification.
includeSubtypesIndicates whether subtypes of the ReferenceType should be included in the browse. If TRUE, then instances of referenceTypeId and all of its subtypes are returned.
nodeClassMaskMask specifying the node classes of the target nodes. Only TargetNodes with the selected node classes are returned. If set to zero, then all NodeClasses are returned. Value shall be a bitwise OR of OpcUa_NodeClass
resultMaskMask specifying the fields in the OpcUa_ReferenceDescription structure that should be returned. Value shall be a bitwise OR of OpcUa_BrowseResultMask
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid browse request, index, nodeId or browseDirection.

◆ SOPC_BrowseRequest_SetBrowseDescription()

SOPC_ReturnStatus SOPC_BrowseRequest_SetBrowseDescription ( OpcUa_BrowseRequest browseRequest,
size_t  index,
const SOPC_NodeId nodeId,
OpcUa_BrowseDirection  browseDirection,
const SOPC_NodeId referenceTypeId,
bool  includeSubtypes,
OpcUa_NodeClass  nodeClassMask,
OpcUa_BrowseResultMask  resultMask 
)

Sets the node to browse at given index in browse request.

Parameters
browseRequestThe browse request to configure
indexIndex of the browse description to configure in the browse request. index < number of nodes to browse configured in SOPC_BrowseRequest_Create
nodeIdThe id of the node to browse. nodeId shall not be NULL
browseDirectionThe browse direction to use browseDirection shall be in the range of OpcUa_BrowseDirection.
referenceTypeIdThe node id of the reference type to browse. If not specified then all References are returned and includeSubtypes is ignored. If not used for to browse this node it should be NULL.
includeSubtypesIndicates whether subtypes of the ReferenceType should be included in the browse. If set to true, then instances of referenceTypeId and all of its subtypes are returned.
nodeClassMaskMask specifying the node classes of the target nodes. Only TargetNodes with the selected node classes are returned. If set to zero, then all NodeClasses are returned. Value shall be a bitwise OR of OpcUa_NodeClass
resultMaskMask specifying the fields in the OpcUa_ReferenceDescription structure that should be returned. Value shall be a bitwise OR of OpcUa_BrowseResultMask
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid browse request, index, nodeId or browseDirection.

◆ SOPC_BrowseNextRequest_Create()

OpcUa_BrowseNextRequest* SOPC_BrowseNextRequest_Create ( bool  releaseContinuationPoints,
size_t  nbContinuationPoints 
)

Creates a browse next request.

BrowseNext are used to continue a Browse that had too much browse results (more than maxReferencesPerNode). The continuation points are found in the browse response. A continuation point shall be used to iterate over all the browse results. When no more browse results are available, the BrowseNext should be sent once more with the continuation points to free (set releaseContinuationPoints to true for these continuation points).

Parameters
releaseContinuationPointsIf set to true passed continuationPoints shall be reset to free resources in the Server. Otherwise the passed continuationPoints shall be used to get the next set of browse information.
nbContinuationPointsNumber of continuation points to browse with this browse next request. nbContinuationPoints <= INT32_MAX
Returns
allocated browse next request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_TranslateBrowsePathsRequest_Create()

OpcUa_TranslateBrowsePathsToNodeIdsRequest* SOPC_TranslateBrowsePathsRequest_Create ( size_t  nbTranslateBrowsePaths)

Create a translate browse paths request.

Parameters
nbTranslateBrowsePathsNumber of nodes to browse with this browse request. nbTranslateBrowsePaths <= INT32_MAX. SOPC_TranslateBrowsePathRequest_SetPathFromString or SOPC_TranslateBrowsePathRequest_SetPath shall be called for each path description index. Otherwise empty path description is sent for the index not configured.
Returns
allocated translate browse request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_TranslateBrowsePathRequest_SetPathFromString()

SOPC_ReturnStatus SOPC_TranslateBrowsePathRequest_SetPathFromString ( OpcUa_TranslateBrowsePathsToNodeIdsRequest tbpRequest,
size_t  index,
const char *  startingNodeId,
size_t  nbPathElements,
OpcUa_RelativePathElement pathElements 
)

Sets the browse path to translate at given index in translate browse paths request (using C strings for node id)

Parameters
tbpRequestThe translate browse paths request to configure
indexIndex of the browse path description to configure in the translate browse path request. index < number of browse paths configured in SOPC_TranslateBrowsePathsRequest_Create
startingNodeIdThe id of the node from which translate browse path start as a C string. E.g. 'ns=1;s=MyNode'. nodeId shall not be NULL. Format is described in OPC UA specification.
nbPathElementsThe number of elements in the path (>0).
pathElementsThe array of path elements of length nbPathElements. It might be built using SOPC_RelativePathElements_Create and shall not be NULL. The array is assigned in the translate browse path request and its memory managed with request. i.e. pathElements shall not be unallocated or used anymore.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid request, index, nodeId or path elements.

◆ SOPC_TranslateBrowsePathRequest_SetPath()

SOPC_ReturnStatus SOPC_TranslateBrowsePathRequest_SetPath ( OpcUa_TranslateBrowsePathsToNodeIdsRequest tbpRequest,
size_t  index,
SOPC_NodeId startingNodeId,
size_t  nbPathElements,
OpcUa_RelativePathElement pathElements 
)

Sets the browse path to translate at given index in translate browse paths request.

Parameters
tbpRequestThe translate browse paths request to configure
indexIndex of the browse path description to configure in the translate browse path request. index < number of browse paths configured in SOPC_TranslateBrowsePathsRequest_Create
startingNodeIdThe id of the node from which translate browse path start, nodeId shall not be NULL.
nbPathElementsThe number of elements in the path (>0).
pathElementsThe array of path elements of length nbPathElements. It might be built using SOPC_RelativePathElements_Create and shall not be NULL. The array is assigned in the translate browse path request and its memory managed with request. i.e. pathElements shall not be unallocated or used anymore.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid request, index, nodeId or path elements.

◆ SOPC_RelativePathElements_Create()

OpcUa_RelativePathElement* SOPC_RelativePathElements_Create ( size_t  nbPathElements)

Creates an array of relative path element to be used in translate browse path.

Parameters
nbPathElementsNumber of relative path elements in the array nbPathElements <= INT32_MAX. SOPC_RelativePathElements_SetPathElement shall be called for each path element description index. Otherwise empty path element description is sent for the index not configured.
Returns
allocated relative path element array in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_RelativePathElements_SetPathElement()

SOPC_ReturnStatus SOPC_RelativePathElements_SetPathElement ( OpcUa_RelativePathElement pathElementsArray,
size_t  index,
const SOPC_NodeId referenceTypeId,
bool  isInverse,
bool  includeSubtypes,
uint16_t  targetNsIndex,
const char *  targetName 
)

Sets the path element at given index in relative path element array.

Parameters
pathElementsArrayThe array of path elements to initialize
indexIndex of the path element description to configure in the array. index < number of path elements configured in SOPC_RelativePathElements_Create
referenceTypeIdThe id of a node defining the kind of reference to follow from the current node or NULL if all References are included (in this case parameter includeSubtypes is ignored).
isInverseOnly inverse references shall be followed if this value is TRUE. Only forward references shall be followed if this value is FALSE.
includeSubtypesIndicates whether subtypes of referenceTypeId shall be followed. Subtypes are included if this value is TRUE.
targetNsIndexIndex of the namespace of the expected target node
targetNameBrowseName of the expected target node
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid parameters.

◆ SOPC_BrowseNextRequest_SetContinuationPoint()

SOPC_ReturnStatus SOPC_BrowseNextRequest_SetContinuationPoint ( OpcUa_BrowseNextRequest browseNextRequest,
size_t  index,
const SOPC_ByteString continuationPoint 
)

Sets the continuation point to browse at given index in browse next request.

Parameters
browseNextRequestThe browse next request to configure
indexIndex of the continuation point to configure in the browse next request. index < number of continuation points configured in SOPC_BrowseNextRequest_Create
continuationPointThe continuation point to browse. It shall not be NULL and shall be the one returned by a received OpcUa_BrowseResult.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid browse next request, index or continuationPoint.

◆ SOPC_GetEndpointsRequest_Create()

OpcUa_GetEndpointsRequest* SOPC_GetEndpointsRequest_Create ( const char *  endpointURL)

Creates a GetEndpoint request for the given endpoint URL.

Parameters
endpointURLThe endpoint URL as C string: "opc.tcp://<hostname>:<port>[/<name>]"
Returns
allocated get endpoints request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_GetEndpointsRequest_SetPreferredLocales()

SOPC_ReturnStatus SOPC_GetEndpointsRequest_SetPreferredLocales ( OpcUa_GetEndpointsRequest getEndpointsReq,
size_t  nbLocales,
char *const *  localeIds 
)

Requests preferred locales for the endpoints to be returned by the get endpoints service (Optional) Preferred locale order is the order of localesIds array.

Parameters
getEndpointsReqThe get endpoints request to configure
nbLocalesNumber of locales in array. It shall be > 0.
localeIdsArray of preferred locale ids by order of preference. Values are copied. They shall not be NULL.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid get endpoints request or locale ids, SOPC_STATUS_INVALID_STATE in case preferred locales already set.

◆ SOPC_GetEndpointsRequest_SetProfileURIs()

SOPC_ReturnStatus SOPC_GetEndpointsRequest_SetProfileURIs ( OpcUa_GetEndpointsRequest getEndpointsReq,
size_t  nbProfiles,
char *const *  profileURIs 
)

Requests profile URIs for the endpoints to be returned by the get endpoints service (Optional) Endpoints of all transport profile types available are returned if SOPC_GetEndpointsRequest_SetProfileURIs unused.

Parameters
getEndpointsReqThe get endpoints request to configure
nbProfilesNumber of profile URIs in array. It shall be > 0.
profileURIsArray of transport profile URIs to be returned by GetEndpoints service. Values shall not be NULL. E.g. "http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary", other possible values are described in Transport category of OPC UA specification.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid get endpoints request or profiles URI (invalid number or NULL value), SOPC_STATUS_INVALID_STATE in case profile URIs already set.

◆ SOPC_RegisterServer2Request_CreateFromServerConfiguration()

OpcUa_RegisterServer2Request* SOPC_RegisterServer2Request_CreateFromServerConfiguration ( void  )

Creates a complete RegisterServer2 request from the current server configuration. It shall be used to register the current server for FindServer and FindServerOnNetwork services.

Returns
allocated register server 2 request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_AddNodesRequest_Create()

OpcUa_AddNodesRequest* SOPC_AddNodesRequest_Create ( size_t  nbAddNodes)

Creates an add nodes request.

Parameters
nbAddNodesNumber of nodes to add with this request. nbAddNodes <= INT32_MAX. SOPC_AddNodeRequest_SetVariableAttributes shall be called for each add node item index. Otherwise empty add node item is sent for the index not configured.
Returns
allocated read request in case of success, NULL in case of failure (out of memory)

◆ SOPC_AddNodeRequest_SetVariableAttributes()

SOPC_ReturnStatus SOPC_AddNodeRequest_SetVariableAttributes ( OpcUa_AddNodesRequest addNodesRequest,
size_t  index,
const SOPC_ExpandedNodeId parentNodeId,
const SOPC_NodeId referenceTypeId,
const SOPC_ExpandedNodeId optRequestedNodeId,
const SOPC_QualifiedName browseName,
const SOPC_ExpandedNodeId typeDefinition,
const SOPC_LocalizedText optDisplayName,
const SOPC_LocalizedText optDescription,
const uint32_t *  optWriteMask,
const uint32_t *  optUserWriteMask,
const SOPC_Variant optValue,
const SOPC_NodeId optDataType,
const int32_t *  optValueRank,
int32_t  noOfArrayDimensions,
const uint32_t *  optArrayDimensions,
const SOPC_Byte optAccessLevel,
const SOPC_Byte optUserAccessLevel,
const double *  optMinimumSamplingInterval,
SOPC_Boolean optHistorizing 
)

Sets the attributes values requested for the Variable node to add. Optional parameters are prefixed by "opt" and shall be NULL if not defined. If optional parameters are not defined the server will choose values for this attributes.

Parameters
addNodesRequestThe add nodes request to configure.
indexIndex of the add nodes items to configure in the request. index < number of add nodes configured in SOPC_AddNodesRequest_Create.
parentNodeIdParent NodeId of the node to add, it should be an Object or Variable node.
referenceTypeIdReference type of the relation between parent node and added node.
optRequestedNodeIdRequested NodeId for the node to add (optional).
browseNameBrowseName for the node to add, it should be unique in the parent node context.
typeDefinitionTypeDefinition for the Variable node to add (BaseDataVariableType, PropertyType, etc.).
optDisplayNameDisplayName for the node to add (optional).
optDescriptionDescription for the node to add (optional).
optWriteMaskWriteMask for the node to add (optional).
optUserWriteMaskUserWriteMask for the node to add (optional). It should not be defined since it depends on the user.
optValueValue for the Variable node to add (optional).
optDataTypeDataType for the Variable node to add (optional).
optValueRankValueRank for the Variable node to add (optional).
noOfArrayDimensionsNumber of array dimensions for the Value of Variable node to add, if optArrayDimensions not defined it shall be 0.
optArrayDimensionsArray of dimensions for the Value of Variable node to add (optional). If defined noOfArrayDimensions shall be greater than 0.
optAccessLevelAccessLevel for the Value of Variable node to add (optional).
optUserAccessLevelUserAccessLevel for the Value of Variable node to add (optional). It should not be defined since it depends on the user.
optMinimumSamplingIntervalMinimumSamplingInterval (ms) for the Value of Variable node in a subscription (optional)
optHistorizingHistorizing flag for the Value of Variable node (optional).
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid read request, index, nodeId or attribute.

◆ SOPC_CreateSubscriptionRequest_CreateDefault()

OpcUa_CreateSubscriptionRequest* SOPC_CreateSubscriptionRequest_CreateDefault ( void  )

Creates a CreateSubscription request with default parameters values Default parameters are the following:

  • RequestedPublishingInterval = 500 ms
  • RequestedLifetimeCount = 10 cycles
  • RequestedMaxKeepAliveCount = 3 cycles
  • MaxNotificationsPerPublish = 1000 elements
  • PublishingEnabled = true
  • Priority = 0
Returns
allocated CreateSubscription request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_CreateSubscriptionRequest_Create()

OpcUa_CreateSubscriptionRequest* SOPC_CreateSubscriptionRequest_Create ( double  reqPublishingInterval,
uint32_t  reqLifetimeCount,
uint32_t  reqMaxKeepAliveCount,
uint32_t  maxNotifPerPublish,
SOPC_Boolean  publishingEnabled,
SOPC_Byte  priority 
)

Creates a CreateSubscription request with given parameters values.

Parameters
reqPublishingIntervalRequested publishing interval in milliseconds
reqLifetimeCountRequested lifetime count for the subscription (number of publishing cycles). When the subscription publishing cycle expired this count of times without Publish token available the subscription is deleted by the server. It shall be at least 3 times reqMaxKeepAliveCount
reqMaxKeepAliveCountRequested max keep alive count for the subscription (number of publishing cycles). When the subscription publishing cycle expired this count of times without notification to send, the server sends a keep alive Publish response. reqLifetimeCount shall be at least 3 times this value.
maxNotifPerPublishMaximum number of notifications sent in a Publish response.
publishingEnabledtrue to enable publishing for the subscription, false to activate it later (requires a OpcUa_SetPublishingModeRequest to enable publishing later).
priorityPriority of the subscription (0 means not special priority).
Returns
allocated CreateSubscription request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_CreateMonitoredItemsRequest_CreateDefault()

OpcUa_CreateMonitoredItemsRequest* SOPC_CreateMonitoredItemsRequest_CreateDefault ( uint32_t  subscriptionId,
size_t  nbMonitoredItems,
const SOPC_NodeId nodeIdsToMonitor,
OpcUa_TimestampsToReturn  ts 
)

Creates a CreateMonitoredItems request for the given node ids with default parameters values:

  • Monitored item identification: attribute Value and no index range
  • Monitoring parameters:
    • mode = reporting
    • sampling interval = -1 (same as publishing interval for data change monitoring)
    • queue size = 100
    • discard oldest = true
Parameters
subscriptionIdThe identifier of the subscription for which monitored items will be created or 0 if set automatically by client wrapper API. It will be set automatically if it used with SOPC_ClientHelperNew_Subscription_CreateMonitoredItems. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously.
nbMonitoredItemsNumber of monitored items to create
nodeIdsToMonitorArray of node ids to monitor (for attribute Value by default)
tsDefine the timestamps (source, server) to be returned for any monitored item.

◆ SOPC_CreateMonitoredItemsRequest_CreateDefaultFromStrings()

OpcUa_CreateMonitoredItemsRequest* SOPC_CreateMonitoredItemsRequest_CreateDefaultFromStrings ( uint32_t  subscriptionId,
size_t  nbMonitoredItems,
char *const *  nodeIdsToMonitor,
OpcUa_TimestampsToReturn  ts 
)

Creates a CreateMonitoredItems request for the given node ids C strings with default parameters values:

  • Monitored item identification: attribute Value and no index range
  • Monitoring parameters:
    • mode = reporting
    • sampling interval = -1 (same as publishing interval for data change monitoring)
    • queue size = 100
    • discard oldest = true
Parameters
subscriptionIdThe identifier of the subscription for which monitored items will be created or 0 if set automatically by client wrapper API. It will be set automatically if it used with SOPC_ClientHelperNew_Subscription_CreateMonitoredItems. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously.
nbMonitoredItemsNumber of monitored items to create
nodeIdsToMonitorArray of node ids as C string to monitor (for attribute Value by default). E.g. ['ns=1;s=MyNode']. Format is described in OPC UA specification.
tsDefine the timestamps (source, server) to be returned for any monitored item.

◆ SOPC_CreateMonitoredItemsRequest_Create()

OpcUa_CreateMonitoredItemsRequest* SOPC_CreateMonitoredItemsRequest_Create ( uint32_t  subscriptionId,
size_t  nbMonitoredItems,
OpcUa_TimestampsToReturn  ts 
)

Creates a CreateMonitoredItems request.

Parameters
subscriptionIdThe identifier of the subscription for which monitored items will be created or 0 if set automatically by client wrapper API. It will be set automatically if it used with SOPC_ClientHelperNew_Subscription_CreateMonitoredItems. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously.
nbMonitoredItemsNumber of MonitoredItem to create with the request. nbMonitoredItems <= INT32_MAX. SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams shall be called for each monitored item index.
tsSet the timestamps (source, server) to be returned for any monitored item.
Returns
allocated CreateMonitoredItems request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_CreateMonitoredItemsRequest_SetMonitoredItemId()

SOPC_ReturnStatus SOPC_CreateMonitoredItemsRequest_SetMonitoredItemId ( OpcUa_CreateMonitoredItemsRequest createMIrequest,
size_t  index,
const SOPC_NodeId nodeId,
SOPC_AttributeId  attribute,
const SOPC_String indexRange 
)

Sets the monitored item identification parameters. It should be completed by a call to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams for the same index to configure monitoring parameters. Otherwise default parameter values are applied:

  • Monitoring parameters:
    • mode = reporting
    • sampling interval = -1 (same as publishing interval for data change monitoring)
    • queue size = 100
    • discard oldest = true
Parameters
createMIrequestThe create monitored item request to configure
indexIndex of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_CreateMonitoredItemsRequest_Create
nodeIdThe id of the node to monitor. nodeId shall not be NULL
attributeThe attribute to monitor in the node (usually SOPC_AttributeId_Value). attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid.
indexRangeThe index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the monitored item it should be NULL. Format is described in OPC UA specification.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid request, index, nodeId or attribute.

◆ SOPC_CreateMonitoredItemsRequest_SetMonitoredItemIdFromStrings()

SOPC_ReturnStatus SOPC_CreateMonitoredItemsRequest_SetMonitoredItemIdFromStrings ( OpcUa_CreateMonitoredItemsRequest createMIrequest,
size_t  index,
const char *  nodeId,
SOPC_AttributeId  attribute,
const char *  indexRange 
)

Sets the monitored item identification parameters using C string parameters. It shall be completed by a call to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams for the same index to configure monitoring parameters. Otherwise default parameter values are applied:

  • Monitoring parameters:
    • mode = reporting
    • sampling interval = -1 (same as publishing interval for data change monitoring)
    • queue size = 100
    • discard oldest = true
Parameters
createMIrequestThe create monitored item request to configure
indexIndex of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_CreateMonitoredItemsRequest_Create
nodeIdThe id of the node to monitor as a C string, e.g. 'ns=1;s=MyNode'. nodeId shall not be NULL. Format is described in OPC UA specification.
attributeThe attribute to monitor in the node (usually SOPC_AttributeId_Value). attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid.
indexRangeThe index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the monitored item requested it should be NULL. Format is described in OPC UA specification.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid request, index, nodeId or attribute.

◆ SOPC_MonitoredItem_DataChangeFilter()

SOPC_ExtensionObject* SOPC_MonitoredItem_DataChangeFilter ( OpcUa_DataChangeTrigger  trigger,
OpcUa_DeadbandType  deadbandType,
double  deadbandValue 
)

Creates and allocates a DataChangeFilter filter parameter to be provided to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams. See part 4 §7.17.2 for detailed DataChangeFilter documentation.

Parameters
triggerThe condition on which a data change notification is triggered: Status, Status & Value or Status, Value and Timestamp.
deadbandTypeThe deadband type Absolute, Percent or None if no deadband shall be used.
deadbandValueThe deadband value to apply on Value change and for the deadband type (Absolute, Percent)
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid parameters.

◆ SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams()

SOPC_ReturnStatus SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams ( OpcUa_CreateMonitoredItemsRequest createMIrequest,
size_t  index,
OpcUa_MonitoringMode  monitoringMode,
uint32_t  clientHandle,
double  samplingInterval,
SOPC_ExtensionObject optFilter,
uint32_t  queueSize,
SOPC_Boolean  discardOldest 
)

Sets the monitored item monitoring parameters. It shall be completed by a call to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemId for the same index to configure monitored item identification. See part 4 §7.16 for detailed MonitoringParameters documentation.

Parameters
createMIrequestThe create monitored item request to configure
indexIndex of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_CreateMonitoredItemsRequest_Create
monitoringModeThe monitoring mode to use: disabled, sampling, reporting (default mode to be used)
clientHandleClient-supplied id of the MonitoredItem, it will be provided in Notifications of the OpcUa_PublishResponse messages received. This parameter will be IGNORED when createMIrequest is used with SOPC_ClientHelperNew_Subscription_CreateMonitoredItems.
samplingIntervalThe interval defines the sampling interval for the monitored item. The value 0 indicates that the Server should use the fastest practical rate or is based on an exception-based model. The value -1 indicates that the default sampling interval defined by the publishing interval of the subscription is requested.
optFilter(optional) A filter used by the Server to determine if the MonitoredItem should generate a notification. SOPC_MonitoredItem_DataChangeFilter should be used to create a DataChangeFilter. If not used, this parameter is null. If not null the filter memory is managed by the function after call.
queueSizeThe requested size of the monitored item queue.
discardOldestIf set to true the oldest notification is discarded when the queue is full, otherwise the last notification is discarded when the queue is full.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid parameters.
Note
Only exception-based model (see samplingInterval) and DataChangeFilter filter are supported by s2opc server

◆ SOPC_ModifyMonitoredItemsRequest_Create()

OpcUa_ModifyMonitoredItemsRequest* SOPC_ModifyMonitoredItemsRequest_Create ( uint32_t  subscriptionId,
size_t  nbMonitoredItems,
OpcUa_TimestampsToReturn  ts 
)

Creates a ModifyMonitoredItems request.

Parameters
subscriptionIdThe identifier of the subscription for which monitored items will be created or 0 if set automatically by client wrapper API. It will be set automatically if it used with SOPC_ClientHelperNew_Subscription_SyncService or SOPC_ClientHelperNew_Subscription_AsyncService. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously.
nbMonitoredItemsNumber of MonitoredItem to modify with the request. nbMonitoredItems <= INT32_MAX. SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams shall be called for each monitored item index.
tsSet the timestamps (source, server) to be returned for any monitored item.
Returns
allocated ModifyMonitoredItems request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_ModifyMonitoredItemsRequest_SetMonitoredItemParams()

SOPC_ReturnStatus SOPC_ModifyMonitoredItemsRequest_SetMonitoredItemParams ( OpcUa_ModifyMonitoredItemsRequest modifyMIrequest,
size_t  index,
uint32_t  monitoredItemId,
uint32_t  clientHandle,
double  samplingInterval,
SOPC_ExtensionObject optFilter,
uint32_t  queueSize,
SOPC_Boolean  discardOldest 
)

Sets the monitored item monitoring parameters to modify. See part 4 §7.16 for detailed MonitoringParameters documentation.

Parameters
modifyMIrequestThe modify monitored item request to configure
indexIndex of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_ModifyMonitoredItemsRequest_Create
monitoredItemIdThe monitored item identifier returned in the OpcUa_CreateMonitoredItemsResponse.
clientHandleClient-supplied id of the MonitoredItem, it will be provided in Notifications of the OpcUa_PublishResponse messages received.
samplingIntervalThe interval defines the sampling interval for the monitored item. The value 0 indicates that the Server should use the fastest practical rate or is based on an exception-based model. The value -1 indicates that the default sampling interval defined by the publishing interval of the subscription is requested.
optFilter(optional) A filter used by the Server to determine if the MonitoredItem should generate a notification. SOPC_MonitoredItem_DataChangeFilter should be used to create a DataChangeFilter. If not used, this parameter is null. If not null the filter memory is managed by the function after call.
queueSizeThe requested size of the monitored item queue.
discardOldestIf set to true the oldest notification is discarded when the queue is full, otherwise the last notification is discarded when the queue is full.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid parameters.
Note
Only exception-based model (see samplingInterval) and DataChangeFilter filter are supported by s2opc server

◆ SOPC_DeleteMonitoredItemsRequest_Create()

OpcUa_DeleteMonitoredItemsRequest* SOPC_DeleteMonitoredItemsRequest_Create ( uint32_t  subscriptionId,
size_t  nbMonitoredItems,
const uint32_t *  optMonitoredItemIds 
)

Creates an DeleteMonitoredItems request.

Parameters
subscriptionIdThe identifier of the subscription for which monitored items will be created or 0 if set automatically by client wrapper API. It will be set automatically if it used with SOPC_ClientHelperNew_Subscription_SyncService or SOPC_ClientHelperNew_Subscription_AsyncService. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously.
nbMonitoredItemsNumber of MonitoredItem to delete with the request. nbMonitoredItems <= INT32_MAX. SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams shall be called for each monitored item index.
optMonitoredItemIds(optional) Pointer to the array of monitored item ids to delete. If it is NULL, the id of each monitored item shall be provided using SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId.
Returns
allocated DeleteMonitoredItems request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId()

SOPC_ReturnStatus SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId ( OpcUa_DeleteMonitoredItemsRequest deleteMIrequest,
size_t  index,
uint32_t  monitoredItemId 
)

Sets the monitored item identifier to delete.

Parameters
deleteMIrequestThe delete monitored item request to configure
indexIndex of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_DeleteMonitoredItemsRequest_Create
monitoredItemIdThe MonitoredItem id to delete
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid parameters.

◆ SOPC_CallRequest_Create()

OpcUa_CallRequest* SOPC_CallRequest_Create ( size_t  nbMethodsToCalls)

Creates a Call request for the given number of method calls.

Parameters
nbMethodsToCallsNumber of method calls to create with the request. nbMethodsToCalls <= INT32_MAX. SOPC_CallRequest_SetMethodToCall shall be called for each method call index.
Returns
allocated Call request in case of success, NULL in case of failure (invalid parameters or out of memory)

◆ SOPC_CallRequest_SetMethodToCall()

SOPC_ReturnStatus SOPC_CallRequest_SetMethodToCall ( OpcUa_CallRequest callRequest,
size_t  index,
const SOPC_NodeId objectId,
const SOPC_NodeId methodId,
int32_t  nbOfInputArguments,
const SOPC_Variant inputArguments 
)

Sets the method call parameters for the given index in the the call request.

Parameters
callRequestThe call request to configure
indexIndex of the method call to configure in the request. index < number of method calls configured in SOPC_CallRequest_Create
objectIdThe nodeId of the object node on which method call will be executed. objectId shall not be NULL
methodIdThe nodeId of the method node to execute (it might be object's method node instance or method node of its ObjectType). methodId shall not be NULL
nbOfInputArgumentsThe number of input arguments provided as a Variant array in inputArguments . It shall be compliant with the number of arguments expected by the method methodId .
inputArgumentsThe Variant array containing the nbOfInputArguments input arguments for the method call.
Returns
SOPC_STATUS_OK in case of success, SOPC_STATUS_INVALID_PARAMETERS in case of invalid request, index, nodeId or number of input arguments.