CVB++ 15.0
float_reg_node.hpp
1#pragma once
2
3#include "../global.hpp"
4
5#include "float_base_node.hpp"
6
8#include "_detail/iconfigurable_register_node.hpp"
10
11namespace Cvb
12{
13 CVB_BEGIN_INLINE_NS
14 namespace GevServer
15 {
17
19 class FloatRegNode
20 : public FloatBaseNode
22 , public Private::IConfigurableRegisterNode
24 {
25 public:
26 explicit FloatRegNode(HandleGuard<Node> &&guard)
27 : FloatBaseNode(std::move(guard))
28 {
29 }
30
35 {
36 return static_cast<GenApi::AccessMode>(GetInfoAsInt(NodeInfo::AccessMode));
37 }
38
48 {
49 SetInfoAsInt(NodeInfo::AccessMode, static_cast<std::int64_t>(value));
50 }
51
53
58 {
59 return GetInfoAsInt(NodeInfo::RegisterAddress);
60 }
61
83
88 {
89 return static_cast<GenApi::CacheMode>(GetInfoAsInt(NodeInfo::CachingMode));
90 }
91
101 {
102 SetInfoAsInt(NodeInfo::CachingMode, static_cast<std::int64_t>(value));
103 }
104
119
123 bool IsSigned() const
124 {
125 return GetInfoAsInt(NodeInfo::Sign) != 0;
126 }
127
136 void SetIsSigned(const bool &value)
137 {
138 SetInfoAsInt(NodeInfo::Sign, value ? 1 : 0);
139 }
140
142
147 {
148 return GetInfoAsInt(NodeInfo::RegisterLength);
149 }
150
158 template <class Rep, class Period>
160 {
161 auto timespan = GetInfoAsInt(NodeInfo::PollingTime);
162 if (timespan > 0)
163 return std::chrono::duration<Rep, Period>(timespan);
164 else
166 }
167
179 template <class Rep, class Period>
181 {
183 SetInfoAsInt(NodeInfo::PollingTime, -1);
184 else
186 }
187 };
188 } // namespace GevServer
189 CVB_END_INLINE_NS
190} // namespace Cvb
std::vector< IntegerBaseNodePtr > AddressNodes() const
Gets the collection of nodes which define the nodes address.
Definition float_reg_node.hpp:79
void SetIsSigned(const bool &value)
Sets whether this integer register is signed.
Definition float_reg_node.hpp:136
void SetPollingTime(const std::chrono::duration< Rep, Period > &timespan)
Sets the polling time of this value.
Definition float_reg_node.hpp:180
bool IsSigned() const
Gets whether this integer register is signed.
Definition float_reg_node.hpp:123
void SetCacheMode(const Cvb::GenApi::CacheMode &value)
Sets the caching mode of this register node.
Definition float_reg_node.hpp:100
GenApi::CacheMode CacheMode() const override
Gets the caching mode of this register node.
Definition float_reg_node.hpp:87
GenApi::AccessMode AccessMode() const override
Gets the GenApi::AccessMode of this node.
Definition float_reg_node.hpp:34
std::int64_t Length() const
Gets the number of bytes the register occupies.
Definition float_reg_node.hpp:146
std::int64_t Address() const
Gets the registers address.
Definition float_reg_node.hpp:57
void SetAccessMode(const GenApi::AccessMode &value)
Sets the GenApi::AccessMode of this node.
Definition float_reg_node.hpp:47
std::vector< NodePtr > InvalidatorNodes() const noexcept
Gets the collection of nodes which, when changed, invalidate this node's cache.
Definition float_reg_node.hpp:115
std::chrono::duration< Rep, Period > PollingTime() const
Gets the polling time of this value.
Definition float_reg_node.hpp:159
std::vector< std::shared_ptr< T > > GetDependentNodes(const NodeList &type) const
Gets the nodes categorized by this node.
Definition detail_node.hpp:410
T duration_cast(T... args)
T move(T... args)
CacheMode
Defines how the value is cached.
Definition genapi.hpp:218
AccessMode
Access possibility of the node.
Definition genapi.hpp:183
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition decl_int_swiss_knife_node.hpp:11
@ AccessMode
Gets the access mode of the node.
Definition gevserver.hpp:194
@ PollingTime
Gets the polling time in ms.
Definition gevserver.hpp:204
@ Sign
Accesses the signed or unsigned state of integer registers.
Definition gevserver.hpp:222
@ CachingMode
Gets the caching mode.
Definition gevserver.hpp:200
@ RegisterAddress
Gets the current address of the register (can change).
Definition gevserver.hpp:208
@ RegisterLength
Gets the register nodes length in bytes.
Definition gevserver.hpp:207
@ Addresses
Node accesses the register address nodes (not constants).
Definition gevserver.hpp:256
@ Invalidator
Node accesses the invalidator nodes.
Definition gevserver.hpp:255
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17