OpcUaCanOpen
CANopen OPC-UA server
CanOpen::CanOpenObject Class Referenceabstract

CanOpenObject class represents the can open messages which can be sent or received via can bus. More...

#include <CanOpenObject.h>

Inherits UserDevice::InterfaceUserDataBase.

Inherited by CanOpen::CanPDOObject, and CanOpen::CanSDOObject.

Public Member Functions

 CanOpenObject (pUserDeviceStruct *parent,::xml_schema::type *conf, UaNode *blink, int code)
 This class defines operations for canopen protocol. More...
 
virtual ~CanOpenObject (void)
 Destructor. More...
 
CCanAccessgetCanBus ()
 
const char * getBusName ()
 
OpcUa_UInt16 getCobId ()
 
virtual void pass (const CanMsgStruct *)=0
 
virtual bool isMsgForObject (const CanMsgStruct *)
 check if message for this object (cobId) More...
 
DirectionType getDirectionType ()
 
UaStatus waitOperation (OpcUa_UInt timeout)
 
UaStatus waitOperation ()
 
virtual void messageCame ()
 
virtual UaStatus releaseOperation ()
 
virtual UaStatus signalOperation ()
 
- Public Member Functions inherited from UserDevice::InterfaceUserDataBase
 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 ()
 

Public Attributes

UaByteArray m_buffer
 
UaDateTime m_udt
 

Protected Attributes

OpcUa_UInt32 m_iTimeout
 
UaSemaphore m_waitMessage
 
OpcUa_UInt16 m_cobId
 
DirectionType m_direction
 
OpcUa_UInt32 m_iMaxCount
 
OpcUa_UInt32 m_iCount
 
- Protected Attributes inherited from UserDevice::UserDeviceStruct
UaMutexRefCounted * m_pSharedMutex
 

Detailed Description

CanOpenObject class represents the can open messages which can be sent or received via can bus.

Definition at line 24 of file CanOpenObject.h.

Constructor & Destructor Documentation

◆ CanOpenObject()

CanOpen::CanOpenObject::CanOpenObject ( pUserDeviceStruct parent,
::xml_schema::type conf,
UaNode *  blink,
int  code 
)

This class defines operations for canopen protocol.

Constructor

Parameters
parentpointer to parent object usually null for CanBusObject
confXML configuration entry
blinkpointer to Ua Node
codefunction code for this object

Definition at line 13 of file CanOpenObject.cpp.

◆ ~CanOpenObject()

CanOpen::CanOpenObject::~CanOpenObject ( void  )
virtual

Destructor.

Definition at line 23 of file CanOpenObject.cpp.

Member Function Documentation

◆ getBusName()

const char* CanOpen::CanOpenObject::getBusName ( )
inline

Definition at line 46 of file CanOpenObject.h.

◆ getCanBus()

CCanAccess * CanOpen::CanOpenObject::getCanBus ( )

Definition at line 36 of file CanOpenObject.cpp.

◆ getCobId()

OpcUa_UInt16 CanOpen::CanOpenObject::getCobId ( )
inline

Definition at line 52 of file CanOpenObject.h.

◆ getDirectionType()

DirectionType CanOpen::CanOpenObject::getDirectionType ( )
inline

Definition at line 64 of file CanOpenObject.h.

◆ isMsgForObject()

bool CanOpen::CanOpenObject::isMsgForObject ( const CanMsgStruct cmg)
virtual

check if message for this object (cobId)

Parameters
cmgcan message structure

Reimplemented in CanOpen::CanSDOObject.

Definition at line 31 of file CanOpenObject.cpp.

◆ messageCame()

virtual void CanOpen::CanOpenObject::messageCame ( )
inlinevirtual

Definition at line 68 of file CanOpenObject.h.

◆ pass()

virtual void CanOpen::CanOpenObject::pass ( const CanMsgStruct )
pure virtual

◆ releaseOperation()

UaStatus CanOpen::CanOpenObject::releaseOperation ( )
virtual

Definition at line 65 of file CanOpenObject.cpp.

◆ signalOperation()

virtual UaStatus CanOpen::CanOpenObject::signalOperation ( )
inlinevirtual

Definition at line 73 of file CanOpenObject.h.

◆ waitOperation() [1/2]

UaStatus CanOpen::CanOpenObject::waitOperation ( OpcUa_UInt  timeout)

Definition at line 41 of file CanOpenObject.cpp.

◆ waitOperation() [2/2]

UaStatus CanOpen::CanOpenObject::waitOperation ( )

Definition at line 57 of file CanOpenObject.cpp.

Member Data Documentation

◆ m_buffer

UaByteArray CanOpen::CanOpenObject::m_buffer

Definition at line 80 of file CanOpenObject.h.

◆ m_cobId

OpcUa_UInt16 CanOpen::CanOpenObject::m_cobId
protected

Definition at line 88 of file CanOpenObject.h.

◆ m_direction

DirectionType CanOpen::CanOpenObject::m_direction
protected

Definition at line 89 of file CanOpenObject.h.

◆ m_iCount

OpcUa_UInt32 CanOpen::CanOpenObject::m_iCount
protected

Definition at line 91 of file CanOpenObject.h.

◆ m_iMaxCount

OpcUa_UInt32 CanOpen::CanOpenObject::m_iMaxCount
protected

Definition at line 90 of file CanOpenObject.h.

◆ m_iTimeout

OpcUa_UInt32 CanOpen::CanOpenObject::m_iTimeout
protected

Definition at line 85 of file CanOpenObject.h.

◆ m_udt

UaDateTime CanOpen::CanOpenObject::m_udt

Definition at line 81 of file CanOpenObject.h.

◆ m_waitMessage

UaSemaphore CanOpen::CanOpenObject::m_waitMessage
protected

Definition at line 86 of file CanOpenObject.h.


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