3#include "../global.hpp"
5#include "float_base_node.hpp"
8#include "_detail/ihas_value_config.hpp"
9#include "_detail/iconfigurable_register_node.hpp"
10#include "_detail/iconfigurable_command_node.hpp"
22 :
public FloatBaseNode
24 ,
public Private::IHasValueConfig<FloatBaseNodePtr>
28 explicit FloatNode(HandleGuard<Node> &&guard)
46 CExports::CreateGSFloatNodeTyped(name.data(),
static_cast<CExports::TGSNamespace
>(nameSpace))));
84 "requested increment config type must be derived from FloatNode or "
102 "requested value config type must be derived from "
103 "FloatNode or be of type double");
113 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode *
>(node) ?
true :
false; });
114 if (value ==
nullptr)
117 return value->AccessMode();
127 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode *
>(node) ?
true :
false; });
128 if (value ==
nullptr)
131 return value->CacheMode();
138 template <
class Rep,
class Period>
142 auto isRegisterNode =
dynamic_cast<Private::IConfigurableRegisterNode *
>(node);
143 auto isCommandNode =
dynamic_cast<Private::IConfigurableCommandNode *
>(node);
144 return (isRegisterNode || isCommandNode) ? true :
false;
146 if (value ==
nullptr)
164 "requested max config type must be derived from FloatNode or be "
184 "requested value config type must be derived from "
185 "FloatNode or be of type double");
200 "requested min config type must be derived from FloatNode or be "
220 "requested min config type must be derived from "
221 "FloatNode or be of type double");
231 auto bufferSize = NativeCall<size_t>([&](
size_t &size) {
232 return CExports::GSNGetInfoAsStringTyped(
Handle(), CExports::TGSNodeInfo::GSNI_Unit,
233 reinterpret_cast<Char *
>(0), size);
236 bufferSize +=
sizeof(
Char);
239 return CExports::GSNGetInfoAsStringTyped(
Handle(), CExports::TGSNodeInfo::GSNI_Unit, buffer.data(),
243 return buffer.data() ?
String(buffer.data()) :
String();
311 "requested value config type must be derived from FloatNode or be "
332 "requested value config type must be derived from "
333 "FloatNode or be of type double");
void SetDisplayPrecision(const double displayPrecision)
Sets the display precision of this node's value.
Definition float_node.hpp:291
void SetMinConfig(const T &)
Sets the minimum configuration of this float node.
Definition float_node.hpp:217
void SetMaxConfig(const T &)
Sets the maximum configuration of this float node.
Definition float_node.hpp:181
T MaxConfig() const
Gets the maximum configuration of this float node.
Definition float_node.hpp:161
void SetUnit(const String &unit)
Sets the unit of this node's value.
Definition float_node.hpp:251
void SetIncrementConfig(const T &)
Sets the increment of this value.
Definition float_node.hpp:99
String Unit() const
Gets the unit of this node's value.
Definition float_node.hpp:229
void SetValueConfig(const T &)
Sets the value configuration of this float node.
Definition float_node.hpp:329
T MinConfig() const
Gets the minimum configuration of this float node.
Definition float_node.hpp:197
static FloatNodePtr Create(const String &name)
Creates a new FloatNode with the given name .
Definition float_node.hpp:62
GenApi::CacheMode CacheMode() const override
Gets the cache mode by querying all ValueConfigs for it.
Definition float_node.hpp:124
T ValueConfig() const
Gets the value configuration of this float node.
Definition float_node.hpp:308
GenApi::AccessMode AccessMode() const override
Gets the access mode by querying all ValueConfigs for it.
Definition float_node.hpp:110
double DisplayPrecision() const
Gets the current display precision value.
Definition float_node.hpp:280
T IncrementConfig() const
Gets and sets the increment configuration of this float node.
Definition float_node.hpp:81
static FloatNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
Creates a new FloatNode with the given name and nameSpace .
Definition float_node.hpp:43
std::chrono::duration< Rep, Period > PollingTime() const
Gets the polling time by querying all ValueConfigs for it.
Definition float_node.hpp:139
Basic GevServer node for device feature access.
Definition decl_node.hpp:34
static GevServer::Namespace ParseNamespace(const String &name)
Gets the Namespace from the given name .
Definition decl_node.hpp:591
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition decl_node.hpp:611
ValueNodePtr GetTerminalRegisterNode(const NodeT *node, std::function< bool(Node *)> f) const
Try to get terminal register node.
Definition detail_node.hpp:708
void * Handle() const noexcept
Classic API node handle.
Definition decl_node.hpp:102
CacheMode
Defines how the value is cached.
Definition genapi.hpp:218
@ NoCache
No caching used.
Definition genapi.hpp:220
AccessMode
Access possibility of the node.
Definition genapi.hpp:183
@ ReadWrite
Node can be read and written to.
Definition genapi.hpp:213
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition decl_int_swiss_knife_node.hpp:11
Namespace
The possible name spaces a node can be in.
Definition gevserver.hpp:147
@ DisplayPrecision
Accesses the float node's display precision configuration.
Definition gevserver.hpp:224
@ Unit
Accesses the unit of a node as string.
Definition gevserver.hpp:223
@ Value
Accesses the value configuration.
Definition gevserver.hpp:210
@ Max
Gets the maximum value.
Definition gevserver.hpp:195
@ Increment
Gets the increment.
Definition gevserver.hpp:197
@ Min
Gets the minimum value.
Definition gevserver.hpp:196
std::shared_ptr< FloatNode > FloatNodePtr
Convenience shared pointer for FloatNode.
Definition gevserver.hpp:76
@ String
Node is a string node (no reg).
Definition gevserver.hpp:168
std::shared_ptr< FloatBaseNode > FloatBaseNodePtr
Convenience shared pointer for FloatBaseNode.
Definition gevserver.hpp:68
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
char Char
Character type for wide characters or unicode characters.
Definition string.hpp:63