This class collects the basic properties and function of the can bus and can node.
More...
#include <CanObject.h>
Inherits UserDevice::InterfaceUserDataBase.
Inherited by CanOpen::CanBusObject, CanOpen::CanNodeObject, CanOpen::Emergency, and CanOpen::PROGRAMitem.
|
| CanObject (pUserDeviceStruct *parent,::xsd::cxx::tree::type *conf, UaNode *pAS, OpcUa_UInt32 code) |
| Constructor. More...
|
|
virtual | ~CanObject (void) |
| Destructor. More...
|
|
OpcUa_Byte | getCanNodeId () |
| get Node Id More...
|
|
void | sendNMT (enum ::NMTcommand nmt) |
| Send nmt message. More...
|
|
virtual void | setInitNmt (enum NMTcommand iNMT) |
| Save initial nmt message which will send to initialize devices. More...
|
|
virtual void | setInitNmt (std::string sNmt) |
| Save initial nmt message which will send to initialize devices. More...
|
|
virtual void | sendInitNmt () |
| send initial nmt message More...
|
|
CCanAccess * | getCanBusInterface () |
| get pointer to can bus interface More...
|
|
void | setCanBusInterface (CCanAccess *ccac) |
| save pointer to can bus interface More...
|
|
IOManager * | getIOManager () |
|
| 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 |
|
| 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 () |
|
UserDeviceStruct * | getParentDevice () |
|
pUserDeviceStruct * | getTopInterface () |
|
pUserDeviceStruct * | getParent () |
|
virtual void | setInvalid () |
|
UaNode * | getAddressSpaceEntry () |
|
This class collects the basic properties and function of the can bus and can node.
The class defines several function to send nmt messages to can node. Each node has unique identifier node id. To send nmt message to all nodes on the bus node id = 0 is used.
Definition at line 23 of file CanObject.h.
◆ CanObject()
CanOpen::CanObject::CanObject |
( |
pUserDeviceStruct * |
parent, |
|
|
::xsd::cxx::tree::type * |
conf, |
|
|
UaNode * |
pAS, |
|
|
OpcUa_UInt32 |
code |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
parent | pointer to parent object usually null for CanBusObject |
conf | XML configuration entry |
pAS | pointer to Ua Node |
code | function code of can object |
Definition at line 34 of file CanObject.h.
◆ ~CanObject()
virtual CanOpen::CanObject::~CanObject |
( |
void |
| ) |
|
|
inlinevirtual |
◆ getCanBusInterface()
CCanAccess* CanOpen::CanObject::getCanBusInterface |
( |
| ) |
|
|
inline |
get pointer to can bus interface
- Returns
- pointer to can bus interface
Definition at line 98 of file CanObject.h.
◆ getCanNodeId()
OpcUa_Byte CanOpen::CanObject::getCanNodeId |
( |
| ) |
|
|
inline |
get Node Id
- Returns
- node id
Definition at line 54 of file CanObject.h.
◆ getIOManager()
IOManager* CanOpen::CanObject::getIOManager |
( |
| ) |
|
|
inline |
◆ sendInitNmt()
virtual void CanOpen::CanObject::sendInitNmt |
( |
| ) |
|
|
inlinevirtual |
send initial nmt message
Definition at line 91 of file CanObject.h.
◆ sendNMT()
void CanOpen::CanObject::sendNMT |
( |
enum ::NMTcommand |
nmt | ) |
|
|
inline |
Send nmt message.
- Parameters
-
nmt | can be (ignore, start, stop,preOperational, reset) |
Definition at line 61 of file CanObject.h.
◆ setCanBusInterface()
void CanOpen::CanObject::setCanBusInterface |
( |
CCanAccess * |
ccac | ) |
|
|
inline |
save pointer to can bus interface
- Parameters
-
ccac | pointer to can bus interface |
Definition at line 103 of file CanObject.h.
◆ setInitNmt() [1/2]
virtual void CanOpen::CanObject::setInitNmt |
( |
enum NMTcommand |
iNMT | ) |
|
|
inlinevirtual |
Save initial nmt message which will send to initialize devices.
- Parameters
-
iNMT | can be (ignore, start, stop,preOperational, reset) |
Definition at line 72 of file CanObject.h.
◆ setInitNmt() [2/2]
virtual void CanOpen::CanObject::setInitNmt |
( |
std::string |
sNmt | ) |
|
|
inlinevirtual |
Save initial nmt message which will send to initialize devices.
- Parameters
-
sNmt | must be string ( "start", stop","preOperational", "reset" or empty) |
Definition at line 80 of file CanObject.h.
◆ UA_DISABLE_COPY()
CanOpen::CanObject::UA_DISABLE_COPY |
( |
CanObject |
| ) |
|
|
private |
◆ m_CanNodeId
OpcUa_Byte CanOpen::CanObject::m_CanNodeId |
|
protected |
◆ m_initNMTcommand
enum NMTcommand CanOpen::CanObject::m_initNMTcommand |
|
protected |
◆ m_pCommIf
◆ m_pIOManager
IOManager* CanOpen::CanObject::m_pIOManager |
|
protected |
The documentation for this class was generated from the following file: