OpcUaCanOpen
CANopen OPC-UA server
UserDevice::InterfaceUserDataBase Class Referenceabstract

Abstract class collects the basic properties and function of the Device This class defines the interface which OpcUaCanOpen Server uses to connect to the hardware part and "send and get" functions to exchange data. More...

#include <InterfaceUserDataBase.h>

Inherits UserDevice::UserDeviceStruct.

Inherited by CanOpen::CanObject, CanOpen::CanOpenObject, and UserDevice::UserDeviceItem.

Public Member Functions

 InterfaceUserDataBase (pUserDeviceStruct *parent,::xsd::cxx::tree::type *conf, UaNode *pAS, OpcUa_UInt code)
 Constructor Also create the shared mutex which can be used to synchronize operation on device using lock/unlock function. More...
 
virtual ~InterfaceUserDataBase (void)
 Destructor. More...
 
virtual UaStatus getDeviceMessage (OpcUa_UInt32 code)=0
 read data defined of function code from device Abstract function to take can messages based on type id (buldingAutomationTypeIds.h) More...
 
virtual UaStatus sendDeviceMessage (OpcUa_UInt32 code, UaDataValue *value=0)=0
 send data or command on device Abstract function to send data based on type id (buldingAutomationTypeIds.h) More...
 
virtual UaStatus connectCode (OpcUa_UInt32 code, ::xsd::cxx::tree::type *conf, UaNode *node)=0
 Connect UaVariable with function code. More...
 
virtual UaVariant getPropertyValue (OpcUa_UInt32 code, ::xsd::cxx::tree::type *conf)=0
 
- Public Member Functions inherited from UserDevice::UserDeviceStruct
 UserDeviceStruct (pUserDeviceStruct *parent, ::xsd::cxx::tree::type *conf, UaNode *pAS, OpcUa_UInt code)
 constructor More...
 
void lock ()
 lock shared mutex to protect More...
 
void unlock ()
 unlock shared mutex More...
 
::UaMutexRefCounted * getShareMutex ()
 get mutex More...
 
void releaseMutex ()
 
OpcUa_Int32 countMutex ()
 
virtual ~UserDeviceStruct (void)
 
OpcUa_UInt getCodeFunction ()
 
UserDeviceStructgetParentDevice ()
 
pUserDeviceStructgetTopInterface ()
 
pUserDeviceStructgetParent ()
 
virtual void setInvalid ()
 
UaNode * getAddressSpaceEntry ()
 

Private Member Functions

 UA_DISABLE_COPY (InterfaceUserDataBase)
 

Additional Inherited Members

- Protected Attributes inherited from UserDevice::UserDeviceStruct
UaMutexRefCounted * m_pSharedMutex
 

Detailed Description

Abstract class collects the basic properties and function of the Device This class defines the interface which OpcUaCanOpen Server uses to connect to the hardware part and "send and get" functions to exchange data.

Definition at line 17 of file InterfaceUserDataBase.h.

Constructor & Destructor Documentation

◆ InterfaceUserDataBase()

UserDevice::InterfaceUserDataBase::InterfaceUserDataBase ( pUserDeviceStruct parent,
::xsd::cxx::tree::type *  conf,
UaNode *  pAS,
OpcUa_UInt  code 
)
inline

Constructor Also create the shared mutex which can be used to synchronize operation on device using lock/unlock function.

Parameters
parentthe pointer on parent device
confXML definition for device
pASUaNode callback node to pass data ( if needed )
codefunction code defines data or operation

Definition at line 29 of file InterfaceUserDataBase.h.

◆ ~InterfaceUserDataBase()

virtual UserDevice::InterfaceUserDataBase::~InterfaceUserDataBase ( void  )
inlinevirtual

Destructor.

Definition at line 79 of file InterfaceUserDataBase.h.

Member Function Documentation

◆ connectCode()

virtual UaStatus UserDevice::InterfaceUserDataBase::connectCode ( OpcUa_UInt32  code,
::xsd::cxx::tree::type *  conf,
UaNode *  node 
)
pure virtual

Connect UaVariable with function code.

Parameters
codefunction code
confXML object containing the configuration information for this object
nodeUaVariable containing data to send /received

Implemented in CanOpen::CanBusObject, CanOpen::CanNodeObject, CanOpen::PROGRAMitem, CanOpen::CanPDOObject, CanOpen::Emergency, and CanOpen::CanSDOObject.

◆ getDeviceMessage()

virtual UaStatus UserDevice::InterfaceUserDataBase::getDeviceMessage ( OpcUa_UInt32  code)
pure virtual

read data defined of function code from device Abstract function to take can messages based on type id (buldingAutomationTypeIds.h)

Parameters
codefunction code defining of operation (send command ,data or read data)

Implemented in CanOpen::CanBusObject, CanOpen::CanNodeObject, CanOpen::CanPDOObject, CanOpen::PROGRAMitem, CanOpen::Emergency, and CanOpen::CanSDOObject.

◆ getPropertyValue()

virtual UaVariant UserDevice::InterfaceUserDataBase::getPropertyValue ( OpcUa_UInt32  code,
::xsd::cxx::tree::type *  conf 
)
pure virtual

◆ sendDeviceMessage()

virtual UaStatus UserDevice::InterfaceUserDataBase::sendDeviceMessage ( OpcUa_UInt32  code,
UaDataValue *  value = 0 
)
pure virtual

send data or command on device Abstract function to send data based on type id (buldingAutomationTypeIds.h)

Parameters
codefunction code
valuedata to send

Implemented in CanOpen::CanBusObject, CanOpen::PROGRAMitem, CanOpen::CanNodeObject, CanOpen::CanPDOObject, CanOpen::Emergency, and CanOpen::CanSDOObject.

◆ UA_DISABLE_COPY()

UserDevice::InterfaceUserDataBase::UA_DISABLE_COPY ( InterfaceUserDataBase  )
private

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