OpcUaCanOpen
CANopen OPC-UA server
CanOpen::IOManagerSDO Class Reference

IOManagerSDO is a manger ro send and receive SDO massage. More...

#include <IOManagerSDO.h>

Inherits IOManager.

Public Member Functions

 IOManagerSDO (UaCanNodeObject *pCanNode)
 construction More...
 
virtual ~IOManagerSDO ()
 destruction More...
 
UaStatus beginTransaction (IOManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 hTransaction, OpcUa_UInt32 totalItemCountHint, OpcUa_Double maxAge, OpcUa_TimestampsToReturn timestampsToReturn, TransactionType transactionType, OpcUa_Handle &hIOManagerContext)
 Start a transaction. More...
 
UaStatus beginStartMonitoring (OpcUa_Handle hIOManagerContext, OpcUa_UInt32 callbackHandle, IOVariableCallback *pIOVariableCallback, VariableHandle *pVariableHandle, MonitoringContext &monitoringContext)
 dummy function. it does not use in this manager. monitoring operations execute by standard IO manager More...
 
UaStatus beginModifyMonitoring (OpcUa_Handle hIOManagerContext, OpcUa_UInt32 callbackHandle, OpcUa_UInt32 hIOVariable, MonitoringContext &monitoringContext)
 Notify IOManager after modifying monitoring parameters of an item. More...
 
UaStatus beginStopMonitoring (OpcUa_Handle hIOManagerContext, OpcUa_UInt32 callbackHandle, OpcUa_UInt32 hIOVariable)
 Notify IOManager after stopping monitoring of an item. More...
 
UaStatus beginRead (OpcUa_Handle hIOManagerContext, OpcUa_UInt32 callbackHandle, VariableHandle *pVariableHandle, OpcUa_ReadValueId *pReadValueId)
 Read attribute value of a node. More...
 
UaStatus beginWrite (OpcUa_Handle hIOManagerContext, OpcUa_UInt32 callbackHandle, VariableHandle *pVariableHandle, OpcUa_WriteValue *pWriteValue)
 Write attribute value of a node. More...
 
UaStatus finishTransaction (OpcUa_Handle hIOManagerContext)
 Finish a transaction. More...
 
UaStatus setAvailableSamplingRates (const UaUInt32Array &availableSamplingRates)
 Set the sampling rates provided by the OPC server. More...
 
void executeRead (AddressSpace::IOTransactionContextSDO *pTransactionContext)
 
void executeWrite (AddressSpace::IOTransactionContextSDO *pTransactionContext)
 
void executeMonitorBegin (AddressSpace::IOTransactionContextSDO *pTransactionContext)
 
void executeMonitorStop (AddressSpace::IOTransactionContextSDO *pTransactionContext)
 
void executeMonitorModify (AddressSpace::IOTransactionContextSDO *pTransactionContext)
 

Private Member Functions

 UA_DISABLE_COPY (IOManagerSDO)
 

Private Attributes

UaUInt32Array sdoSamplingRates
 
UaCanNodeObjectm_pCanNode
 
UaMutex m_mutex
 
UaThreadPool * m_pThreadPool
 
SamplingEngine * m_pSamplingEngine
 
HandleManager< AddressSpace::SamplingSDOm_handlesSampleItems
 

Detailed Description

IOManagerSDO is a manger ro send and receive SDO massage.

To develop IOManager in Ua Opc toolkit there is an specific interface.
It has several abstract function which must be redefine to ensure needed functionality.
in order to execute sdo operation in parallel each node has this manager in OpcUaCanOpenServer.

Definition at line 20 of file IOManagerSDO.h.

Constructor & Destructor Documentation

◆ IOManagerSDO()

CanOpen::IOManagerSDO::IOManagerSDO ( UaCanNodeObject pCanNode)

construction

Parameters
pCanNodeis a pointer to the UaCanNodeObjec which the manager is belonged to

Definition at line 17 of file IOManagerSDO.cpp.

◆ ~IOManagerSDO()

CanOpen::IOManagerSDO::~IOManagerSDO ( )
virtual

destruction

Definition at line 32 of file IOManagerSDO.cpp.

Member Function Documentation

◆ beginModifyMonitoring()

UaStatus CanOpen::IOManagerSDO::beginModifyMonitoring ( OpcUa_Handle  hIOManagerContext,
OpcUa_UInt32  callbackHandle,
OpcUa_UInt32  hIOVariable,
MonitoringContext &  monitoringContext 
)

Notify IOManager after modifying monitoring parameters of an item.

Parameters
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method.
hIOVariableThe handle of the variable in the IOManager created with beginStartMonitoring. The handle was passed to the SDK in the callback finishStartMonitoring.
monitoringContexthandle for the monitoring context.
Returns
Error code

Definition at line 388 of file IOManagerSDO.cpp.

◆ beginRead()

UaStatus CanOpen::IOManagerSDO::beginRead ( OpcUa_Handle  hIOManagerContext,
OpcUa_UInt32  callbackHandle,
VariableHandle *  pVariableHandle,
OpcUa_ReadValueId *  pReadValueId 
)

Read attribute value of a node.

Parameters
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
pReadValueIdContext for the node to read. The context contains the IndexRange and the DataEncoding requested by the client. The other parameters of this context are already handled by the VariableHandle.
Returns
Error code

Definition at line 228 of file IOManagerSDO.cpp.

◆ beginStartMonitoring()

UaStatus CanOpen::IOManagerSDO::beginStartMonitoring ( OpcUa_Handle  hIOManagerContext,
OpcUa_UInt32  callbackHandle,
IOVariableCallback *  pIOVariableCallback,
VariableHandle *  pVariableHandle,
MonitoringContext &  monitoringContext 
)

