S2OPC OPCUA Toolkit
|
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_ReadRequest * | SOPC_ReadRequest_Create (size_t nbReadValues, OpcUa_TimestampsToReturn tsToReturn) |
Creates a read request. | |
SOPC_ReturnStatus | SOPC_ReadRequest_SetMaxAge (OpcUa_ReadRequest *readRequest, double maxAge) |
Indicates to the server of maximum age of the data it should return. | |
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) | |
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. | |
SOPC_ReturnStatus | SOPC_ReadRequest_SetReadValueDataEncoding (OpcUa_ReadRequest *readRequest, size_t index, const SOPC_QualifiedName *dataEncoding) |
Sets the data encoding of the value to read. | |
OpcUa_WriteRequest * | SOPC_WriteRequest_Create (size_t nbWriteValues) |
Creates a write request. | |
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) | |
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. | |
OpcUa_BrowseRequest * | SOPC_BrowseRequest_Create (size_t nbNodesToBrowse, size_t maxReferencesPerNode, const OpcUa_ViewDescription *optView) |
Creates a browse request. | |
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) | |
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. | |
OpcUa_BrowseNextRequest * | SOPC_BrowseNextRequest_Create (bool releaseContinuationPoints, size_t nbContinuationPoints) |
Creates a browse next request. | |
OpcUa_TranslateBrowsePathsToNodeIdsRequest * | SOPC_TranslateBrowsePathsRequest_Create (size_t nbTranslateBrowsePaths) |
Creates a translate browse paths request. | |
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) | |
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. | |
OpcUa_RelativePathElement * | SOPC_RelativePathElements_Create (size_t nbPathElements) |
Creates an array of relative path element to be used in translate browse path. | |
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. | |
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. | |
OpcUa_GetEndpointsRequest * | SOPC_GetEndpointsRequest_Create (const char *endpointURL) |
Creates a GetEndpoint request for the given endpoint URL. | |
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. | |
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. | |
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. | |
OpcUa_AddNodesRequest * | SOPC_AddNodesRequest_Create (size_t nbAddNodes) |
Creates an add nodes request. | |
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. | |
OpcUa_CreateSubscriptionRequest * | SOPC_CreateSubscriptionRequest_CreateDefault (void) |
Creates a CreateSubscription request with default parameters values Default parameters are the following: | |
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. | |
OpcUa_CreateMonitoredItemsRequest * | SOPC_CreateMonitoredItemsRequest_CreateDefault (const 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: | |
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: | |
OpcUa_CreateMonitoredItemsRequest * | SOPC_CreateMonitoredItemsRequest_Create (uint32_t subscriptionId, size_t nbMonitoredItems, OpcUa_TimestampsToReturn ts) |
Creates a CreateMonitoredItems request. | |
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: | |
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: | |
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 (v1.04) §7.17.2 for detailed DataChangeFilter documentation. | |
OpcUa_EventFilter * | SOPC_MonitoredItem_CreateEventFilter (size_t noOfSelectClauses, size_t noOfWhereClauseElt) |
Creates and allocates a EventFilter filter parameter. | |
SOPC_ReturnStatus | SOPC_EventFilter_SetOfTypeWhereClause (OpcUa_EventFilter *eventFilter, size_t whereClauseEltIdx, const SOPC_NodeId *typeNodeId) |
Sets an OfType operator where clause element with the given type id. | |
SOPC_ReturnStatus | SOPC_EventFilter_SetGenericWhereClause (OpcUa_EventFilter *eventFilter, size_t whereClauseEltIdx, OpcUa_ContentFilterElement **filterElt) |
Sets a generic content filter element for the given where clause element index. | |
SOPC_ReturnStatus | SOPC_EventFilter_SetSelectClause (OpcUa_EventFilter *eventFilter, size_t selectClauseIdx, const SOPC_NodeId *typeId, size_t noOfBrowsePath, const SOPC_QualifiedName *browsePaths, SOPC_AttributeId attributeId, const SOPC_String *indexRange) |
Sets select clause parameters for given select clause index. | |
SOPC_ReturnStatus | SOPC_EventFilter_SetSelectClauseFromStringPath (OpcUa_EventFilter *eventFilter, size_t selectClauseIdx, const char *typeId, char qnPathSep, const char *strQnPath, SOPC_AttributeId attributeId, const char *indexRange) |
Sets select clause parameters for given select clause index. | |
SOPC_ExtensionObject * | SOPC_MonitoredItem_EventFilter (OpcUa_EventFilter *eventFilterObj) |
Packages a built event filter into an extension object to be provided as filter to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams function. | |
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 (v1.04) §7.16 for detailed MonitoringParameters documentation. | |
OpcUa_ModifyMonitoredItemsRequest * | SOPC_ModifyMonitoredItemsRequest_Create (uint32_t subscriptionId, size_t nbMonitoredItems, OpcUa_TimestampsToReturn ts) |
Creates a ModifyMonitoredItems request. | |
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. | |
OpcUa_DeleteMonitoredItemsRequest * | SOPC_DeleteMonitoredItemsRequest_Create (uint32_t subscriptionId, size_t nbMonitoredItems, const uint32_t *optMonitoredItemIds) |
Creates an DeleteMonitoredItems request. | |
SOPC_ReturnStatus | SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId (OpcUa_DeleteMonitoredItemsRequest *deleteMIrequest, size_t index, uint32_t monitoredItemId) |
Sets the monitored item identifier to delete. | |
OpcUa_CallRequest * | SOPC_CallRequest_Create (size_t nbMethodsToCalls) |
Creates a Call request for the given number of method calls. | |
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. | |
SOPC_ReturnStatus | SOPC_CallRequest_SetMethodToCallFromStrings (OpcUa_CallRequest *callRequest, size_t index, const char *objectId, const char *methodId, int32_t nbOfInputArguments, const SOPC_Variant *inputArguments) |
Sets the method call parameters for the given index in the the call request. | |
High level interface to build OPC UA request and access OPC UA response.
OpcUa_ReadRequest * SOPC_ReadRequest_Create | ( | size_t | nbReadValues, |
OpcUa_TimestampsToReturn | tsToReturn ) |
Creates a read request.
nbReadValues | Number 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. |
tsToReturn | The kind of Timestamps to be returned for each requested Variable Value Attribute |
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.
readRequest | The read request to configure |
maxAge | Maximum age of the value to be read in milliseconds |
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)
readRequest | The read request to configure |
index | Index of the read value to configure in the read request. index < number of read value configured in SOPC_ReadRequest_Create |
nodeId | The 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. |
attribute | The attribute to read in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid |
indexRange | The 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. |
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.
readRequest | The read request to configure |
index | Index of the read value to configure in the read request. index < number of read value configured in SOPC_ReadRequest_Create |
nodeId | The id of the node to read. nodeId shall not be NULL |
attribute | The attribute to read in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid |
indexRange | The 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. |
SOPC_ReturnStatus SOPC_ReadRequest_SetReadValueDataEncoding | ( | OpcUa_ReadRequest * | readRequest, |
size_t | index, | ||
const SOPC_QualifiedName * | dataEncoding ) |
Sets the data encoding of the value to read.
readRequest | The read request to configure |
index | Index of the read value to configure in the read request. index < number of read value configured in SOPC_ReadRequest_Create |
dataEncoding | The data encoding to use |
OpcUa_WriteRequest * SOPC_WriteRequest_Create | ( | size_t | nbWriteValues | ) |
Creates a write request.
nbWriteValues | Number 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. |
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)
writeRequest | The write request to configure |
index | Index of the write value to configure in the write request. index < number of write value configured in SOPC_WriteRequest_Create |
nodeId | The 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. |
attribute | The attribute to write in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid. |
indexRange | The 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. |
value | The value to write for given item (node, attribute, index range). value shall not be NULL |
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.
writeRequest | The write request to configure |
index | Index of the write value to configure in the write request. index < number of write value configured in SOPC_WriteRequest_Create |
nodeId | The id of the node to write. nodeId shall not be NULL |
attribute | The attribute to write in the node. attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid. |
indexRange | The 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. |
value | The value to write for given item (node, attribute, index range). value shall not be NULL |
OpcUa_BrowseRequest * SOPC_BrowseRequest_Create | ( | size_t | nbNodesToBrowse, |
size_t | maxReferencesPerNode, | ||
const OpcUa_ViewDescription * | optView ) |
Creates a browse request.
nbNodesToBrowse | Number 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. |
maxReferencesPerNode | Indicates 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. |
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)
browseRequest | The browse request to configure |
index | Index of the browse description to configure in the browse request. index < number of nodes to browse configured in SOPC_BrowseRequest_Create |
nodeId | The 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. |
browseDirection | The browse direction to use browseDirection shall be in the range of OpcUa_BrowseDirection. |
referenceTypeId | The 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. |
includeSubtypes | Indicates whether subtypes of the ReferenceType should be included in the browse. If TRUE, then instances of referenceTypeId and all of its subtypes are returned. |
nodeClassMask | Mask 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 |
resultMask | Mask specifying the fields in the OpcUa_ReferenceDescription structure that should be returned. Value shall be a bitwise OR of OpcUa_BrowseResultMask |
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.
browseRequest | The browse request to configure |
index | Index of the browse description to configure in the browse request. index < number of nodes to browse configured in SOPC_BrowseRequest_Create |
nodeId | The id of the node to browse. nodeId shall not be NULL |
browseDirection | The browse direction to use browseDirection shall be in the range of OpcUa_BrowseDirection. |
referenceTypeId | The 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. |
includeSubtypes | Indicates 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. |
nodeClassMask | Mask 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 |
resultMask | Mask specifying the fields in the OpcUa_ReferenceDescription structure that should be returned. Value shall be a bitwise OR of OpcUa_BrowseResultMask |
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).
releaseContinuationPoints | If 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. |
nbContinuationPoints | Number of continuation points to browse with this browse next request. nbContinuationPoints <= INT32_MAX |
OpcUa_TranslateBrowsePathsToNodeIdsRequest * SOPC_TranslateBrowsePathsRequest_Create | ( | size_t | nbTranslateBrowsePaths | ) |
Creates a translate browse paths request.
nbTranslateBrowsePaths | Number 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. |
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)
tbpRequest | The translate browse paths request to configure |
index | Index of the browse path description to configure in the translate browse path request. index < number of browse paths configured in SOPC_TranslateBrowsePathsRequest_Create |
startingNodeId | The 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. |
nbPathElements | The number of elements in the path (>0). |
pathElements | The 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. |
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.
tbpRequest | The translate browse paths request to configure |
index | Index of the browse path description to configure in the translate browse path request. index < number of browse paths configured in SOPC_TranslateBrowsePathsRequest_Create |
startingNodeId | The id of the node from which translate browse path start, nodeId shall not be NULL. |
nbPathElements | The number of elements in the path (>0). |
pathElements | The 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. |
OpcUa_RelativePathElement * SOPC_RelativePathElements_Create | ( | size_t | nbPathElements | ) |
Creates an array of relative path element to be used in translate browse path.
nbPathElements | Number 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. |
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.
pathElementsArray | The array of path elements to initialize |
index | Index of the path element description to configure in the array. index < number of path elements configured in SOPC_RelativePathElements_Create |
referenceTypeId | The 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). |
isInverse | Only inverse references shall be followed if this value is TRUE. Only forward references shall be followed if this value is FALSE. |
includeSubtypes | Indicates whether subtypes of referenceTypeId shall be followed. Subtypes are included if this value is TRUE. |
targetNsIndex | Index of the namespace of the expected target node |
targetName | BrowseName of the expected target node |
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.
browseNextRequest | The browse next request to configure |
index | Index of the continuation point to configure in the browse next request. index < number of continuation points configured in SOPC_BrowseNextRequest_Create |
continuationPoint | The continuation point to browse. It shall not be NULL and shall be the one returned by a received OpcUa_BrowseResult. |
OpcUa_GetEndpointsRequest * SOPC_GetEndpointsRequest_Create | ( | const char * | endpointURL | ) |
Creates a GetEndpoint request for the given endpoint URL.
endpointURL | The endpoint URL as C string: "opc.tcp://<hostname>:<port>[/<name>]" |
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.
getEndpointsReq | The get endpoints request to configure |
nbLocales | Number of locales in array. It shall be > 0. |
localeIds | Array of preferred locale ids by order of preference. Values are copied. They shall not be NULL. |
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.
getEndpointsReq | The get endpoints request to configure |
nbProfiles | Number of profile URIs in array. It shall be > 0. |
profileURIs | Array 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. |
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.
OpcUa_AddNodesRequest * SOPC_AddNodesRequest_Create | ( | size_t | nbAddNodes | ) |
Creates an add nodes request.
nbAddNodes | Number 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. |
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.
addNodesRequest | The add nodes request to configure. |
index | Index of the add nodes items to configure in the request. index < number of add nodes configured in SOPC_AddNodesRequest_Create. |
parentNodeId | Parent NodeId of the node to add, it should be an Object or Variable node. |
referenceTypeId | Reference type of the relation between parent node and added node. |
optRequestedNodeId | Requested NodeId for the node to add (optional). |
browseName | BrowseName for the node to add, it should be unique in the parent node context. |
typeDefinition | TypeDefinition for the Variable node to add (BaseDataVariableType, PropertyType, etc.). |
optDisplayName | DisplayName for the node to add (optional). |
optDescription | Description for the node to add (optional). |
optWriteMask | WriteMask for the node to add (optional). |
optUserWriteMask | UserWriteMask for the node to add (optional). It should not be defined since it depends on the user. |
optValue | Value for the Variable node to add (optional). |
optDataType | DataType for the Variable node to add (optional). |
optValueRank | ValueRank for the Variable node to add (optional). |
noOfArrayDimensions | Number of array dimensions for the Value of Variable node to add, if optArrayDimensions not defined it shall be 0. |
optArrayDimensions | Array of dimensions for the Value of Variable node to add (optional). If defined noOfArrayDimensions shall be greater than 0. |
optAccessLevel | AccessLevel for the Value of Variable node to add (optional). |
optUserAccessLevel | UserAccessLevel for the Value of Variable node to add (optional). It should not be defined since it depends on the user. |
optMinimumSamplingInterval | MinimumSamplingInterval (ms) for the Value of Variable node in a subscription (optional) |
optHistorizing | Historizing flag for the Value of Variable node (optional). |
OpcUa_CreateSubscriptionRequest * SOPC_CreateSubscriptionRequest_CreateDefault | ( | void | ) |
Creates a CreateSubscription request with default parameters values Default parameters are the following:
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.
reqPublishingInterval | Requested publishing interval in milliseconds |
reqLifetimeCount | Requested 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 |
reqMaxKeepAliveCount | Requested 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. |
maxNotifPerPublish | Maximum number of notifications sent in a Publish response. |
publishingEnabled | true to enable publishing for the subscription, false to activate it later (requires a OpcUa_SetPublishingModeRequest to enable publishing later). |
priority | Priority of the subscription (0 means not special priority). |
OpcUa_CreateMonitoredItemsRequest * SOPC_CreateMonitoredItemsRequest_CreateDefault | ( | const 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:
subscriptionId | The 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_ClientHelper_Subscription_CreateMonitoredItems. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously. |
nbMonitoredItems | Number of monitored items to create |
nodeIdsToMonitor | Array of node ids to monitor (for attribute Value by default) |
ts | Define the timestamps (source, server) to be returned for any monitored item. |
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:
subscriptionId | The 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_ClientHelper_Subscription_CreateMonitoredItems. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously. |
nbMonitoredItems | Number of monitored items to create |
nodeIdsToMonitor | Array 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. |
ts | Define the timestamps (source, server) to be returned for any monitored item. |
OpcUa_CreateMonitoredItemsRequest * SOPC_CreateMonitoredItemsRequest_Create | ( | uint32_t | subscriptionId, |
size_t | nbMonitoredItems, | ||
OpcUa_TimestampsToReturn | ts ) |
Creates a CreateMonitoredItems request.
subscriptionId | The 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_ClientHelper_Subscription_CreateMonitoredItems. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously. |
nbMonitoredItems | Number of MonitoredItem to create with the request. nbMonitoredItems <= INT32_MAX. SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams shall be called for each monitored item index. |
ts | Set the timestamps (source, server) to be returned for any monitored item. |
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:
createMIrequest | The create monitored item request to configure |
index | Index of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_CreateMonitoredItemsRequest_Create |
nodeId | The id of the node to monitor. nodeId shall not be NULL |
attribute | The attribute to monitor in the node (usually SOPC_AttributeId_Value for data monitoring). attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid. For event monitoring SOPC_AttributeId_EventNotifier shall be used and OpcUa_EventFilter shall be provided to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams. |
indexRange | The 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. |
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:
createMIrequest | The create monitored item request to configure |
index | Index of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_CreateMonitoredItemsRequest_Create |
nodeId | The 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. |
attribute | The attribute to monitor in the node (usually SOPC_AttributeId_Value). attribute shall be in the range of SOPC_AttributeId and not SOPC_AttributeId_Invalid. |
indexRange | The 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. |
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 (v1.04) §7.17.2 for detailed DataChangeFilter documentation.
trigger | The condition on which a data change notification is triggered: Status, Status & Value or Status, Value and Timestamp. |
deadbandType | The deadband type Absolute, Percent or None if no deadband shall be used. |
deadbandValue | The deadband value to apply on Value change and for the deadband type (Absolute, Percent) |
OpcUa_EventFilter * SOPC_MonitoredItem_CreateEventFilter | ( | size_t | noOfSelectClauses, |
size_t | noOfWhereClauseElt ) |
Creates and allocates a EventFilter filter parameter.
It shall be filled using ::SOPC_EventFilter_SetOfTypeWhereClause or ::SOPC_EventFilter_SetGenericWhereClause if where clause is not empty. Then it shall be filled using ::SOPC_EventFilter_SetSelectClause or ::SOPC_EventFilter_SetSelectClauseFromStringPath for each select clause. Finally it shall be packaged into an extension object with ::SOPC_MonitoredItem_EventFilter and finally configured with ::SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams. See part 4 (v1.04) §7.17.3 for detailed EventFilter documentation.
noOfSelectClauses | The number of select clauses in the event filter (> 0) |
noOfWhereClauseElt | The number of where clause elements in the event filter (>=0) |
SOPC_ReturnStatus SOPC_EventFilter_SetOfTypeWhereClause | ( | OpcUa_EventFilter * | eventFilter, |
size_t | whereClauseEltIdx, | ||
const SOPC_NodeId * | typeNodeId ) |
Sets an OfType operator where clause element with the given type id.
eventFilter | An event filter created with SOPC_MonitoredItem_CreateEventFilter |
whereClauseEltIdx | The where clause element index to set (in range of the size on creation) |
typeNodeId | The type nodeId to set as operand for the OfType operand. Content is copied. |
SOPC_ReturnStatus SOPC_EventFilter_SetGenericWhereClause | ( | OpcUa_EventFilter * | eventFilter, |
size_t | whereClauseEltIdx, | ||
OpcUa_ContentFilterElement ** | filterElt ) |
Sets a generic content filter element for the given where clause element index.
eventFilter | An event filter created with SOPC_MonitoredItem_CreateEventFilter |
whereClauseEltIdx | The where clause element index to set (in range of the size on creation) |
filterElt | The filter element to set, its content is set and provided parameter deallocated in case of success. |
SOPC_ReturnStatus SOPC_EventFilter_SetSelectClause | ( | OpcUa_EventFilter * | eventFilter, |
size_t | selectClauseIdx, | ||
const SOPC_NodeId * | typeId, | ||
size_t | noOfBrowsePath, | ||
const SOPC_QualifiedName * | browsePaths, | ||
SOPC_AttributeId | attributeId, | ||
const SOPC_String * | indexRange ) |
Sets select clause parameters for given select clause index.
See part 4 (v1.04) §7.17.3 and §7.4.4.5 for detailed select clause documentation
eventFilter | An event filter created with SOPC_MonitoredItem_CreateEventFilter |
selectClauseIdx | The where clause element index to set (in range of the size on creation) |
typeId | The NodeId of an EventType supported by the Server, if NULL the BaseEventType is used |
noOfBrowsePath | The number of browse path elements in browsePaths |
browsePaths | The array of browse paths filled with noOfBrowsePath elements to select an event node |
attributeId | The id of the attribute to retrieve, it should be SOPC_AttributeId_Value (eventually SOPC_AttributeId_NodeId) |
indexRange | The index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the select clause it should be NULL. Format is described in OPC UA specification. |
SOPC_ReturnStatus SOPC_EventFilter_SetSelectClauseFromStringPath | ( | OpcUa_EventFilter * | eventFilter, |
size_t | selectClauseIdx, | ||
const char * | typeId, | ||
char | qnPathSep, | ||
const char * | strQnPath, | ||
SOPC_AttributeId | attributeId, | ||
const char * | indexRange ) |
Sets select clause parameters for given select clause index.
See part 4 (v1.04) §7.17.3 and §7.4.4.5 for detailed select clause documentation
eventFilter | An event filter created with SOPC_MonitoredItem_CreateEventFilter |
selectClauseIdx | The where clause element index to set (in range of the size on creation) |
typeId | The NodeId of an EventType supported by the Server as a C string, if NULL the BaseEventType is used. Format is described in OPC UA specification. |
qnPathSep | The character to use as separator between path elements in strQnPath |
strQnPath | The qualified name path separated by qnPathSep separator as a string. E.g. with sep='~' for path qn0=(nsIdx=0,"EnabledState"), qn1=(0,"Id"): "0:EnabledState~0:Id". The escape character '\' might be used to un-specialize separator |
attributeId | The id of the attribute to retrieve, it should be SOPC_AttributeId_Value (eventually SOPC_AttributeId_NodeId) |
indexRange | The index range used to identify a single element of an array, or a single range of indexes for arrays. If not used for the select clause it should be NULL. Format is described in OPC UA specification. |
SOPC_ExtensionObject * SOPC_MonitoredItem_EventFilter | ( | OpcUa_EventFilter * | eventFilterObj | ) |
Packages a built event filter into an extension object to be provided as filter to SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams function.
eventFilterObj | The event filter object to package, ownership is transfered to extension object on success. |
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 (v1.04) §7.16 for detailed MonitoringParameters documentation.
createMIrequest | The create monitored item request to configure |
index | Index of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_CreateMonitoredItemsRequest_Create |
monitoringMode | The monitoring mode to use: disabled, sampling, reporting (default mode to be used) |
clientHandle | Client-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_ClientHelper_Subscription_CreateMonitoredItems. |
samplingInterval | The 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. |
queueSize | The requested size of the monitored item queue. |
discardOldest | If set to true the oldest notification is discarded when the queue is full, otherwise the last notification is discarded when the queue is full. |
samplingInterval
) and DataChangeFilter filter are supported by s2opc server OpcUa_ModifyMonitoredItemsRequest * SOPC_ModifyMonitoredItemsRequest_Create | ( | uint32_t | subscriptionId, |
size_t | nbMonitoredItems, | ||
OpcUa_TimestampsToReturn | ts ) |
Creates a ModifyMonitoredItems request.
subscriptionId | The 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_ClientHelper_Subscription_SyncService or SOPC_ClientHelper_Subscription_AsyncService. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously. |
nbMonitoredItems | Number of MonitoredItem to modify with the request. nbMonitoredItems <= INT32_MAX. SOPC_CreateMonitoredItemsRequest_SetMonitoredItemParams shall be called for each monitored item index. |
ts | Set the timestamps (source, server) to be returned for any monitored item. |
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.
modifyMIrequest | The modify monitored item request to configure |
index | Index of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_ModifyMonitoredItemsRequest_Create |
monitoredItemId | The monitored item identifier returned in the OpcUa_CreateMonitoredItemsResponse. |
clientHandle | Client-supplied id of the MonitoredItem, it will be provided in Notifications of the OpcUa_PublishResponse messages received. |
samplingInterval | The 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. |
queueSize | The requested size of the monitored item queue. |
discardOldest | If set to true the oldest notification is discarded when the queue is full, otherwise the last notification is discarded when the queue is full. |
samplingInterval
) and DataChangeFilter filter are supported by s2opc server OpcUa_DeleteMonitoredItemsRequest * SOPC_DeleteMonitoredItemsRequest_Create | ( | uint32_t | subscriptionId, |
size_t | nbMonitoredItems, | ||
const uint32_t * | optMonitoredItemIds ) |
Creates an DeleteMonitoredItems request.
subscriptionId | The 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_ClientHelper_Subscription_SyncService or SOPC_ClientHelper_Subscription_AsyncService. If subscription is managed manually it is contained in the OpcUa_CreateSubscriptionResponse received previously. |
nbMonitoredItems | Number 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. |
SOPC_ReturnStatus SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId | ( | OpcUa_DeleteMonitoredItemsRequest * | deleteMIrequest, |
size_t | index, | ||
uint32_t | monitoredItemId ) |
Sets the monitored item identifier to delete.
deleteMIrequest | The delete monitored item request to configure |
index | Index of the create monitored item to configure in the request. index < number of monitored items configured in SOPC_DeleteMonitoredItemsRequest_Create |
monitoredItemId | The MonitoredItem id to delete |
OpcUa_CallRequest * SOPC_CallRequest_Create | ( | size_t | nbMethodsToCalls | ) |
Creates a Call request for the given number of method calls.
nbMethodsToCalls | Number of method calls to create with the request. nbMethodsToCalls <= INT32_MAX. SOPC_CallRequest_SetMethodToCall shall be called for each method call index. |
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.
callRequest | The call request to configure |
index | Index of the method call to configure in the request. index < number of method calls configured in SOPC_CallRequest_Create |
objectId | The nodeId of the object node on which method call will be executed. objectId shall not be NULL |
methodId | The 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 |
nbOfInputArguments | The 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 . |
inputArguments | The Variant array containing the nbOfInputArguments input arguments for the method call. |
SOPC_ReturnStatus SOPC_CallRequest_SetMethodToCallFromStrings | ( | OpcUa_CallRequest * | callRequest, |
size_t | index, | ||
const char * | objectId, | ||
const char * | methodId, | ||
int32_t | nbOfInputArguments, | ||
const SOPC_Variant * | inputArguments ) |
Sets the method call parameters for the given index in the the call request.
callRequest | The call request to configure |
index | Index of the method call to configure in the request. index < number of method calls configured in SOPC_CallRequest_Create |
objectId | The nodeId of the object node as C string on which method call will be executed. objectId shall not be NULL |
methodId | The nodeId of the method node to execute as C string (it might be object's method node instance or method node of its ObjectType). methodId shall not be NULL |
nbOfInputArguments | The 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 . |
inputArguments | The Variant array containing the nbOfInputArguments input arguments for the method call. |