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

This class represent the generic variable created based on XML definitions. More...

#include <UaControlDeviceItem.h>

Inherits AddressSpace::UaControlVariable, and AddressSpace::UaControlVariable.

Public Member Functions

 UaControlDeviceItem (UaNode *cur, NmBuildingAutomation *pNodeManager, UaVariable *instance, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf, UaMutexRefCounted *pSharedMutex)
 Constructor. More...
 
 UaControlDeviceItem (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, UaVariant &dv, UaVariableType *instance, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf, UaMutexRefCounted *pSharedMutex)
 Constructor. More...
 
virtual UaStatus write (UaDataValue &udv)
 
virtual UaStatus read ()
 read data from hardware More...
 
virtual UaStatus read (IOVariableCallback *iom)
 read data from hardware via callback function this function are using for subscribe item More...
 
void setAccess (DirectionType ac)
 Set Access function where ac can be CAN_IN,CAN_OUT,CAN_IO. More...
 
virtual void addMethod (OpcUa::BaseMethod *meth)
 
 UaControlDeviceItem (UaNode *cur, NmBuildingAutomation *pNodeManager, UaVariable *instance, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf, UaMutexRefCounted *pSharedMutex)
 Constructor. More...
 
 UaControlDeviceItem (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, UaVariant &dv, UaVariableType *instance, ::xml_schema::type *conf, UserDevice::pUserDeviceStruct *interf, UaMutexRefCounted *pSharedMutex)
 Constructor. More...
 
virtual UaStatus write (UaDataValue &udv)
 
virtual UaStatus read ()
 read data from hardware More...
 
virtual UaStatus read (IOVariableCallback *iom)
 read data from hardware via callback function this function are using for subscribe item More...
 
void setAccess (DirectionType ac)
 Set Access function where ac can be CAN_IN,CAN_OUT,CAN_IO. More...
 
virtual void addMethod (OpcUa::BaseMethod *meth)
 
- Public Member Functions inherited from AddressSpace::UaControlVariable
 UaControlVariable (UaNode *cur, NmBuildingAutomation *pNodeManager, UaVariable *instance, UaMutexRefCounted *pSharedMutex)
 Constructor. More...
 
 UaControlVariable (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, UaVariant &dv, UaMutexRefCounted *pSharedMutex)
 
virtual ~UaControlVariable ()
 
virtual UaStatus setValue (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel)
 Redefine setValue function to sent data change signal;. More...
 
virtual UaStatus setValueOnChange (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel)
 Redefine setValue function to sent data change signal;. More...
 
virtual void connectItem (UaControlVariable *item)
 
virtual UaNodeId typeDefinitionId () const
 
virtual void setTypeDefinition (UaNodeId uni)
 set node id of type of variable More...
 
void convertToDouble (const UaDataValue &dataValue)
 Signal. More...
 
 UaControlVariable (UaNode *cur, NmBuildingAutomation *pNodeManager, UaVariable *instance, UaMutexRefCounted *pSharedMutex)
 Constructor. More...
 
 UaControlVariable (const UaString &name, const UaNodeId &newNodeId, NmBuildingAutomation *pNodeManager, UaVariant &dv, UaMutexRefCounted *pSharedMutex)
 
virtual ~UaControlVariable ()
 
virtual UaStatus setValue (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel)
 Redefine setValue function to sent data change signal;. More...
 
virtual UaStatus setValueOnChange (Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel)
 Redefine setValue function to sent data change signal;. More...
 
virtual void connectItem (UaControlVariable *item)
 
virtual UaNodeId typeDefinitionId () const
 
virtual void setTypeDefinition (UaNodeId uni)
 set node id of type of variable More...
 
void convertToDouble (const UaDataValue &dataValue)
 Signal. More...
 

Protected Attributes

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

Private Member Functions

 UA_DISABLE_COPY (UaControlDeviceItem)
 
 UA_DISABLE_COPY (UaControlDeviceItem)
 

Additional Inherited Members

- Public Attributes inherited from AddressSpace::UaControlVariable
boost::signals2::signal< void(Session *pSession, const UaDataValue &dataValue, OpcUa_Boolean checkAccessLevel) > valueChange
 write date to hardware More...
 
OpcUa_Double curValue
 

Detailed Description

This class represent the generic variable created based on XML definitions.

It comprises the function using all variable in OpcUaCanOpenServer. (read,write, TypeDefinition)

Definition at line 193 of file UaControlDeviceItem.h.

Constructor & Destructor Documentation

◆ UaControlDeviceItem() [1/4]

AddressSpace::UaControlDeviceItem::UaControlDeviceItem ( UaNode *  cur,
NmBuildingAutomation pNodeManager,
UaVariable *  instance,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf,
UaMutexRefCounted *  pSharedMutex 
)

Constructor.

Parameters
namethe name of ua node
newNodeIditem ua node id
pNodeManagerpointer to node manager
dvinitial value of item (usually empty)
baTypeIdidentifier of a device (using to connect to hardware device)
confXML configuration entry for this node
interfpointer to the object representing hardware device
pSharedMutexpointer to shared mutex (using toolkit)

