OpcUaCanOpen
CANopen OPC-UA server
AddressSpace::UaControlDeviceGeneric Class Reference

Generic class type to create UaObject based on type information and create connection to hardware objects. More...

#include <UaControlDeviceGeneric.h>

Inherits BaseObjectTypeGeneric.

Inherited by AddressSpace::UaProgramItem, CanOpen::UaCanBusObject, and CanOpen::UaCanNodeObject.

Public Member Functions

 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...
 

Protected Attributes

std::vector< OpcUa::BaseMethod * > m_pMethod
 

Private Member Functions

 UA_DISABLE_COPY (UaControlDeviceGeneric)
 

Detailed Description

Generic class type to create UaObject based on type information and create connection to hardware objects.

The type information of system object can be represented as a UaNode graph.
Each node connects to another node via reference. In OPC Ua several reference type is defined.

  • OpcUaId_HasSubtype describes an inheritance.
  • OpcUaId_HasComponent - aggregation

The type information are created by node manager method afterStartUp. Actually when creates the object based on type information the tree of objects is created.

Definition at line 27 of file UaControlDeviceGeneric.h.

Constructor & Destructor Documentation

◆ UaControlDeviceGeneric() [1/3]

AddressSpace::UaControlDeviceGeneric::UaControlDeviceGeneric ( const UaString &  name,
const UaNodeId &  newNodeId,
NmBuildingAutomation pNodeManager,
OpcUa_Int32  baTypeId,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf 
)

Constructor.

Basic class represents the common features of can bus and can node.

Parameters
namename of ua object
newNodeIdua node id of created object
pNodeManagerpointer to node manager
baTypeIdthis is function code which is used to make a link to hardware object
confXML description of object created
interfpointer of parent hardware object. This pointer passed to interface object to create internal structure

Definition at line 14 of file UaControlDeviceGeneric.cpp.

◆ UaControlDeviceGeneric() [2/3]

AddressSpace::UaControlDeviceGeneric::UaControlDeviceGeneric ( const UaString &  name,
const UaNodeId &  newNodeId,
NmBuildingAutomation pNodeManager,
UaObjectType *  instance,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf 
)

Constructor.

Basic class represents the common features of can bus and can node.

Parameters
namename of ua object
newNodeIdua node id of created object
pNodeManagerpointer to node manager
instancepointer to object type
confXML description of object created
interfpointer of parent hardware object. This pointer passed to interface object to create internal structure

Definition at line 45 of file UaControlDeviceGeneric.cpp.

◆ UaControlDeviceGeneric() [3/3]

AddressSpace::UaControlDeviceGeneric::UaControlDeviceGeneric ( const UaString &  name,
const UaNodeId &  newNodeId,
NmBuildingAutomation pNodeManager,
UaObject *  instance,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf 
)

Constructor.

Basic class represents the common features of can bus and can node.

Parameters
namename of ua object
newNodeIdua node id of created object
pNodeManagerpointer to node manager
instancepointer to object
confXML description of object created
interfpointer of parent hardware object. This pointer passed to interface object to create internal structure

Definition at line 79 of file UaControlDeviceGeneric.cpp.

◆ ~UaControlDeviceGeneric()

AddressSpace::UaControlDeviceGeneric::~UaControlDeviceGeneric ( void  )
virtual

Definition at line 107 of file UaControlDeviceGeneric.cpp.

Member Function Documentation

◆ addMethod()

virtual void AddressSpace::UaControlDeviceGeneric::addMethod ( OpcUa::BaseMethod *  meth)
inlinevirtual

get common mutex

Definition at line 137 of file UaControlDeviceGeneric.h.

◆ beginCall()

UaStatus AddressSpace::UaControlDeviceGeneric::beginCall ( MethodManagerCallback *  pCallback,
const ServiceContext &  serviceContext,
OpcUa_UInt32  callbackHandle,
MethodHandle *  pMethodHandle,
const UaVariantArray &  inputArguments 
)
virtual

Implement MethodManager interface this function calls by ua toolkit object when client ask to execute method.

Parameters
pCallbackcallback to return an result
serviceContextinternal structure
callbackHandlehandle of callback function
pMethodHandlemethod handler
inputArgumentsparameters for method
Returns
status - result of operation

Definition at line 129 of file UaControlDeviceGeneric.cpp.

◆ call()

virtual UaStatus AddressSpace::UaControlDeviceGeneric::call ( UaMethod *  ,
const UaVariantArray &  ,
UaVariantArray &  ,
UaStatusCodeArray &  ,
UaDiagnosticInfos &   
)
inlinevirtual

Own synchronous call implementation the can be overridden in subclasses (not use)

Definition at line 126 of file UaControlDeviceGeneric.h.

◆ eventNotifier()

OpcUa_Byte AddressSpace::UaControlDeviceGeneric::eventNotifier ( ) const

this function creates recursively the object tree based on type object

Parameters
curparent ua node
instancepointer to type object
pNodeManagernode manager object
confXML description of object created
interfpointer to parent hardware object
Returns
the object describe the result (good or not) UaStatus UaObjectCreateByType(UaControlDeviceGeneric* cur ,UaObject* instance, NmBuildingAutomation* pNodeManager, xml_schema::type conf, UserDataBase interf);Implement UaObject interface

Definition at line 119 of file UaControlDeviceGeneric.cpp.

◆ getDeviceTypeNumber()

OpcUa_UInt32 AddressSpace::UaControlDeviceGeneric::getDeviceTypeNumber ( ) const

Override UaObject method implementation.

Parameters
pMethodUa methodGet Type Number from type nodeID

Definition at line 124 of file UaControlDeviceGeneric.cpp.

◆ UA_DISABLE_COPY()

AddressSpace::UaControlDeviceGeneric::UA_DISABLE_COPY ( UaControlDeviceGeneric  )
private

Member Data Documentation

◆ m_pMethod

std::vector<OpcUa::BaseMethod*> AddressSpace::UaControlDeviceGeneric::m_pMethod
protected

Definition at line 141 of file UaControlDeviceGeneric.h.


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