CVB++ 14.0
StringRegNode Class Reference

String value register. More...

#include <cvb/gevserver/string_reg_node.hpp>

Inherits StringNode.

Public Member Functions

GenApi::AccessMode AccessMode () const override
 Gets the GenApi::AccessMode of this node.
 
void SetAccessMode (const GenApi::AccessMode &value)
 Gets the GenApi::AccessMode of this node. More...
 
std::int64_t Address () const
 Gets the registers address. More...
 
std::vector< IntegerBaseNodePtrAddressNodes () const
 Gets the collection of nodes which define the nodes address. More...
 
GenApi::CacheMode CacheMode () const override
 Gets the caching mode of this register node.
 
void SetCacheMode (const GenApi::CacheMode &value)
 Sets the caching mode of this register node. More...
 
std::vector< NodePtrInvalidatorNodes () const noexcept
 Gets the collection of nodes which, when changed, invalidate this node's cache. More...
 
std::int64_t Length () const
 Gets the number of bytes the register occupies. More...
 
template<class Rep , class Period >
std::chrono::duration< Rep, Period > PollingTime () const
 Gets the polling time of this value. More...
 
template<class Rep , class Period >
void SetPollingTime (const std::chrono::duration< Rep, Period > &timespan)
 Sets the polling time of this value. More...
 
String Value () const
 Gets the value of this string register node. More...
 
void SetValue (const String &value)
 Sets the value of this string register node. More...
 
- Public Member Functions inherited from StringNode
GenApi::AccessMode AccessMode () const override
 
GenApi::CacheMode CacheMode () const override
 Gets the cache mode of this node. More...
 
String Value () const
 Gets the string value. More...
 
void SetValue (const String &value)
 Sets the string value. More...
 
template<class T >
ValueConfig () const
 Gets the value configuration of this string node. More...
 
template<class T >
void SetValueConfig (const T &)
 Sets the value configuration of this string node. More...
 
- Public Member Functions inherited from SelectorNode
bool IsSelector () const
 Gets whether this node selects at least one other. More...
 
std::vector< ValueNodePtrSelectedNodes () const
 Gets all nodes selected by this one. More...
 
- Public Member Functions inherited from ValueNode
virtual bool IsStreamable () const
 Gets whether this node should be used when the camera settings are stored. More...
 
virtual void SetIsStreamable (const std::int64_t &value)
 Sets whether this node should be used when the camera settings are stored. More...
 
template<class Rep , class Period >
std::chrono::duration< Rep, Period > PollingTime () const
 Gets the polling time of this value. More...
 
virtual String ToString () const
 Returns this node's value as a string representation. More...
 
virtual void FromString (const String &value)
 Sets this node's value from the string value. More...
 
EventCookie RegisterEventWrittenUpdated (std::function< void(ValueNode &)> handler)
 Register a listener to node written event. More...
 
void UnregisterEventWrittenUpdated (EventCookie eventCookie) noexcept
 Manually unregister a listener to the node written event. More...
 
EventCookie RegisterEventOnReadUpdated (std::function< void(ValueNode &)> handler)
 Register a listener to node on read event. More...
 
void UnregisterEventOnReadUpdated (EventCookie eventCookie) noexcept
 Manually unregister a listener to the node on read event. More...
 
- Public Member Functions inherited from Node
void Add (const NodePtr &item, const NodeList &kind)
 Adds a Node item . More...
 
bool Remove (const NodePtr &item, const NodeList &kind)
 Remove a single Node item from this collection. More...
 
void * Handle () const noexcept
 Classic API node handle. More...
 
NodeMapPtr NodeMap () const
 Gets the node map of this GevServer node.
 
String ToolTip () const
 Gets the short descriptive text of this node. More...
 
void SetToolTip (const String &value)
 Sets the short descriptive text of this node. More...
 
String Description () const
 Gets the long descriptive text of this node. More...
 
void SetDescription (const String &value)
 Sets the long descriptive text of this node. More...
 
virtual GenApi::AccessMode AccessMode () const
 Gets the GenApi::AccessMode of this node.
 
Cvb::GenApi::AccessMode ImposedAccessMode () const
 Gets the node's default AccessMode. More...
 
void SetImposedAccessMode (const Cvb::GenApi::AccessMode &accessMode)
 Overrides the node's default AccessMode.
 
