3#include "../global.hpp"
5#include "integer_base_node.hpp"
8#include "_detail/ihas_value_config.hpp"
9#include "_detail/iconfigurable_register_node.hpp"
10#include "_detail/iconfigurable_command_node.hpp"
24 ,
public Private::IHasValueConfig<IntegerBaseNodePtr>
42 return std::make_shared<IntegerNode>(HandleGuard<Node>(
43 CExports::CreateGSIntegerNodeTyped(name.data(),
static_cast<CExports::TGSNamespace
>(nameSpace))));
76 throw std::runtime_error(
"requested increment config type must be derived from IntegerBaseNode or "
91 "IntegerBaseNode or be of type std::int64_t");
100 auto value = GetTerminalRegisterNode<IntegerNode, IntegerBaseNodePtr>(
101 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode*
>(node) ?
true :
false; });
102 if (value ==
nullptr)
105 return value->AccessMode();
114 auto value = GetTerminalRegisterNode<IntegerNode, IntegerBaseNodePtr>(
115 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode*
>(node) ?
true :
false; });
116 if (value ==
nullptr)
119 return value->CacheMode();
128 auto value = GetTerminalRegisterNode<IntegerNode, IntegerBaseNodePtr>(
this, [](
Node *node) {
129 auto isRegisterNode =
dynamic_cast<Private::IConfigurableRegisterNode*
>(node);
130 auto isCommandNode =
dynamic_cast<Private::IConfigurableCommandNode *
>(node);
131 return (isRegisterNode || isCommandNode) ? true :
false;
133 if (value ==
nullptr)
136 return value->template PollingTime<Rep, Period>();
149 throw std::runtime_error(
"requested max config type must be derived from IntegerBaseNode or be "
168 "IntegerBaseNode or be of type std::int64_t");
181 throw std::runtime_error(
"requested min config type must be derived from IntegerBaseNode or be "
200 "IntegerBaseNode or be of type std::int64_t");
216 throw std::runtime_error(
"requested value config type must be derived from IntegerBaseNode or be "
236 "IntegerBaseNode or be of integral type");
250 void SetUnit(
const String& )
override
256template <>
inline std::int64_t IntegerNode::MaxConfig<std::int64_t>()
const
261template <>
inline void IntegerNode::SetMaxConfig<std::int64_t>(
const std::int64_t &value)
266template <>
inline std::int64_t IntegerNode::MinConfig<std::int64_t>()
const
271template <>
inline void IntegerNode::SetMinConfig<std::int64_t>(
const std::int64_t &value)
276template <>
inline std::int64_t IntegerNode::ValueConfig<std::int64_t>()
const
281template <>
inline std::int64_t IntegerNode::IncrementConfig<std::int64_t>()
const
286template <>
inline void IntegerNode::SetIncrementConfig<std::int64_t>(
const std::int64_t &value)
291template <>
inline void IntegerNode::SetValueConfig<std::int64_t>(
const std::int64_t &value)
Represents an integer number.
Definition: integer_base_node.hpp:19
Represents a integer number.
Definition: integer_node.hpp:26
void SetMinConfig(const T &)
Sets the minimum configuration of this integer node.
Definition: integer_node.hpp:197
void SetMaxConfig(const T &)
Sets the maximum configuration of this integer node.
Definition: integer_node.hpp:165
String Unit() const override
Gets the unit of this node's value.
Definition: integer_node.hpp:245
T MaxConfig() const
Gets the maximum configuration of this integer node.
Definition: integer_node.hpp:147
void SetIncrementConfig(const T &)
Sets the increment of this value.
Definition: integer_node.hpp:88
void SetValueConfig(const T &)
Sets the value configuration of this integer node.
Definition: integer_node.hpp:233
T MinConfig() const
Gets the minimum configuration of this integer node.
Definition: integer_node.hpp:179
GenApi::CacheMode CacheMode() const override
Gets the cache mode by querying all ValueConfigs for it.
Definition: integer_node.hpp:112
T ValueConfig() const
Gets the value configuration of this integer node.
Definition: integer_node.hpp:214
GenApi::AccessMode AccessMode() const override
Gets the access mode by querying all ValueConfigs for it.
Definition: integer_node.hpp:98
static IntegerNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
Creates a new IntegerNode with the given name and nameSpace .
Definition: integer_node.hpp:40
static IntegerNodePtr Create(const String &name)
Creates a new IntegerNode with the given name .
Definition: integer_node.hpp:59
T IncrementConfig() const
Gets and sets the increment configuration of this integer node.
Definition: integer_node.hpp:74
std::chrono::duration< Rep, Period > PollingTime() const
Gets the polling time by querying all ValueConfigs for it.
Definition: integer_node.hpp:126
Basic GevServer node for device feature access.
Definition: decl_node.hpp:36
static GevServer::Namespace ParseNamespace(const String &name)
Gets the Namespace from the given name .
Definition: decl_node.hpp:567
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition: decl_node.hpp:588
CacheMode
Defines how the value is cached.
Definition: genapi.hpp:220
@ NoCache
No caching used.
AccessMode
Access possibility of the node.
Definition: genapi.hpp:185
@ ReadWrite
Node can be read and written to.
Namespace
The possible name spaces a node can be in.
Definition: gevserver.hpp:147
@ Value
Accesses the value configuration.
@ Max
Gets the maximum value.
@ Increment
Gets the increment.
@ Min
Gets the minimum value.
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24