UA Server SDK C++ Bundle
1.4.3.291
|
Class implementing the UaObject interface for the TransferServicesType. More...
#include <opcuadi_transferservicestype.h>
Inherits OpcUaDi::TransferServicesTypeBase.
Public Member Functions | |
TransferServicesType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class TransferServicesType. More... | |
TransferServicesType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class TransferServicesType. More... | |
TransferServicesType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class TransferServicesType with all components. More... | |
virtual UaStatus | FetchTransferResultData (const ServiceContext &serviceContext, OpcUa_Int32 TransferID, OpcUa_Int32 SequenceNumber, OpcUa_Int32 MaxParameterResultsToReturn, OpcUa_Boolean OmitGoodResults, UaExtensionObject &FetchResult) |
TransferServicesType method FetchTransferResultData. More... | |
virtual UaStatus | TransferFromDevice (const ServiceContext &serviceContext, OpcUa_Int32 &TransferID, OpcUa_Int32 &InitTransferStatus) |
TransferServicesType method TransferFromDevice. More... | |
virtual UaStatus | TransferToDevice (const ServiceContext &serviceContext, OpcUa_Int32 &TransferID, OpcUa_Int32 &InitTransferStatus) |
TransferServicesType method TransferToDevice. More... | |
void | setTransferServicesCallback (TransferServicesCallback *pCallback) |
Sets the callback for the TransferServices interface implementation. | |
Static Public Member Functions | |
static void | createTypes () |
Create the type related static members of the class. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Protected Member Functions | |
virtual | ~TransferServicesType () |
Destruction. | |
Class implementing the UaObject interface for the TransferServicesType.
OPC UA Objects are used to represent systems, system components, real-world objects and software objects. They have the NodeClass Object. The detailed description of Objects and their attributes can be found in the general description of the Object node class.
The transfer of information (Parameters) between offline nodes and the physical device is supported through OPC UA Methods. These Methods are built on device specific knowledge and functionality.
The transfer is usually terminated if an error occurs for any of the Parameters. No automatic retry will be conducted by the Server. However, whenever possible after a failure, the Server should bring the Device back into a functional state. The Client has to retry by calling the transfer Method again.
The transfer may involve thousands of Parameters so that it can take a long time (up to minutes), and with a result that may be too large for a single response. Therefore, the initiation of the transfer and the collection of result data are performed with separate Methods.
The Device shall have been locked by the Client prior to invoking these Methods.
OpcUaDi::TransferServicesType::TransferServicesType | ( | const UaNodeId & | nodeId, |
UaObject * | pInstanceDeclarationObject, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class TransferServicesType.
This constructor is used if the object is created based on an instance declaration of an object type. Since the only difference between the instance declaration object and the instance object are the node id, the pointer to the instance declaration node is used to get the attribute values other than NodeId from the instance declaration node.
The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.
[in] | nodeId | NodeId of the new object |
[in] | pInstanceDeclarationObject | UaObject interface of the instance declaration node used to provide attribute values other than NodeId |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided |
OpcUaDi::TransferServicesType::TransferServicesType | ( | const UaNodeId & | nodeId, |
const UaString & | name, | ||
OpcUa_UInt16 | browseNameNameSpaceIndex, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class TransferServicesType.
This constructor is used if the object is not created based on an instance declaration. It defines the name and node id of the object. Additional language specific names and other attribute values can be set with set methods provided by the class. The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.
[in] | nodeId | NodeId of the new object |
[in] | name | Name of the new object. Used as browse name and also as display name if no additional language specific names are set. |
[in] | browseNameNameSpaceIndex | Namespace index used for the browse name |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided |
OpcUaDi::TransferServicesType::TransferServicesType | ( | UaBase::Object * | pBaseNode, |
XmlUaNodeFactoryManager * | pFactory, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class TransferServicesType with all components.
[in] | pBaseNode | The "tree" of nodes that specifies the attributes of the instance and its children |
[in] | pFactory | The factory to create the children |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided |
|
virtual |
TransferServicesType method FetchTransferResultData.
[in] | serviceContext | The session and client call context |
[in] | TransferID | Transfer Identifier returned from TransferTo- or TransferFromDevice |
[in] | SequenceNumber | The sequence number being acknowledged. The Server may delete the result set with this sequence number. |
[in] | MaxParameterResultsToReturn | The number of Parameters in TransferResult.ParameterDefs that the Client wants the Server to return in the response. The Server is allowed to further limit the response, but shall not exceed this limit. |
[in] | OmitGoodResults | If TRUE, the Server will omit data for Parameters which have been correctly transferred. |
[out] | FetchResult | Two sub-types are possible, TransferResultError if transfer failed completely and TransferResultData with result data. |
|
virtual |
TransferServicesType method TransferFromDevice.
[in] | serviceContext | The session and client call context |
[out] | TransferID | Transfer Identifier. This ID has to be used when calling FetchTransferResultData. |
[out] | InitTransferStatus | Specifies if the transfer has been initiated. 0 – OK, -1 – E_NotLocked, -2 – E_NotOnline |
|
virtual |
TransferServicesType method TransferToDevice.
[in] | serviceContext | The session and client call context |
[out] | TransferID | Transfer Identifier. This ID has to be used when calling FetchTransferResultData. |
[out] | InitTransferStatus | Specifies if the transfer has been initiated. 0 – OK, -1 – E_NotLocked, -2 – E_NotOnline |