CVB++ 14.0
ObjectNode Class Reference

An OPCUA Object Node object. This is the "base" of many more complex node. However the defining feature is to create a ObjectNode from a OPCUA TypeDefinition. Example: A ObjectNode can be created with Namespace0NodeId of "FolderType", i.e. the creation for a folder. More...

#include <cvb/opcua/object_node.hpp>

Inherits BaseNode.

Static Public Member Functions

static ObjectNodePtr CreateFromType (const std::uint16_t NameSpaceIndex, const Cvb::String &Name, const OpcUa::NodeID &Parent, const OpcUa::NodeID &TypeDefinition)
 Creates a OPCUA object node with a given type definition. More...
 

Additional Inherited Members

- Public Member Functions inherited from BaseNode
void * Handle () const noexcept
 Returns C-API style handle to BaseNode Object. More...
 
OpcUa::NodeIDPtr NodeID () const
 Returns the OPCUA NodeID of an OPCUA BaseNode object. More...
 
String BrowseName () const
 Returns the browse name of an OPCUA BaseNode object. More...
 
std::vector< NodeIDPtrBrowse (const BrowseFilter &filter) const
 "Browse" all referenced BaseNodes of this BaseNode. More...
 
String DisplayName () const
 Returns the humanreadable name of a node. More...
 
OpcUa::NodeClass NodeClass () const
 Returns the NodeClass of an OPCUA BaseNode object. More...
 
OpcUa::ConnectionStatus ConnectionStatus () const
 Returns the ConnectionStatus of an OPCUA BaseNode object. More...
 
OpcUa::Access Access () const
 Returns the Access right to an OPCUA BaseNode object. More...
 
String Description () const
 Returns the description OPCUA BaseNode object. More...
 
void AddReference (const OpcUa::BaseNode &destination, const ReferenceType reference, ReferenceDirection direction) const
 Adds a Reference to the OPCUA node. More...
 
std::int64_t GetAttributeAsInt (AttributeID attributeID) const
 Return specific Information about a Opcua::BaseNode. More...
 
void SetAttributeAsInt (AttributeID attributeID, std::int64_t value)
 Set specific Information about a Opcua::BaseNode. More...
 
double GetAttributeAsFloat (AttributeID attributeID) const
 Return specific Information about a Opcua::BaseNode. More...
 
void SetAttributeAsFloat (AttributeID attributeID, double value)
 Set specific Information about a Opcua::BaseNode. More...
 
String GetAttributeAsString (AttributeID attributeID) const
 Return specific Information about a Opcua::BaseNode. More...
 
void SetAttributeAsString (AttributeID attributeID, const String &value)
 Set specific Information about a Opcua::BaseNode. More...
 

Detailed Description

An OPCUA Object Node object. This is the "base" of many more complex node. However the defining feature is to create a ObjectNode from a OPCUA TypeDefinition. Example: A ObjectNode can be created with Namespace0NodeId of "FolderType", i.e. the creation for a folder.

Note
OPCUA nodes are available for different node classes (for details refer to:
https://opcfoundation.org/developer-tools/specifications-unified-architecture/part-3-address-space-model/ and
https://opcfoundation.org/developer-tools/specifications-unified-architecture/part-5-information-model/ for details)

Member Function Documentation

◆ CreateFromType()

static ObjectNodePtr CreateFromType ( const std::uint16_t  NameSpaceIndex,
const Cvb::String Name,
const OpcUa::NodeID Parent,
const OpcUa::NodeID TypeDefinition 
)
inlinestatic

Creates a OPCUA object node with a given type definition.

Note
The nodes will require the node id of the parent node as well as the type definition node id (namspace0 most likely).
Try to avoid using this factory method. Instead use the classes OpcUa::MethodNode or OpcUa::VariableNode (and the derivatives).
Parameters
[in]NameSpaceIndexNamespace index for this node. BaseNode will only be visible via the namespace after adding it to a server.
[in]NameString literal for non-localized, human-readable name of an OPCUA Node.
[in]ParentNodeID of the parent node.
[in]TypeDefinitionNodeID of the type definition.
Returns
The node
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.
Examples
OpcUa/BareboneServer, and OpcUa/ServerClientInteraction.