Public Member Functions | Static Public Member Functions | List of all members
FloatNode Class Reference

A FloatNode object provides an interface for storage and manipulation of floating point numbers. More...

#include <cvb/opcua/float_node.hpp>

Inherits VariableNode.

Public Member Functions

double Value () const
 Returns the saved value of the node. More...
 
void SetValue (double value)
 Sets 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 FloatNodePtr Create (std::uint16_t namespaceIndex, const Cvb::String &name, const OpcUa::NodeID &parentNodeID, double value)
 Creates an OPCUA Variable with the specified parameter, data type and set its value as double. More...
 

Detailed Description

A FloatNode object provides an interface for storage and manipulation of floating point numbers.

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

Member Function Documentation

◆ Create()

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

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

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 double.
Returns
std::shared_ptr to a FloatNode
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.
Examples
OpcUa/BareboneServer, and OpcUa/ServerClientInteraction.

◆ SetValue()

void SetValue ( double  value)
inline

Sets 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()

double 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.
Examples
OpcUa/ServerClientInteraction.