dummy function. it does not use in this manager. monitoring operations execute by standard IO manager

Start monitoring of an item.

Parameters
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method.
pIOVariableCallbackCallback interface used for data change callbacks to the MonitoredItem managed by the SDK.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
monitoringContexthandle for the monitoring context.
Returns
Error code

Definition at line 314 of file IOManagerSDO.cpp.

◆ beginStopMonitoring()

UaStatus CanOpen::IOManagerSDO::beginStopMonitoring ( OpcUa_Handle  hIOManagerContext,
OpcUa_UInt32  callbackHandle,
OpcUa_UInt32  hIOVariable 
)

Notify IOManager after stopping monitoring of an item.

Parameters
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method.
hIOVariableThe handle of the variable in the IOManager created with beginStartMonitoring. The handle was passed to the SDK in the callback finishStartMonitoring.
Returns
Error code

Definition at line 452 of file IOManagerSDO.cpp.

◆ beginTransaction()

UaStatus CanOpen::IOManagerSDO::beginTransaction ( IOManagerCallback *  pCallback,
const ServiceContext &  serviceContext,
OpcUa_UInt32  hTransaction,
OpcUa_UInt32  totalItemCountHint,
OpcUa_Double  maxAge,
OpcUa_TimestampsToReturn  timestampsToReturn,
TransactionType  transactionType,
OpcUa_Handle &  hIOManagerContext 
)

Start a transaction.

Parameters
pCallbackCallback interface used for the transaction. The IOManager must use this interface to finish the action for each passed node in the transaction.
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
hTransactionHandle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method.
totalItemCountHintA hint for the IOManager about the total number of nodes in the transaction. The IOManager may not be responsible for all nodes but he can use this hint if he wants to optimize memory allocation.
maxAgeMax age parameter used only in the Read service.
timestampsToReturnIndicates which timestamps should be returned in a Read or a Publish response. The possible enum values are: OpcUa_TimestampsToReturn_Source OpcUa_TimestampsToReturn_Server OpcUa_TimestampsToReturn_Both OpcUa_TimestampsToReturn_Neither
transactionTypeType of the transaction. The possible enum values are: READ WRITE MONITOR_BEGIN MONITOR_MODIFY MONITOR_STOP
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
Returns
Error code

Definition at line 59 of file IOManagerSDO.cpp.

◆ beginWrite()

UaStatus CanOpen::IOManagerSDO::beginWrite ( OpcUa_Handle  hIOManagerContext,
OpcUa_UInt32  callbackHandle,
VariableHandle *  pVariableHandle,
OpcUa_WriteValue *  pWriteValue 
)

Write attribute value of a node.

Parameters
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
pWriteValueContext for the node to write. The context contains the IndexRange requested by the client. The NodeId and Attribute parameters of this context are already handled by the VariableHandle
Returns
Error code

Definition at line 271 of file IOManagerSDO.cpp.

◆ executeMonitorBegin()

void CanOpen::IOManagerSDO::executeMonitorBegin ( AddressSpace::IOTransactionContextSDO pTransactionContext)

◆ executeMonitorModify()

void CanOpen::IOManagerSDO::executeMonitorModify ( AddressSpace::IOTransactionContextSDO pTransactionContext)

◆ executeMonitorStop()

void CanOpen::IOManagerSDO::executeMonitorStop ( AddressSpace::IOTransactionContextSDO pTransactionContext)

◆ executeRead()

void CanOpen::IOManagerSDO::executeRead ( AddressSpace::IOTransactionContextSDO pTransactionContext)

Definition at line 491 of file IOManagerSDO.cpp.

◆ executeWrite()

void CanOpen::IOManagerSDO::executeWrite ( AddressSpace::IOTransactionContextSDO pTransactionContext)

Definition at line 527 of file IOManagerSDO.cpp.

◆ finishTransaction()

UaStatus CanOpen::IOManagerSDO::finishTransaction ( OpcUa_Handle  hIOManagerContext)

Finish a transaction.

Parameters
hIOManagerContextIOManager handle for the transaction context. This handle is used to identify the transaction in the IOManager.
Returns
Error code

Definition at line 111 of file IOManagerSDO.cpp.

◆ setAvailableSamplingRates()

UaStatus CanOpen::IOManagerSDO::setAvailableSamplingRates ( const UaUInt32Array &  availableSamplingRates)

Set the sampling rates provided by the OPC server.

◆ UA_DISABLE_COPY()

CanOpen::IOManagerSDO::UA_DISABLE_COPY ( IOManagerSDO  )
private

Member Data Documentation

◆ m_handlesSampleItems

HandleManager<AddressSpace::SamplingSDO> CanOpen::IOManagerSDO::m_handlesSampleItems
private

Definition at line 66 of file IOManagerSDO.h.

◆ m_mutex

UaMutex CanOpen::IOManagerSDO::m_mutex
private

Definition at line 61 of file IOManagerSDO.h.

◆ m_pCanNode

UaCanNodeObject* CanOpen::IOManagerSDO::m_pCanNode
private

Definition at line 59 of file IOManagerSDO.h.

◆ m_pSamplingEngine

SamplingEngine* CanOpen::IOManagerSDO::m_pSamplingEngine
private

Definition at line 64 of file IOManagerSDO.h.

◆ m_pThreadPool

UaThreadPool* CanOpen::IOManagerSDO::m_pThreadPool
private

Definition at line 63 of file IOManagerSDO.h.

◆ sdoSamplingRates

UaUInt32Array CanOpen::IOManagerSDO::sdoSamplingRates
private

Definition at line 57 of file IOManagerSDO.h.


The documentation for this class was generated from the following files: