CVB++ 14.0
IntegerNode Class Reference

A Node with integer values provides an interface for storage and manipulation of integer (default int representation) numbers.
More...

#include <cvb/opcua/integer_node.hpp>

Inherits VariableNode.

Public Member Functions

std::int64_t Value () const
 Returns the saved value of the node. More...
 
void SetValue (std::int64_t value)
 Set value of the node to the given value. More...
 
- Public Member Functions inherited from VariableNode
OpcUa::DataType DataType () const
 
EventCookie RegisterWriteCallback (std::function< void()> handler)
 
EventCookie RegisterReadCallback (std::function< void()> handler)
 
void UnregisterCallback (EventCookie eventCookie)
 
- 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...
 

Static Public Member Functions

static IntegerNodePtr Create (std::uint16_t namespaceIndex, const Cvb::String &name, const OpcUa::NodeID &parentNodeID, std::int64_t value)
 Creates an OPCUA Variable with the specified parameter, data type and set its value as an integer. More...
 

Detailed Description

A Node with integer values provides an interface for storage and manipulation of integer (default int representation) numbers.

Note
A derivative of OpcUa::BaseNode and OpcUa::VariableNode.
For details OPCUA specification:
https://opcfoundation.org/developer-tools/specifications-unified-architecture/

Member Function Documentation

◆ Create()

static IntegerNodePtr Create ( std::uint16_t  namespaceIndex,
const Cvb::String name,
const OpcUa::NodeID parentNodeID,
std::int64_t  value 
)
inlinestatic

Creates an OPCUA Variable with the specified parameter, data type and set its value as an integer.

Note
The OPCUA BaseNode which is created by this function has the default type definition OPCUA BaseVariableType. Further, the default reference type is OPCUA HasComponenent. Callbacks can be registered once the node has been added with Server::AddNode to a Server with VariableNode::RegisterWriteCallback or VariableNode::RegisterWriteCallback
Parameters
[in]namespaceIndexIndex of the namespace where the OPCUA BaseNode should belong to.
[in]nameString literal for non-localized, human-readable name of an OPCUA BaseNode.
[in]parentNodeIDOPCUA NodeId of the parent to which the OPCUA BaseNode belongs.
[in]valueSets the value of the OPCUA Variable as integer.
Returns
std::shared_ptr to a IntegerNode
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ SetValue()

void SetValue ( std::int64_t  value)
inline

Set value of the node to the given value.

Parameters
[in]valueThe value of the node
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ Value()

std::int64_t Value ( ) const
inline

Returns the saved value of the node.

Returns
the value of the node
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.