3#include "../global.hpp"
5#include "string_node.hpp"
8#include "_detail/iconfigurable_register_node.hpp"
22 ,
public Private::IConfigurableRegisterNode
43 return std::make_shared<StringRegNode>(HandleGuard<Node>(
44 CExports::CreateGSStringRegNodeTyped(okName.data(),
static_cast<CExports::TGSNamespace
>(nameSpace), address, length)));
207 SetInfoAsInt(
NodeInfo::PollingTime, std::chrono::duration_cast<std::chrono::milliseconds>(timespan).count());
217 auto bufferSize = NativeCall<size_t>(
218 [&](
size_t& size) {
return CExports::GSNGetAsStringTyped(
Handle(),
reinterpret_cast<Char*
>(0), size); });
219 bufferSize +=
sizeof(
Char);
221 NativeCall([&]() {
return CExports::GSNGetAsStringTyped(
Handle(), buffer.data(), bufferSize); });
222 return buffer.data();
232 NativeCall([&]() {
return CExports::GSNSetAsStringTyped(
Handle(), value.data()); });
static GevServer::Namespace ParseNamespace(const String &name)
Gets the Namespace from the given name .
Definition: decl_node.hpp:585
static String EnsureNodeNameOnly(const String &name)
Throws if the given name has a namespace prefix.
Definition: decl_node.hpp:558
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition: decl_node.hpp:607
void * Handle() const noexcept
Classic API node handle.
Definition: decl_node.hpp:101
String value node.
Definition: string_node.hpp:26
String value register.
Definition: string_reg_node.hpp:24
static StringRegNodePtr Create(const String &name, const std::int64_t &length)
Creates a new StringRegNode with the given name .
Definition: string_reg_node.hpp:82
std::vector< IntegerBaseNodePtr > AddressNodes() const
Gets the collection of nodes which define the nodes address.
Definition: string_reg_node.hpp:130
void SetValue(const String &value)
Sets the value of this string register node.
Definition: string_reg_node.hpp:230
void SetPollingTime(const std::chrono::duration< Rep, Period > ×pan)
Sets the polling time of this value.
Definition: string_reg_node.hpp:202
String Value() const
Gets the value of this string register node.
Definition: string_reg_node.hpp:215
void SetCacheMode(const GenApi::CacheMode &value)
Sets the caching mode of this register node.
Definition: string_reg_node.hpp:150
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 .
Definition: string_reg_node.hpp:40
GenApi::CacheMode CacheMode() const override
Gets the caching mode of this register node.
Definition: string_reg_node.hpp:138
GenApi::AccessMode AccessMode() const override
Gets the GenApi::AccessMode of this node.
Definition: string_reg_node.hpp:90
std::int64_t Length() const
Gets the number of bytes the register occupies.
Definition: string_reg_node.hpp:172
std::int64_t Address() const
Gets the registers address.
Definition: string_reg_node.hpp:112
void SetAccessMode(const GenApi::AccessMode &value)
Gets the GenApi::AccessMode of this node.
Definition: string_reg_node.hpp:102
static StringRegNodePtr Create(const String &name, const std::int64_t &address, const std::int64_t &length)
Creates a new StringRegNode with the given name .
Definition: string_reg_node.hpp:62
std::vector< NodePtr > InvalidatorNodes() const noexcept
Gets the collection of nodes which, when changed, invalidate this node's cache.
Definition: string_reg_node.hpp:165
std::chrono::duration< Rep, Period > PollingTime() const
Gets the polling time of this value.
Definition: string_reg_node.hpp:181
CacheMode
Defines how the value is cached.
Definition: genapi.hpp:220
AccessMode
Access possibility of the node.
Definition: genapi.hpp:185
Namespace
The possible name spaces a node can be in.
Definition: gevserver.hpp:148
@ AccessMode
Gets the access mode of the node.
@ PollingTime
Gets the polling time in ms.
@ CachingMode
Gets the caching mode.
@ RegisterAddress
Gets the current address of the register (can change).
@ RegisterLength
Gets the register nodes length in bytes.
@ Addresses
Node accesses the register address nodes (not constants).
@ Invalidator
Node accesses the invalidator nodes.
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:59