S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
libs2opc_request_builder.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
33#ifndef LIBS2OPC_REQUEST_BUILDER_H_
34#define LIBS2OPC_REQUEST_BUILDER_H_
35
36#include "sopc_types.h"
37
50
63
92 size_t index,
93 const char* nodeId,
94 SOPC_AttributeId attribute,
95 const char* indexRange);
96
122 size_t index,
123 const SOPC_NodeId* nodeId,
124 SOPC_AttributeId attribute,
125 const SOPC_String* indexRange);
126
136 size_t index,
137 const SOPC_QualifiedName* dataEncoding);
138
150
187 size_t index,
188 const char* nodeId,
189 SOPC_AttributeId attribute,
190 const char* indexRange,
191 const SOPC_DataValue* value);
192
226 size_t index,
227 const SOPC_NodeId* nodeId,
228 SOPC_AttributeId attribute,
229 const SOPC_String* indexRange,
230 const SOPC_DataValue* value);
231
248 size_t maxReferencesPerNode,
249 const OpcUa_ViewDescription* optView);
250
292 size_t index,
293 const char* nodeId,
294 OpcUa_BrowseDirection browseDirection,
295 const char* referenceTypeId,
296 bool includeSubtypes,
297 OpcUa_NodeClass nodeClassMask,
298 OpcUa_BrowseResultMask resultMask);
299
335 size_t index,
336 const SOPC_NodeId* nodeId,
337 OpcUa_BrowseDirection browseDirection,
338 const SOPC_NodeId* referenceTypeId,
339 bool includeSubtypes,
340 OpcUa_NodeClass nodeClassMask,
341 OpcUa_BrowseResultMask resultMask);
342
361OpcUa_BrowseNextRequest* SOPC_BrowseNextRequest_Create(bool releaseContinuationPoints, size_t nbContinuationPoints);
362
377
406 size_t index,
407 const char* startingNodeId,
408 size_t nbPathElements,
409 OpcUa_RelativePathElement* pathElements);
410
433 size_t index,
434 SOPC_NodeId* startingNodeId,
435 size_t nbPathElements,
436 OpcUa_RelativePathElement* pathElements);
437
451
477 size_t index,
478 const SOPC_NodeId* referenceTypeId,
479 bool isInverse,
480 bool includeSubtypes,
481 uint16_t targetNsIndex,
482 const char* targetName);
483
499 size_t index,
500 const SOPC_ByteString* continuationPoint);
501
511
526 size_t nbLocales,
527 char* const* localeIds);
528
549 size_t nbProfiles,
550 char* const* profileURIs);
551
560
572
610 size_t index,
611 const SOPC_ExpandedNodeId* parentNodeId,
612 const SOPC_NodeId* referenceTypeId,
613 const SOPC_ExpandedNodeId* optRequestedNodeId,
614 const SOPC_QualifiedName* browseName,
615 const SOPC_ExpandedNodeId* typeDefinition,
616 const SOPC_LocalizedText* optDisplayName,
617 const SOPC_LocalizedText* optDescription,
618 const uint32_t* optWriteMask,
619 const uint32_t* optUserWriteMask,
620 const SOPC_Variant* optValue,
621 const SOPC_NodeId* optDataType,
622 const int32_t* optValueRank,
623 int32_t noOfArrayDimensions,
624 const uint32_t* optArrayDimensions,
625 const SOPC_Byte* optAccessLevel,
626 const SOPC_Byte* optUserAccessLevel,
627 const double* optMinimumSamplingInterval,
628 SOPC_Boolean* optHistorizing);
629
655 size_t index,
656 const SOPC_ExpandedNodeId* parentNodeId,
657 const SOPC_NodeId* referenceTypeId,
658 const SOPC_ExpandedNodeId* optRequestedNodeId,
659 const SOPC_QualifiedName* browseName,
660 const SOPC_ExpandedNodeId* typeDefinition,
661 const SOPC_LocalizedText* optDisplayName,
662 const SOPC_LocalizedText* optDescription,
663 const uint32_t* optWriteMask,
664 const uint32_t* optUserWriteMask,
665 const SOPC_Byte* eventNotifier);
680
702 uint32_t reqLifetimeCount,
703 uint32_t reqMaxKeepAliveCount,
704 uint32_t maxNotifPerPublish,
705 SOPC_Boolean publishingEnabled,
706 SOPC_Byte priority);
707
730 size_t nbMonitoredItems,
731 const SOPC_NodeId* nodeIdsToMonitor,
733
762 uint32_t subscriptionId,
763 size_t nbMonitoredItems,
764 char* const* nodeIdsToMonitor,
766
786 size_t nbMonitoredItems,
788
824 OpcUa_CreateMonitoredItemsRequest* createMIrequest,
825 size_t index,
826 const SOPC_NodeId* nodeId,
827 SOPC_AttributeId attribute,
828 const SOPC_String* indexRange);
829
865 OpcUa_CreateMonitoredItemsRequest* createMIrequest,
866 size_t index,
867 const char* nodeId,
868 SOPC_AttributeId attribute,
869 const char* indexRange);
870
885 OpcUa_DeadbandType deadbandType,
886 double deadbandValue);
887
906OpcUa_EventFilter* SOPC_MonitoredItem_CreateEventFilter(size_t noOfSelectClauses, size_t noOfWhereClauseElt);
907
918 size_t whereClauseEltIdx,
919 const SOPC_NodeId* typeNodeId);
920
932 size_t whereClauseEltIdx,
933 OpcUa_ContentFilterElement** filterElt);
934
957 size_t selectClauseIdx,
958 const SOPC_NodeId* typeId,
959 size_t noOfBrowsePath,
960 const SOPC_QualifiedName* browsePaths,
961 SOPC_AttributeId attributeId,
962 const SOPC_String* indexRange);
963
995 size_t selectClauseIdx,
996 const char* typeId,
997 char qnPathSep,
998 const char* strQnPath,
999 SOPC_AttributeId attributeId,
1000 const char* indexRange);
1001
1011
1049 OpcUa_CreateMonitoredItemsRequest* createMIrequest,
1050 size_t index,
1051 OpcUa_MonitoringMode monitoringMode,
1052 uint32_t clientHandle,
1053 double samplingInterval,
1054 SOPC_ExtensionObject* optFilter,
1055 uint32_t queueSize,
1056 SOPC_Boolean discardOldest);
1057
1078 size_t nbMonitoredItems,
1080
1111 OpcUa_ModifyMonitoredItemsRequest* modifyMIrequest,
1112 size_t index,
1113 uint32_t monitoredItemId,
1114 uint32_t clientHandle,
1115 double samplingInterval,
1116 SOPC_ExtensionObject* optFilter,
1117 uint32_t queueSize,
1118 SOPC_Boolean discardOldest);
1119
1142 size_t nbMonitoredItems,
1143 const uint32_t* optMonitoredItemIds);
1144
1156 OpcUa_DeleteMonitoredItemsRequest* deleteMIrequest,
1157 size_t index,
1158 uint32_t monitoredItemId);
1159
1171
1197 size_t index,
1198 const SOPC_NodeId* objectId,
1199 const SOPC_NodeId* methodId,
1200 int32_t nbOfInputArguments,
1201 const SOPC_Variant* inputArguments);
1202
1228 size_t index,
1229 const char* objectId,
1230 const char* methodId,
1231 int32_t nbOfInputArguments,
1232 const SOPC_Variant* inputArguments);
1233
1234#endif /* LIBS2OPC_REQUEST_BUILDER_H_ */
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_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 MonitoringPara...
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_CreateMonitore...
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.
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_ExtensionObject * SOPC_MonitoredItem_EventFilter(OpcUa_EventFilter *eventFilterObj)
Packages a built event filter into an extension object to be provided as filter to SOPC_CreateMonitor...
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 b...
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_ReadRequest_SetMaxAge(OpcUa_ReadRequest *readRequest, double maxAge)
Indicates to the server of maximum age of the data it should return.
OpcUa_BrowseNextRequest * SOPC_BrowseNextRequest_Create(bool releaseContinuationPoints, size_t nbContinuationPoints)
Creates a browse next request.
OpcUa_CallRequest * SOPC_CallRequest_Create(size_t nbMethodsToCalls)
Creates a Call request for the given number of method calls.
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.
OpcUa_RegisterServer2Request * SOPC_RegisterServer2Request_CreateFromServerConfiguration(void)
Creates a complete RegisterServer2 request from the current server configuration. It shall be used to...
OpcUa_BrowseRequest * SOPC_BrowseRequest_Create(size_t nbNodesToBrowse, size_t maxReferencesPerNode, const OpcUa_ViewDescription *optView)
Creates a browse request.
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_CreateMonitoredItems...
OpcUa_ReadRequest * SOPC_ReadRequest_Create(size_t nbReadValues, OpcUa_TimestampsToReturn tsToReturn)
Creates a read request.
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.
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_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_EventFilter * SOPC_MonitoredItem_CreateEventFilter(size_t noOfSelectClauses, size_t noOfWhereClauseElt)
Creates and allocates a EventFilter filter parameter.
OpcUa_WriteRequest * SOPC_WriteRequest_Create(size_t nbWriteValues)
Creates a write request.
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...
OpcUa_AddNodesRequest * SOPC_AddNodesRequest_Create(size_t nbAddNodes)
Creates an add nodes 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.
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_CreateSubscriptionRequest * SOPC_CreateSubscriptionRequest_CreateDefault(void)
Creates a CreateSubscription request with default parameters values Default parameters are the follow...
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 f...
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 t...
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_CreateMon...
OpcUa_DeleteMonitoredItemsRequest * SOPC_DeleteMonitoredItemsRequest_Create(uint32_t subscriptionId, size_t nbMonitoredItems, const uint32_t *optMonitoredItemIds)
Creates an DeleteMonitoredItems 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.
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.
OpcUa_GetEndpointsRequest * SOPC_GetEndpointsRequest_Create(const char *endpointURL)
Creates a GetEndpoint request for the given endpoint URL.
OpcUa_RelativePathElement * SOPC_RelativePathElements_Create(size_t nbPathElements)
Creates an array of relative path element to be used in translate browse path.
OpcUa_CreateMonitoredItemsRequest * SOPC_CreateMonitoredItemsRequest_Create(uint32_t subscriptionId, size_t nbMonitoredItems, OpcUa_TimestampsToReturn ts)
Creates a CreateMonitoredItems request.
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.
OpcUa_ModifyMonitoredItemsRequest * SOPC_ModifyMonitoredItemsRequest_Create(uint32_t subscriptionId, size_t nbMonitoredItems, OpcUa_TimestampsToReturn ts)
Creates a ModifyMonitoredItems request.
OpcUa_TranslateBrowsePathsToNodeIdsRequest * SOPC_TranslateBrowsePathsRequest_Create(size_t nbTranslateBrowsePaths)
Creates a translate browse paths request.
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.
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_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 value...
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_AddNodeRequest_SetObjectAttributes(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_Byte *eventNotifier)
Sets the attributes values requested for the Object node to add. Optional parameters are prefixed by ...
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) P...
SOPC_ReturnStatus SOPC_DeleteMonitoredItemsRequest_SetMonitoredItemId(OpcUa_DeleteMonitoredItemsRequest *deleteMIrequest, size_t index, uint32_t monitoredItemId)
Sets the monitored item identifier to delete.
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.
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) Endpoi...
uint8_t SOPC_Byte
Definition sopc_builtintypes.h:138
SOPC_Byte SOPC_Boolean
Definition sopc_builtintypes.h:140
enum _SOPC_AttributeId SOPC_AttributeId
Enumerated for all possible OPC UA attribute ids.
enum _OpcUa_BrowseResultMask OpcUa_BrowseResultMask
enum _OpcUa_TimestampsToReturn OpcUa_TimestampsToReturn
enum _OpcUa_BrowseDirection OpcUa_BrowseDirection
enum _OpcUa_MonitoringMode OpcUa_MonitoringMode
enum _OpcUa_DeadbandType OpcUa_DeadbandType
enum _OpcUa_DataChangeTrigger OpcUa_DataChangeTrigger
enum _OpcUa_NodeClass OpcUa_NodeClass
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Each attribute in OPC UA has a DataValue caracterized by the following structure.
Definition sopc_builtintypes.h:385
ExpandedNodeId allows the namespace to be specified explicitly as a string or with an index in the Se...
Definition sopc_builtintypes.h:207
An ExtensionObject is a container for any Structured DataTypes which cannot be encoded as one of the ...
Definition sopc_builtintypes.h:262
Definition sopc_builtintypes.h:234
This structure describes a basic NodeID in OPC UA.
Definition sopc_builtintypes.h:189
Definition sopc_builtintypes.h:228
This structure provides string encapsulation.
Definition sopc_builtintypes.h:148
This structure provides variant encapsulation.
Definition sopc_builtintypes.h:374
Definition sopc_types.h:3433
Definition sopc_types.h:3853
Definition sopc_types.h:3802
Definition sopc_types.h:5345
Definition sopc_types.h:794
Definition sopc_types.h:5562
Definition sopc_types.h:5868
Definition sopc_types.h:5818
Definition sopc_types.h:4649
Definition sopc_types.h:2409
Definition sopc_types.h:5659
Definition sopc_types.h:4552
Definition sopc_types.h:2556
Definition sopc_types.h:3902
Definition sopc_types.h:3701
Definition sopc_types.h:5007