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

This class provides the creation of all properties and object belonging th can node devices Each object of this class has a io manager to send and receive sdo messages creation on can node structure can be based on node type or XML entry. More...

#include <UaCanNodeObject.h>

Inherits AddressSpace::UaControlDeviceGeneric.

Public Member Functions

 UaCanNodeObject (NODE *nd, UaObject *pNodeType, const UaNodeId &newNodeId, AddressSpace::NmBuildingAutomation *pNodeManager, UserDevice::pUserDeviceStruct *pcanbus)
 Constructor based on XML description. More...
 
virtual ~UaCanNodeObject (void)
 
Destructor More...
 
IOManager * getSDOIOManager ()
 get io manager More...
 
- Public Member Functions inherited from AddressSpace::UaControlDeviceGeneric
 UaControlDeviceGeneric (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, OpcUa_Int32 baTypeId, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf)
 Constructor. More...
 
 UaControlDeviceGeneric (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, UaObjectType *instance, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf)
 Constructor. More...
 
 UaControlDeviceGeneric (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, UaObject *instance, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf)
 Constructor. More...
 
virtual ~UaControlDeviceGeneric (void)
 
OpcUa_Byte eventNotifier () const
 this function creates recursively the object tree based on type object More...
 
OpcUa_UInt32 getDeviceTypeNumber () const
 Override UaObject method implementation. More...
 
virtual UaStatus beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments)
 Implement MethodManager interface this function calls by ua toolkit object when client ask to execute method. More...
 
virtual UaStatus call (UaMethod *, const UaVariantArray &, UaVariantArray &, UaStatusCodeArray &, UaDiagnosticInfos &)
 Own synchronous call implementation the can be overridden in subclasses (not use) More...
 
virtual void addMethod (OpcUa::BaseMethod *meth)
 get common mutex More...
 

Private Member Functions

UaStatus createSDOs (NODE *sn, AddressSpace::NmBuildingAutomation *pNodeManager)
 create sdo object belonging to node based on XML description More...
 
UaStatus createSDOs (NODETYPE *sn, AddressSpace::NmBuildingAutomation *pNodeManager)
 create sdo type object
More...
 
UaStatus createSDOITEMs (NODE *sdoi, AddressSpace::NmBuildingAutomation *pNodeManager)
 create sdo item object belonging to node based on XML description More...
 
UaStatus createSDOITEMs (NODETYPE *sdoi, AddressSpace::NmBuildingAutomation *pNodeManager)
 create sdo item type object More...
 
UaStatus createPDOs (PDO &pit, AddressSpace::NmBuildingAutomation *pNodeManager, bool type)
 Create PDO. More...
 
UaStatus createPROGRAMs (NODE *sn, AddressSpace::NmBuildingAutomation *pNodeManager)
 create Programs object belonging to node based on XML description More...
 
UaStatus createAllTypesPDOs (NODE *xsdObject, AddressSpace::NmBuildingAutomation *pNodeManager)
 Create pdos. More...
 
UaStatus createAllTypesPDOs (NODETYPE *nd, AddressSpace::NmBuildingAutomation *pNodeManager)
 Create pdo types. More...
 
template<typename NODEDEF >
UaStatus createItems (NODEDEF *nd, AddressSpace::NmBuildingAutomation *pNodeManager)
 create calculation item More...
 

Additional Inherited Members

- Protected Attributes inherited from AddressSpace::UaControlDeviceGeneric
std::vector< OpcUa::BaseMethod * > m_pMethod
 

Detailed Description

This class provides the creation of all properties and object belonging th can node devices Each object of this class has a io manager to send and receive sdo messages creation on can node structure can be based on node type or XML entry.

Definition at line 19 of file UaCanNodeObject.h.

Constructor & Destructor Documentation

◆ UaCanNodeObject()

CanOpen::UaCanNodeObject::UaCanNodeObject ( NODE nd,
UaObject *  pNodeType,
const UaNodeId &  newNodeId,
AddressSpace::NmBuildingAutomation pNodeManager,
UserDevice::pUserDeviceStruct pcanbus 
)

Constructor based on XML description.

Constructor UanNodeObject class.

Parameters
ndXML entry describing the can node
newNodeIdua node id
pNodeManagerpointer to node manager
pcanbuspointer to parent hardware interface object (can bus)Constructor based on type information
ndXML entry describing the can node
pNodeTypepointer to can node type information
newNodeIdua node id
pNodeManagerpointer to node manager
pcanbuspointer to parent hardware interface object (can bus)
ndpointer to XSD node description
newNodeIdnode id of this new object
pNodeManagernode manager of this node
pcanbusaccess to canbus interface Constructor UanNodeObject class from the type node
ndpoint to XSD node description
pNodeTypethe node of the type CAN node
newNodeIdnode id of this new object
pNodeManagernode manager of this node
pcanbuspointer to canbus interface

