5#include "../global.hpp"
7#include "integer_base_node.hpp"
8#include "value_node.hpp"
11#include "_detail/iconfigurable_command_node.hpp"
12#include "_detail/ihas_value_config.hpp"
13#include "_detail/iconfigurable_register_node.hpp"
27 ,
public Private::IConfigurableCommandNode
28 ,
public Private::IHasValueConfig<IntegerBaseNodePtr>
32 explicit CommandNode(HandleGuard<Node> &&guard)
51 HandleGuard<Node>(CreateGSCommandNodeTyped(okName.data(),
static_cast<CExports::TGSNamespace
>(nameSpace))));
79 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode *
>(node) ?
true :
false; });
83 return value->AccessMode();
93 this, [](
Node *node) {
return dynamic_cast<Private::IConfigurableRegisterNode *
>(node) ?
true :
false; });
97 return value->CacheMode();
108 [[noreturn]]
void SetIsStreamable(
const CExports::cvbint64_t & )
override
118 return (NativeCall<CExports::cvbbool_t>(
119 [&](CExports::cvbbool_t &value) {
return CVB_CALL_CAPI(GSNGetAsBoolean(
Handle(), value)); }))
129 NativeCall([&]() {
return CVB_CALL_CAPI(GSNSetAsBoolean(
Handle(),
true)); });
139 template <
class Rep,
class Period>
156 template <
class Rep,
class Period>
178 "requested command config type must be derived from IntegerBaseNode or "
200 "requested command config type must be derived from "
201 "IntegerBaseNode or "
202 "of type std::int64_t");
220 "requested value config type must be derived from IntegerBaseNode or be "
241 "requested value config type must be derived from "
242 "IntegerBaseNode or be of integral type");
256 [](
char ch) { return static_cast<char>(std::tolower(ch)); });
270 return IsDone() ? CVB_LIT(
"true") : CVB_LIT(
"false");
24 class CommandNode {
…};
275 inline std::int64_t CommandNode::CommandConfig<std::int64_t>()
const
void Execute()
Executes this command.
Definition command_node.hpp:127
static CommandNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
Creates a new CommandNode with the given name and nameSpace .
Definition command_node.hpp:47
bool IsStreamable() const override
Commands are never streamable.
Definition command_node.hpp:103
void SetPollingTime(const std::chrono::duration< Rep, Period > ×pan)
Sets the polling time of this value.
Definition command_node.hpp:157
static CommandNodePtr Create(const String &name)
Creates a new CommandNode with the given name .
Definition command_node.hpp:67
void SetValueConfig(const T &)
Sets the value configuration of this command node.
Definition command_node.hpp:238
T CommandConfig() const
Gets and sets the command value configuration of this command node.
Definition command_node.hpp:175
bool IsDone() const
If this command is readable, the execution state can be queried.
Definition command_node.hpp:116
void FromString(const String &value) override
Executes if value is "true".
Definition command_node.hpp:249
GenApi::CacheMode CacheMode() const override
Gets the cache mode by querying all ValueConfigs for it.
Definition command_node.hpp:90
T ValueConfig() const
Gets and sets the value configuration of this command node.
Definition command_node.hpp:217
GenApi::AccessMode AccessMode() const override
Gets the access mode by querying all ValueConfigs for it.
Definition command_node.hpp:76
void SetCommandConfig(const T &)
Sets the command value configuration of this command node.
Definition command_node.hpp:196
String ToString() const override
Gets the IsDone status as a string.
Definition command_node.hpp:268
std::chrono::duration< Rep, Period > PollingTime() const
Gets the polling time of this value.
Definition command_node.hpp:140
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 EnsureNodeNameOnly(const String &name)
Throws if the given name has a namespace prefix.
Definition decl_node.hpp:564
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
T duration_cast(T... args)
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
std::shared_ptr< IntegerBaseNode > IntegerBaseNodePtr
Convenience shared pointer for IntegerBaseNode.
Definition gevserver.hpp:64
std::shared_ptr< CommandNode > CommandNodePtr
Convenience shared pointer for CommandNode.
Definition gevserver.hpp:104
@ PollingTime
Gets the polling time in ms.
Definition gevserver.hpp:204
@ OnValue
Definition gevserver.hpp:211
@ Value
Accesses the value configuration.
Definition gevserver.hpp:210
@ String
Node is a string node (no reg).
Definition gevserver.hpp:168
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17