OpcUaCanOpen
CANopen OPC-UA server
|
NmBuildingAutomation is a class defining all basic features of OpcUaCanOpenServer
More...
#include <NmBuildingAutomation.h>
Inherits NodeManagerBase.
Public Member Functions | |
NmBuildingAutomation (shared_ptr< UserDevice::ControlInterface > conInterf, const UaString nameOfSerevr) | |
The constructor NmBuildingAutomation More... | |
virtual | ~NmBuildingAutomation () |
destructor More... | |
virtual UaStatus | afterStartUp () |
function create the address space for the bus based on XML parser information More... | |
virtual UaStatus | beforeShutDown () |
the place where the nodes should be created More... | |
virtual UaStatus | readValues (const UaVariableArray &arrUaVariables, UaDataValueArray &arrDataValues) |
to executed need action to to the server softly More... | |
virtual UaStatus | writeValues (const UaVariableArray &arrUaVariables, const PDataValueArray &arrpDataValues, UaStatusCodeArray &arrStatusCodes) |
IOManagerUaNode implementation to write. More... | |
virtual IOManager * | getIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const |
function for determining on iomanager for attribute of node More... | |
virtual VariableHandle * | getVariableHandler (Session *session, VariableHandle::ServiceType serviceType, OpcUa_NodeId *nodeId, OpcUa_Int32 attributeId) |
get handler using OpcUa toolkit for io operations More... | |
UaNodeId | getNewNodeId (const UaNode *, const UaString) |
function to create the new node id based on name More... | |
UaNodeId | getTopNodeId (const UaNode *pNode) const |
produce new node id based on parent id and string More... | |
UaNode * | getUpNode (const UaNode *pNode) const |
get top node id (canbus) More... | |
UaString | getDefaultLocale () const |
get parent node More... | |
OpcUa_Int32 | findUaVariables (const OpcUa::BaseObjectType *pParObj, string &pattern, UaControlVariableSet &storage) |
find set of variables in address space More... | |
OpcUa_Int32 | findUaNodeVariables (UaNode *pNode, string &pattern, UaControlVariableSet &storage) |
get set of variable of type More... | |
UaObject * | getInstanceDeclarationObject (OpcUa_UInt32 numericIdentifier, NodeManagerUaNode *nm) |
Connection to control interface. More... | |
UaVariable * | getInstanceDeclarationVariable (const UaNodeId &n) |
get a variable based on node id ( if not return null) More... | |
UaObjectType * | getInstanceDeclarationObjectType (OpcUa_UInt32 numericIdentifier) |
get an object type based on numerical id ( if not return null) More... | |
UaVariableType * | getInstanceDeclarationVariableType (OpcUa_UInt32 numericIdentifier) |
get an object type based on numerical id ( if not return null) More... | |
UaNode * | findNode (const UaNodeId &NodeId) const |
Public Attributes | |
shared_ptr< UserDevice::ControlInterface > | m_pControlInterface |
Private Member Functions | |
UA_DISABLE_COPY (NmBuildingAutomation) | |
template<typename X > | |
X * | getInstanceDeclaration (OpcUa_UInt32 numericIdentifier, NodeManagerUaNode *nm) |
get parent node More... | |
template<typename X > | |
X * | getInstanceDeclaration (const UaNodeId &n) |
UaStatus | createTypeNodes () |
UaStatus | createNodeTypes () |
create of ua node types More... | |
UaStatus | createCanbuses () |
create of cannode types More... | |
Private Attributes | |
UaString | m_sNameNodeId |
create of canbuses More... | |
OpcUa_Int32 | m_iNumNameNodeId |
CanOpenOpcServerConfig::NODETYPE_sequence | m_nodetypes |
XML configuration structure. More... | |
CanOpenOpcServerConfig::CANBUS_sequence | m_canbuses |
list of nodes More... | |
CanOpenOpcServerConfig::ITEM_sequence | m_items |
list of canbuses More... | |
CanOpenOpcServerConfig::REGEXPR_sequence | m_regexprisson |
list of calculated items More... | |
NmBuildingAutomation is a class defining all basic features of OpcUaCanOpenServer
This class inherits the abstract NodeManagerBase.
the afterStartUp() is to create address space of the server and . Opc Ua toolkit calls it after startup. All nodes (types, objects,variables, references) are created by it. Also user device object and connection with address space are defined here
The function beforeShutDown executes when the server shutdown to stop server softly.
The Opc Ua toolkit defines two modes of operations:
Also the NmBuildingAutomation has several function to facilitate of manipulating of ua nodes.
Definition at line 52 of file NmBuildingAutomation.h.
AddressSpace::NmBuildingAutomation::NmBuildingAutomation | ( | shared_ptr< UserDevice::ControlInterface > | conInterf, |
const UaString | nameOfServer | ||
) |
The constructor NmBuildingAutomation
The constructor NmBuildingAutomation.
conInterf | pointer to the device interface |
nameOfServer | - server name |
Definition at line 32 of file NmBuildingAutomation.cpp.
|
virtual |
destructor
Definition at line 86 of file NmBuildingAutomation.cpp.
|
virtual |
function create the address space for the bus based on XML parser information
Definition at line 93 of file NmBuildingAutomation.cpp.
|
virtual |
the place where the nodes should be created
Definition at line 204 of file NmBuildingAutomation.cpp.
|
private |
create of cannode types
|
private |
create of ua node types
|
private |
|
inline |
Definition at line 167 of file NmBuildingAutomation.h.
OpcUa_Int32 AddressSpace::NmBuildingAutomation::findUaNodeVariables | ( | UaNode * | pNode, |
string & | pattern, | ||
UaControlVariableSet & | storage | ||
) |
get set of variable of type
find set of variables starting from node
find set of variables starting from node
pNode | pointer to starting node |
pattern | searching pattern |
storage | return found variables |
pNode | pointer to starting node |
pattern | searching pattern |
storage | return found variables |
Definition at line 439 of file NmBuildingAutomation.cpp.
OpcUa_Int32 AddressSpace::NmBuildingAutomation::findUaVariables | ( | const OpcUa::BaseObjectType * | pParObj, |
string & | pattern, | ||
UaControlVariableSet & | storage | ||
) |
find set of variables in address space
find set of variables
pParObj | pointer to type node |
pattern | searching pattern |
storage | return found variables |
Definition at line 420 of file NmBuildingAutomation.cpp.
|
inline |
get parent node
Definition at line 95 of file NmBuildingAutomation.h.
|
inlineprivate |
get parent node
Try to find the instance declaration node with the numeric identifier and the namespace index of this node manager
Definition at line 171 of file NmBuildingAutomation.h.
|
inlineprivate |
Try to find the instance declaration node with the numeric identifier and the namespace index of this node manager
Definition at line 181 of file NmBuildingAutomation.h.
|
inline |
Connection to control interface.
get an object based on numerical id ( if not return null)
Definition at line 117 of file NmBuildingAutomation.h.
|
inline |
get an object type based on numerical id ( if not return null)
Definition at line 129 of file NmBuildingAutomation.h.
|
inline |
get a variable based on node id ( if not return null)
Definition at line 123 of file NmBuildingAutomation.h.
|
inline |
get an object type based on numerical id ( if not return null)
Definition at line 148 of file NmBuildingAutomation.h.
|
virtual |
function for determining on iomanager for attribute of node
This function returns IOManager for mode and attribute
pUaNode | node asking the io manager |
attributeId | attribute id for different attribute can be used different io manager |
pUaNode | pointer to UaN asking the IO manager |
attributeId | id of attribute of node |
Definition at line 339 of file NmBuildingAutomation.cpp.
UaNodeId AddressSpace::NmBuildingAutomation::getNewNodeId | ( | const UaNode * | pNode, |
const UaString | name | ||
) |
function to create the new node id based on name
Definition at line 40 of file NmBuildingAutomation.cpp.
UaNodeId AddressSpace::NmBuildingAutomation::getTopNodeId | ( | const UaNode * | pNode | ) | const |
produce new node id based on parent id and string
Get NodeId of top node.
Definition at line 58 of file NmBuildingAutomation.cpp.
UaNode * AddressSpace::NmBuildingAutomation::getUpNode | ( | const UaNode * | pNode | ) | const |
get top node id (canbus)
Definition at line 70 of file NmBuildingAutomation.cpp.
|
virtual |
get handler using OpcUa toolkit for io operations
Get the variable handle for the passed node Id.
session | point to session structure |
serviceType | type of operation (read, write and monitoring) |
nodeid | node identifier of variable |
attributeId | identifier of attribute of variable |
Definition at line 355 of file NmBuildingAutomation.cpp.
|
virtual |
to executed need action to to the server softly
IOManagerUaNode implementation to read
Definition at line 244 of file NmBuildingAutomation.cpp.
|
private |
|
virtual |
IOManagerUaNode implementation to write.
Trace level settings
Send data or execute the command = type id numeric value
Definition at line 278 of file NmBuildingAutomation.cpp.
|
private |
list of nodes
Definition at line 202 of file NmBuildingAutomation.h.
|
private |
Definition at line 198 of file NmBuildingAutomation.h.
|
private |
list of canbuses
Definition at line 203 of file NmBuildingAutomation.h.
|
private |
XML configuration structure.
Definition at line 201 of file NmBuildingAutomation.h.
shared_ptr<UserDevice::ControlInterface> AddressSpace::NmBuildingAutomation::m_pControlInterface |
Definition at line 115 of file NmBuildingAutomation.h.
|
private |
list of calculated items
Definition at line 204 of file NmBuildingAutomation.h.
|
private |
create of canbuses
Definition at line 197 of file NmBuildingAutomation.h.