3#include "../global.hpp"
5#include "integer_base_node.hpp"
6#include "value_node.hpp"
9#include "_detail/ihas_value_config.hpp"
10#include "_detail/iconfigurable_register_node.hpp"
11#include "_detail/iconfigurable_command_node.hpp"
25 ,
public Private::IHasValueConfig<IntegerBaseNodePtr>
44 return std::make_shared<EnumerationNode>(HandleGuard<Node>(
45 CExports::CreateGSEnumerationNodeTyped(okName.data(),
static_cast<CExports::TGSNamespace
>(nameSpace))));
70 auto value = GetTerminalRegisterNode<EnumerationNode, IntegerBaseNodePtr>(
71 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode*
>(node) ?
true :
false; });
75 return value->AccessMode();
85 auto value = GetTerminalRegisterNode<EnumerationNode, IntegerBaseNodePtr>(
86 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode*
>(node) ?
true :
false; });
90 return value->CacheMode();
100 auto value = GetTerminalRegisterNode<EnumerationNode, IntegerBaseNodePtr>(
this, [](
Node *node) {
101 auto isRegisterNode =
dynamic_cast<Private::IConfigurableRegisterNode*
>(node);
102 auto isCommandNode =
dynamic_cast<Private::IConfigurableCommandNode *
>(node);
103 return (isRegisterNode || isCommandNode) ? true :
false;
105 if (value ==
nullptr)
108 return value->template PollingTime<Rep, Period>();
132 throw std::runtime_error(
"requested value config type must be derived from GSIntergerBaseNode "
133 "or be of type int64_t");
153 "IntegerBaseNode or be of type std::int64_t");
183 NativeCall([&]() {
return CExports::GSNSetAsStringTyped(
Handle(), value.data()); });
192 auto bufferSize = NativeCall<size_t>(
193 [&](
size_t &size) {
return CExports::GSNGetAsStringTyped(
Handle(),
reinterpret_cast<Char *
>(0), size); });
194 bufferSize +=
sizeof(
Char);
196 NativeCall([&]() {
return CExports::GSNGetAsStringTyped(
Handle(), buffer.data(), bufferSize); });
197 return buffer.data();
201template <>
inline std::int64_t EnumerationNode::ValueConfig<std::int64_t>()
const
206template <>
inline void EnumerationNode::SetValueConfig<std::int64_t>(
const std::int64_t &value)
A GenApi::EnumerationNode that is configurable.
Definition: enumeration_node.hpp:27
void SetValue(const String &value)
Sets the symbolic value of this enumeration.
Definition: enumeration_node.hpp:175
String Value() const
Gets the symbolic value of this enumeration.
Definition: enumeration_node.hpp:161
void SetValueConfig(const T &)
Sets the value configuration of this enumeration node.
Definition: enumeration_node.hpp:150
void FromString(const String &value) override
Same as assigning value to Value.
Definition: enumeration_node.hpp:181
std::vector< EnumEntryNodePtr > Entries() const
Gets all enum entries of this enumeration.
Definition: enumeration_node.hpp:117
GenApi::CacheMode CacheMode() const override
Gets the cache mode by querying all ValueConfigs for it.
Definition: enumeration_node.hpp:83
T ValueConfig() const
Gets the value configuration of this enumeration node.
Definition: enumeration_node.hpp:130
GenApi::AccessMode AccessMode() const override
Gets the access mode by querying all ValueConfigs for it.
Definition: enumeration_node.hpp:68
static EnumerationNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
Creates a new EnumerationNode with the given name and nameSpace .
Definition: enumeration_node.hpp:41
static EnumerationNodePtr Create(const String &name)
Creates a new EnumerationNode with the given name .
Definition: enumeration_node.hpp:62
std::int64_t NumericValue() const
Gets the numeric value of this enumeration.
Definition: enumeration_node.hpp:168
String ToString() const override
Same as getting the Value.
Definition: enumeration_node.hpp:190
std::chrono::duration< Rep, Period > PollingTime() const
Gets the polling time by querying all ValueConfigs for it.
Definition: enumeration_node.hpp:98
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 EnsureNodeNameOnly(const String &name)
Throws if the given name has a namespace prefix.
Definition: decl_node.hpp:540
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition: decl_node.hpp:588
void * Handle() const noexcept
Classic API node handle.
Definition: decl_node.hpp:100
Groups other nodes that are dependent on this one.
Definition: selector_node.hpp:24
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.
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24
char Char
Character type for wide characters or unicode characters.
Definition: string.hpp:70