Definition at line 28 of file UaControlDeviceItem.cpp.

◆ UaControlDeviceItem() [2/4]

AddressSpace::UaControlDeviceItem::UaControlDeviceItem ( const UaString &  name,
const UaNodeId &  newNodeId,
NmBuildingAutomation pNodeManager,
UaVariant &  dv,
UaVariableType *  instance,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf,
UaMutexRefCounted *  pSharedMutex 
)

Constructor.

Parameters
namethe name of ua node
newNodeIditem ua node id
pNodeManagerpointer to node manager
dvinitial value of item (usually empty)
instancepointer to variable type defining common parameters
confxml configuration entry for this node
interfpointer to the object representing hardware device
pSharedMutexpointer to shared mutex (using toolkit)

Definition at line 54 of file UaControlDeviceItem.cpp.

◆ UaControlDeviceItem() [3/4]

AddressSpace::UaControlDeviceItem::UaControlDeviceItem ( UaNode *  cur,
NmBuildingAutomation pNodeManager,
UaVariable *  instance,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf,
UaMutexRefCounted *  pSharedMutex 
)

Constructor.

Parameters
namethe name of ua node
newNodeIditem ua node id
pNodeManagerpointer to node manager
dvinitial value of item (usually empty)
baTypeIdidentifier of a device (using to connect to hardware device)
confXML configuration entry for this node
interfpointer to the object representing hardware device
pSharedMutexpointer to shared mutex (using toolkit)

◆ UaControlDeviceItem() [4/4]

AddressSpace::UaControlDeviceItem::UaControlDeviceItem ( const UaString &  name,
const UaNodeId &  newNodeId,
NmBuildingAutomation pNodeManager,
UaVariant &  dv,
UaVariableType *  instance,
::xml_schema::type conf,
UserDevice::pUserDeviceStruct interf,
UaMutexRefCounted *  pSharedMutex 
)

Constructor.

Parameters
namethe name of ua node
newNodeIditem ua node id
pNodeManagerpointer to node manager
dvinitial value of item (usually empty)
instancepointer to variable type defining common parameters
confxml configuration entry for this node
interfpointer to the object representing hardware device
pSharedMutexpointer to shared mutex (using toolkit)

Member Function Documentation

◆ addMethod() [1/2]

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

Definition at line 270 of file UaControlDeviceItem.hpp.

◆ addMethod() [2/2]

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

Definition at line 271 of file UaControlDeviceItem.h.

◆ read() [1/4]

virtual UaStatus AddressSpace::UaControlDeviceItem::read ( )
virtual

read data from hardware

Reimplemented from AddressSpace::UaControlVariable.

◆ read() [2/4]

UaStatus AddressSpace::UaControlDeviceItem::read ( )
virtual

read data from hardware

Reimplemented from AddressSpace::UaControlVariable.

Definition at line 119 of file UaControlDeviceItem.cpp.

◆ read() [3/4]

virtual UaStatus AddressSpace::UaControlDeviceItem::read ( IOVariableCallback *  iom)
virtual

read data from hardware via callback function this function are using for subscribe item

Parameters
iomcallback function to inform toolkit about value changing

◆ read() [4/4]

UaStatus AddressSpace::UaControlDeviceItem::read ( IOVariableCallback *  iom)
virtual

read data from hardware via callback function this function are using for subscribe item

Parameters
iomcallback function to inform toolkit about value changing

Definition at line 132 of file UaControlDeviceItem.cpp.

◆ setAccess() [1/2]

void AddressSpace::UaControlDeviceItem::setAccess ( DirectionType  ac)
inline

Set Access function where ac can be CAN_IN,CAN_OUT,CAN_IO.

Definition at line 253 of file UaControlDeviceItem.hpp.

◆ setAccess() [2/2]

void AddressSpace::UaControlDeviceItem::setAccess ( DirectionType  ac)
inline

Set Access function where ac can be CAN_IN,CAN_OUT,CAN_IO.

Definition at line 254 of file UaControlDeviceItem.h.

◆ UA_DISABLE_COPY() [1/2]

AddressSpace::UaControlDeviceItem::UA_DISABLE_COPY ( UaControlDeviceItem  )
private

◆ UA_DISABLE_COPY() [2/2]

AddressSpace::UaControlDeviceItem::UA_DISABLE_COPY ( UaControlDeviceItem  )
private

◆ write() [1/2]

virtual UaStatus AddressSpace::UaControlDeviceItem::write ( UaDataValue &  udv)
virtual

Reimplemented from AddressSpace::UaControlVariable.

◆ write() [2/2]

UaStatus AddressSpace::UaControlDeviceItem::write ( UaDataValue &  udv)
virtual

Reimplemented from AddressSpace::UaControlVariable.

Definition at line 98 of file UaControlDeviceItem.cpp.

Member Data Documentation

◆ m_pMethod

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

Definition at line 273 of file UaControlDeviceItem.h.


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