bool IsImplemented () const
 Helper to check whether this node is implemented. More...
 
IntegerBaseNodePtr IsImplementedConfig () const
 Gets the node that specifies whether a node is implemented in the device or not.
 
void SetIsImplementedConfig (const IntegerBaseNodePtr &node)
 Sets the node that specifies whether a node is implemented in the device or not. More...
 
bool IsAvailable () const
 Helper to check whether this node is available. More...
 
IntegerBaseNodePtr IsAvailableConfig () const
 Gets the node that specifies whether a node is currently available or not. More...
 
void SetIsAvailableConfig (const IntegerBaseNodePtr &node)
 Sets the node that specifies whether a node is currently available or not. More...
 
bool IsReadable () const
 Helper to check whether this node is readable. More...
 
bool IsWritable () const
 Helper to check whether this node is writable. More...
 
IntegerBaseNodePtr IsLockedConfig () const
 Gets the node that specifies whether a node is currently read only or not. More...
 
void SetIsLockedConfig (const IntegerBaseNodePtr &node)
 Sets the node that specifies whether a node is currently read only or not. More...
 
virtual Cvb::GenApi::CacheMode CacheMode () const
 Gets the cache mode of this node. More...
 
Cvb::GenApi::Visibility Visibility () const
 Gets the complexity level of this node. More...
 
void SetVisibility (const Cvb::GenApi::Visibility &value)
 Gets the complexity level of this node. More...
 
NodePtr AliasNode () const
 Gets the node that is an alias value for this node. More...
 
void SetAliasNode (const NodePtr &value)
 Sets the node that is an alias value for this node. More...
 
String Name () const
 Gets the full name of this node. More...
 
String NameOnly () const
 Gets the name of this node without namespace. More...
 
GevServer::Namespace Namespace () const
 Gets the namespace this node is in. More...
 
String EventID () const
 Nodes with an event identifier may become invalidated if an event/message is delivered from the device. More...
 
bool IsFeature () const
 Gets whether this node is considered a feature node. More...
 
bool IsDeprecated () const
 Gets whether this node is considered deprecated. More...
 
String DisplayName () const
 Gets the display name of this node. More...
 
void SetDisplayName (const String &value)
 Sets the display name of this node. More...
 
EventCookie RegisterEventUpdated (std::function< void(Node &)> handler)
 Register a listener to node updated event. More...
 
void UnregisterEventUpdated (EventCookie eventCookie) noexcept
 Manually unregister a listener to the node updated event. More...
 
template<class NodeT , class ValueConfigNodeType >
ValueNodePtr GetTerminalRegisterNode (const NodeT *node, std::function< bool(Node *)> f) const
 Try to get terminal register node. More...
 

Static Public Member Functions

static StringRegNodePtr Create (const String &name, const GevServer::Namespace &nameSpace, const std::int64_t &address, const std::int64_t &length)
 Creates a new StringRegNode with the given name and nameSpace . More...
 
static StringRegNodePtr Create (const String &name, const std::int64_t &address, const std::int64_t &length)
 Creates a new StringRegNode with the given name . More...
 
static StringRegNodePtr Create (const String &name, const std::int64_t &length)
 Creates a new StringRegNode with the given name . More...
 
- Static Public Member Functions inherited from StringNode
static StringNodePtr Create (const String &name, const GevServer::Namespace &nameSpace)
 Creates a new StringNode with the given name and nameSpace . More...
 
static StringNodePtr Create (const String &name)
 Creates a new StringNode with the given name . More...
 
- Static Public Member Functions inherited from Node
static NodePtr FromName (const NodeMapPtr &nodeMap, const String &name)
 Factory to create the appropriate Node object on the given nodeMap based on the given name . More...
 
template<class T , class... ARGS>
static std::shared_ptr< T > FromHandle (HandleGuard< Node > &&guard, ARGS &&... args)
 Factory to create the appropriate Node object based on the given handle . More...
 

Additional Inherited Members

- Protected Member Functions inherited from Node
template<class T >
std::vector< std::shared_ptr< T > > GetDependentNodes (const NodeList &type) const
 Gets the nodes categorized by this node. More...
 
- Static Protected Member Functions inherited from Node
static String EnsureNodeNameOnly (const String &name)
 Throws if the given name has a namespace prefix. More...
 