Definition at line 58 of file UaCanNodeObject.cpp.

◆ ~UaCanNodeObject()

CanOpen::UaCanNodeObject::~UaCanNodeObject ( void  )
virtual


Destructor

Definition at line 606 of file UaCanNodeObject.cpp.

Member Function Documentation

◆ createAllTypesPDOs() [1/2]

UaStatus CanOpen::UaCanNodeObject::createAllTypesPDOs ( NODE xsdObject,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

Create pdos.

Parameters
xsdObjectXMl description of can node type
pNodeManagerpointer to node manager
Returns
error description

Definition at line 171 of file UaCanNodeObject.cpp.

◆ createAllTypesPDOs() [2/2]

UaStatus CanOpen::UaCanNodeObject::createAllTypesPDOs ( NODETYPE nd,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

Create pdo types.

Parameters
ndXML description of can node type
pNodeManagerpointer to node manager
Returns
error description

Definition at line 100 of file UaCanNodeObject.cpp.

◆ createItems()

template<typename NODEDEF >
UaStatus CanOpen::UaCanNodeObject::createItems ( NODEDEF *  nd,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

create calculation item

Parameters
ndXMl description of can node or type (template parameter)
Returns
error description

Definition at line 613 of file UaCanNodeObject.cpp.

◆ createPDOs()

UaStatus CanOpen::UaCanNodeObject::createPDOs ( PDO pit,
AddressSpace::NmBuildingAutomation pNodeManager,
bool  type 
)
private

Create PDO.

Parameters
pitXML description
pNodeManagerpointer to node manager
typefalse is pdo, true (TPDO* or RPDO*)
Returns
error description

get an object type based on numerical id ( if not return null)

get an object type based on numerical id ( if not return null)

get an object type based on numerical id ( if not return null)

Definition at line 251 of file UaCanNodeObject.cpp.

◆ createPROGRAMs()

UaStatus CanOpen::UaCanNodeObject::createPROGRAMs ( NODE sn,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

create Programs object belonging to node based on XML description

Parameters
snXMl description of can node
pNodeManagerpointer to node manager
Returns
error description

get an object type based on numerical id ( if not return null)

Definition at line 509 of file UaCanNodeObject.cpp.

◆ createSDOITEMs() [1/2]

UaStatus CanOpen::UaCanNodeObject::createSDOITEMs ( NODE sdoi,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

create sdo item object belonging to node based on XML description

Parameters
sdoiXMl description of can node
pNodeManagerpointer to node manager
Returns
error description

get an object type based on numerical id ( if not return null)

Definition at line 536 of file UaCanNodeObject.cpp.

◆ createSDOITEMs() [2/2]

UaStatus CanOpen::UaCanNodeObject::createSDOITEMs ( NODETYPE sdoi,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

create sdo item type object

Parameters
sdoiXMl description of can node type
pNodeManagerpointer to node manager
Returns
error description

get an object type based on numerical id ( if not return null)

Definition at line 570 of file UaCanNodeObject.cpp.

◆ createSDOs() [1/2]

UaStatus CanOpen::UaCanNodeObject::createSDOs ( NODE sn,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

create sdo object belonging to node based on XML description

Parameters
snXMl description of can node
pNodeManagerpointer to node manager
Returns
error description

get an object type based on numerical id ( if not return null)

get an object type based on numerical id ( if not return null)

get an object type based on numerical id ( if not return null)

Definition at line 438 of file UaCanNodeObject.cpp.

◆ createSDOs() [2/2]

UaStatus CanOpen::UaCanNodeObject::createSDOs ( NODETYPE sn,
AddressSpace::NmBuildingAutomation pNodeManager 
)
private

create sdo type object

Parameters
snXMl description of can node type
pNodeManagerpointer to node manager
Returns
error description

get an object type based on numerical id ( if not return null)

get an object type based on numerical id ( if not return null)

get an object type based on numerical id ( if not return null)

Definition at line 349 of file UaCanNodeObject.cpp.

◆ getSDOIOManager()

IOManager* CanOpen::UaCanNodeObject::getSDOIOManager ( )
inline

get io manager

Definition at line 45 of file UaCanNodeObject.h.


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