static NodePtr FromHandle (HandleGuard< Node > &&guard, const NodeMapPtr &nodeMap)
 Factory to create the appropriate Node object based on the given handle . More...
 
static GevServer::Namespace ParseNamespace (const String &name)
 Gets the Namespace from the given name . More...
 
static String ParseName (const String &name)
 Gets the name part of the given node name . More...
 
static GevServer::NodeType NodeType (void *handle)
 Gets the node type from the nodes native handle. More...
 

Detailed Description

String value register.

Member Function Documentation

◆ Address()

std::int64_t Address ( ) const
inline

Gets the registers address.

Returns
The address.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ AddressNodes()

std::vector< IntegerBaseNodePtr > AddressNodes ( ) const
inline

Gets the collection of nodes which define the nodes address.

This collection does not contain the address constant from the creation of the node; only the additional nodes for dynamic addresses. The IRegisterNode.Address property is the sum of the initial address constant and the current values of the nodes of this collection.

Change is only possible as long as the GevServer::State is GevServer::State::Configuration.

Collection containing all address nodes.

◆ Create() [1/3]

static StringRegNodePtr Create ( const String name,
const GevServer::Namespace nameSpace,
const std::int64_t address,
const std::int64_t length 
)
inlinestatic

Creates a new StringRegNode with the given name and nameSpace .

You must add this node to a NodeMap before most operations are possible!

Parameters
nameNode name without namespace prefix.
nameSpaceNamespace to place the node in.
addressAddress in the register map; -1 for auto-address. Must be a multiple of four.
lengthLength of the string in bytes. Must be a multiple of four.

◆ Create() [2/3]

static StringRegNodePtr Create ( const String name,
const std::int64_t address,
const std::int64_t length 
)
inlinestatic

Creates a new StringRegNode with the given name .

If the name does not contain a namespace prefix the Namespace::Custom is used.

You must add this node to a NodeMap before most operations are possible!

Parameters
nameName with optional namespace prefix.
addressAddress in the register map; -1 for auto-address. Must be a multiple of four.
lengthLength of the string in bytes. Must be a multiple of four.

◆ Create() [3/3]

static StringRegNodePtr Create ( const String name,
const std::int64_t length 
)
inlinestatic

Creates a new StringRegNode with the given name .

If the name does not contain a namespace prefix the Namespace::Custom is used.

///

Parameters
addressAddress in the register map is automaticialy set.

You must add this node to a NodeMap before most operations are possible!

Parameters
nameName with optional namespace prefix.
lengthLength of the string in bytes. Must be a multiple of four.

◆ InvalidatorNodes()

std::vector< NodePtr > InvalidatorNodes ( ) const
inlinenoexcept

Gets the collection of nodes which, when changed, invalidate this node's cache.

Change is only possible as long as the GevServer::State is GevServer::State::Configuration.

Collection containing all invalidator nodes.

◆ Length()

std::int64_t Length ( ) const
inline

Gets the number of bytes the register occupies.

Returns
The number of bytes.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ PollingTime()

std::chrono::duration< Rep, Period > PollingTime ( ) const
inline

Gets the polling time of this value.

If this node is not intended to be polled TimeSpan.Zero is used.

◆ SetAccessMode()

void SetAccessMode ( const GenApi::AccessMode value)
inline

Gets the GenApi::AccessMode of this node.

Set operation is only possible as long as the GevServer::State is GevServer::State::Configuration.

◆ SetCacheMode()

void SetCacheMode ( const GenApi::CacheMode value)
inline

Sets the caching mode of this register node.

Set operation is only possible as long as the GevServer::State is GevServer::State::Configuration.

◆ SetPollingTime()

void SetPollingTime ( const std::chrono::duration< Rep, Period > &  timespan)
inline

Sets the polling time of this value.

Attention: here only this node is directly queried and not also the nodes it depends on! This differs from the GenApi implementation.

If this node is not intended to be polled TimeSpan.Zero is returned/set.

◆ SetValue()

void SetValue ( const String value)
inline

Sets the value of this string register node.

Parameters
[in]valueThe new value.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Value()

String Value ( ) const
inline

Gets the value of this string register node.

Returns
The current value.
Exceptions
Anyexception derived from std::exception including CvbException.