CVB++ 15.0
detail_node.hpp
1#pragma once
2
3#include <cassert>
4#include <typeinfo>
5
6#include "../../_cexports/c_gev_server.h"
7
8#include "../../exception.hpp"
9#include "../../global.hpp"
10
11#include "../_decl/decl_node.hpp"
12#include "../_decl/decl_node_map.hpp"
13#include "../boolean_node.hpp"
14#include "../category_node.hpp"
15#include "../command_node.hpp"
16#include "../enum_entry_node.hpp"
17#include "../enumeration_node.hpp"
18#include "../int_32_reg_node.hpp"
19#include "../int_64_reg_node.hpp"
20#include "../int_reg_node.hpp"
21#include "../float_reg_node.hpp"
22#include "../float_32_reg_node.hpp"
23#include "../float_64_reg_node.hpp"
24#include "../int_swiss_knife_node.hpp"
25#include "../integer_base_node.hpp"
26#include "../integer_node.hpp"
27#include "../float_base_node.hpp"
28#include "../float_node.hpp"
29#include "../string_reg_node.hpp"
30#include "../string_node.hpp"
31#include "../value_node.hpp"
32
33namespace Cvb
34{
35 CVB_BEGIN_INLINE_NS
36 namespace GevServer
37 {
38 inline NodePtr Node::FromName(const NodeMapPtr &nodeMap, const String &name)
39 {
40 CExports::GSNODE handle = nullptr;
41
42 auto result = CExports::GSGetNodeTyped(nodeMap->Handle(), name.c_str(), handle);
43 if (result < 0)
44 std::rethrow_exception(CvbException::FromCvbResult(result, "failed to get node"));
45
46 HandleGuard<Node> guard(handle);
47
48 CExports::TGSNodeType nodeType = CExports::GSNT_Invalid;
49 result = CVB_CALL_CAPI(GSNType(guard.Handle(), nodeType));
50 if (result < 0)
51 std::rethrow_exception(CvbException::FromCvbResult(result, "failed to get node type"));
52
53 NodePtr node = nullptr;
54 switch (nodeType)
55 {
56 case CExports::GSNT_Invalid:
57 throw std::runtime_error("invalid node type");
58
59 case CExports::GSNT_Category:
61 break;
62
63 case CExports::GSNT_IntReg:
64 {
65 CExports::cvbint64_t registerLength = 0;
66 result =
67 CVB_CALL_CAPI(GSNGetInfoAsInteger(handle, CExports::TGSNodeInfo::GSNI_RegisterLength, registerLength));
68 if (result < 0)
69 std::rethrow_exception(CvbException::FromCvbResult(result, "failed to get node register length"));
70
71 switch (registerLength)
72 {
73 case 4:
75 break;
76 case 8:
78 break;
79 default:
81 break;
82 }
83 break;
84 }
85 case CExports::GSNT_FloatReg:
86 {
87 CExports::cvbint64_t registerLength = 0;
88 result =
89 CVB_CALL_CAPI(GSNGetInfoAsInteger(handle, CExports::TGSNodeInfo::GSNI_RegisterLength, registerLength));
90 if (result < 0)
91 std::rethrow_exception(CvbException::FromCvbResult(result, "failed to get node register length"));
92
93 switch (registerLength)
94 {
95 case 4:
97 break;
98 case 8:
100 break;
101 default:
103 break;
104 }
105 break;
106 }
107 case CExports::GSNT_StringReg:
109 break;
110 case CExports::GSNT_String:
112 break;
113 case CExports::GSNT_Integer:
115 break;
116 case CExports::GSNT_Float:
118 break;
119 case CExports::GSNT_Boolean:
121 break;
122 case CExports::GSNT_Command:
124 break;
125 case CExports::GSNT_Enumeration:
127 break;
128 case CExports::GSNT_EnumEntry:
130 break;
131 case CExports::GSNT_IntSwissKnife:
133 break;
134
135 default:
137 break;
138 }
139
140 node->SetNodeMap(nodeMap);
141
142 return node;
143 }
144
145 inline NodePtr Node::FromHandle(HandleGuard<Node> &&guard, const NodeMapPtr &nodeMap)
146 {
147 CExports::TGSNodeType nodeType = CExports::GSNT_Invalid;
148 auto resultType = CVB_CALL_CAPI(GSNType(guard.Handle(), nodeType));
149 if (resultType < 0)
150 throw std::runtime_error("failed to get node type");
151
152 NodePtr node = nullptr;
153 switch (nodeType)
154 {
155 case CExports::GSNT_Invalid:
156 throw std::runtime_error("invalid node type");
157 case CExports::GSNT_Category:
159 break;
160 case CExports::GSNT_IntReg:
161 {
162 std::int64_t length = 0;
163 auto result =
164 CVB_CALL_CAPI(GSNGetInfoAsInteger(guard.Handle(), CExports::TGSNodeInfo::GSNI_RegisterLength, length));
165 if (result < 0)
166 throw std::runtime_error("failed to get register length");
167
168 switch (length)
169 {
170 case 4:
172 break;
173 case 8:
175 break;
176 default:
178 break;
179 }
180 }
181 break;
182 case CExports::GSNT_FloatReg:
183 {
184 std::int64_t length = 0;
185 auto result =
186 CVB_CALL_CAPI(GSNGetInfoAsInteger(guard.Handle(), CExports::TGSNodeInfo::GSNI_RegisterLength, length));
187 if (result < 0)
188 throw std::runtime_error("failed to get register length");
189
190 switch (length)
191 {
192 case 4:
194 break;
195 case 8:
197 break;
198 default:
200 break;
201 }
202 }
203 break;
204 case CExports::GSNT_StringReg:
206 break;
207 case CExports::GSNT_String:
209 break;
210 case CExports::GSNT_Integer:
212 break;
213 case CExports::GSNT_Float:
215 break;
216 case CExports::GSNT_Boolean:
218 break;
219 case CExports::GSNT_Command:
221 break;
222 case CExports::GSNT_Enumeration:
224 break;
225 case CExports::GSNT_EnumEntry:
227 break;
228 case CExports::GSNT_IntSwissKnife:
230 break;
231 default:
233 break;
234 }
235
236 node->SetNodeMap(nodeMap);
237
238 return node;
239 }
240
241 inline void Node::Add(const NodePtr &item, const NodeList &kind)
242 {
243 if (item == nullptr)
244 throw std::runtime_error("Added Node must not be nullptr");
245
246 auto nodeMap = nodeMap_.lock();
247 if (!nodeMap)
248 throw std::runtime_error("Parent Node must have node map");
249
250 // Ignore node map check for inline enum entries if parent is enumeration
251 bool enumWithInlineEntries = false;
252 NodePtr nonInlineNode = nodeMap_.lock()->TryGetNode(item->NameOnly());
253 auto nType = NodeType(this->Handle());
254 if (nType == GevServer::NodeType::Enumeration && nonInlineNode == NodePtr())
255 enumWithInlineEntries = true;
256
257 if (!enumWithInlineEntries)
258 if (item->NodeMap() != NodeMapPtr() && nodeMap->Handle() != item->NodeMap()->Handle())
259 throw std::runtime_error("Added Node must be in the same node map as this Parent");
260
261 NativeCall([&]() {
262 return CVB_CALL_CAPI(GSNAddNode(Handle(), static_cast<CExports::TGSNodeList>(kind), item->Handle()));
263 });
264
265 // Add node map to item if it is enum entry and parent is enumeration
266 if (enumWithInlineEntries)
267 item->SetNodeMap(nodeMap);
268
269 nodeMap->Nodes()[item->NameOnly()] = item;
270 }
271
272 inline bool Node::Remove(const NodePtr &item, const NodeList &kind)
273 {
274 if (item == nullptr)
275 throw std::runtime_error("Added Node must not be nullptr");
276
277 auto nodeMap = nodeMap_.lock();
278 if (!nodeMap)
279 throw std::runtime_error("Parent Node must have node map");
280
281 auto nodes_ = nodeMap->Nodes();
282 auto it = nodes_.find(item->NameOnly());
283 if (it != nodes_.end())
284 {
285 nodes_.erase(it);
286 NativeCall([&]() {
287 return CVB_CALL_CAPI(GSNRemoveNode(Handle(), static_cast<CExports::TGSNodeList>(kind), item->Handle()));
288 });
289 return true;
290 }
291 return false;
292 }
293
295 {
296 return GetInfoAs<IntegerBaseNode>(NodeInfo::IsImplemented);
297 }
298
300 {
301 SetInfo<IntegerBaseNodePtr>(NodeInfo::IsImplemented, node);
302 }
303
305 {
306 return GetInfoAs<IntegerBaseNode>(NodeInfo::IsAvailable);
307 }
308
310 {
311 SetInfo<IntegerBaseNodePtr>(NodeInfo::IsAvailable, node);
312 }
313
315 {
316 return GetInfoAs<IntegerBaseNode>(NodeInfo::IsLocked);
317 }
318
320 {
321 SetInfo<IntegerBaseNodePtr>(NodeInfo::IsLocked, node);
322 }
323
324 inline bool Node::IsFeature() const
325 {
326 auto nm = nodeMap_.lock();
327 if (!nm)
328 return false;
329
330 CategoryNodePtr root = nm->Node<CategoryNode>(CVB_LIT("Root"));
331
332 return IsFeatureIter(root);
333 }
334
335 inline bool Node::IsFeatureIter(CategoryNodePtr parent) const // NOLINT(misc-no-recursion)
336 {
337 for (auto child : parent->GetDependentNodes<Node>(NodeList::Child))
338 {
339 if (child && child.get() == this)
340 return true;
341 }
342
343 for (auto subCategory : parent->GetDependentNodes<CategoryNode>(NodeList::Child))
344 {
345 if (subCategory)
346 {
347 if (subCategory && subCategory.get() == this)
348 return true;
349
350 if (IsFeatureIter(subCategory))
351 return true;
352 }
353 }
354 return false;
355 }
356
358 {
359 return GetInfoAs<Node>(NodeInfo::Alias);
360 }
361
362 inline String Node::NameOnly() const
363 {
364 return ParseName(Name());
365 }
366
367 inline void Node::SetAliasNode(const NodePtr &value)
368 {
369 SetInfo<NodePtr>(NodeInfo::Alias, value);
370 }
371
373 {
374 return static_cast<GenApi::AccessMode>(GetInfoAsInt(NodeInfo::AccessMode));
375 }
376
378 {
379 auto am = static_cast<Cvb::GenApi::AccessMode>(GetInfoAsInt(NodeInfo::ImposedAccessMode));
380 if (am == static_cast<Cvb::GenApi::AccessMode>(-1))
382 else
383 return am;
384 }
385
387 {
388 NativeCall<CExports::cvbint64_t>([&](CExports::cvbint64_t &value) {
389 return CVB_CALL_CAPI(GSNSetInfoAsInteger(Handle(), static_cast<CExports::TGSNodeInfo>(accessMode), value));
390 });
391 }
392
394 {
395 return static_cast<Cvb::GenApi::CacheMode>(GetInfoAsInt(NodeInfo::CachingMode));
396 }
397
399 {
400 auto holder = Internal::CbCarrier<void(Node &)>::Create(handler);
401 return updatedCarrierContainer_.Register(holder);
402 }
403
404 inline void Node::UnregisterEventUpdated(EventCookie eventCookie) noexcept
405 {
406 updatedCarrierContainer_.Unregister(eventCookie);
407 }
408
409 template <class T>
411 {
412 std::size_t numNodes = GetDependentNodeCount(type);
413 std::vector<std::shared_ptr<T>> dependentNodes(static_cast<std::size_t>(numNodes));
414 for (std::size_t i = 0; i < numNodes; i++)
415 {
416 std::size_t bufferSize = 0;
417 std::size_t keyBufferSize = 0;
418 auto bufferSizeResult =
419 CExports::GSNListExTyped(Handle(), static_cast<CExports::TGSNodeList>(type), i, reinterpret_cast<Char *>(0),
420 bufferSize, reinterpret_cast<Char *>(0), keyBufferSize);
421 if (bufferSizeResult < 0)
422 throw std::runtime_error("Failed to get name length");
423
424 bufferSize += sizeof(Char);
425 std::vector<Char> buffer(bufferSize);
426 keyBufferSize += sizeof(Char);
427 std::vector<Char> keyBuffer(keyBufferSize);
428
429 CExports::cvbres_t bufferResult = 0;
430 bufferResult = CExports::GSNListExTyped(Handle(), static_cast<CExports::TGSNodeList>(type), i,
431 reinterpret_cast<Char *>(buffer.data()), bufferSize,
432 reinterpret_cast<Char *>(keyBuffer.data()), keyBufferSize);
433 if (bufferResult < 0)
434 throw std::runtime_error("Failed to list node names");
435
436 CExports::NODE hChild = nullptr;
437 auto result =
438 CExports::GSNGetNodeTyped(Handle(), static_cast<CExports::TGSNodeList>(type), buffer.data(), hChild);
439 if (result < 0)
440 throw std::runtime_error("Failed to get child handle");
441
442 HandleGuard<class Node> guard(hChild);
443 String name(buffer.data());
444 std::shared_ptr<T> nonInlineNode = nodeMap_.lock()->TryGetNode<T>(name);
445 if (nonInlineNode != nullptr && (guard.Handle() == nullptr || guard.Handle() == nonInlineNode->Handle()))
446 {
447 dependentNodes[i] = nonInlineNode;
448 }
449 else
450 {
451 NodePtr inlineNode = Node::FromHandle(std::move(guard), nodeMap_.lock());
452 dependentNodes[i] = std::dynamic_pointer_cast<T>(inlineNode);
453 }
454 }
455 return dependentNodes;
456 }
457
458 inline void Node::SetInfoAsString(const NodeInfo &command, const String &value)
459 {
460 NativeCall([&]() {
461 return CExports::GSNSetInfoAsStringTyped(Handle(), static_cast<CExports::TGSNodeInfo>(command), value.c_str());
462 });
463 }
464
465 inline void Node::SetInfoAsInt(const NodeInfo &command, const std::int64_t &value)
466 {
467 NativeCall([&]() {
468 return CVB_CALL_CAPI(GSNSetInfoAsInteger(Handle(), static_cast<CExports::TGSNodeInfo>(command),
469 static_cast<CExports::cvbint64_t>(value)));
470 });
471 }
472
473 inline double Node::GetInfoAsFloat(const NodeInfo &command) const
474 {
475 return NativeCall<double>([&](double &value) {
476 return CVB_CALL_CAPI(GSNGetInfoAsFloat(Handle(), static_cast<CExports::TGSNodeInfo>(command), value));
477 });
478 }
479
480 inline void Node::SetInfoAsFloat(const NodeInfo &command, const double &value)
481 {
482 NativeCall([&]() {
483 return CVB_CALL_CAPI(GSNSetInfoAsFloat(Handle(), static_cast<CExports::TGSNodeInfo>(command), value));
484 });
485 }
486
487 template <class NodeT>
488 inline void Node::SetInfo(const NodeInfo &info, const NodeT &valueNode)
489 {
490 if (valueNode == NodeT())
491 throw std::runtime_error("node to set must not be empty");
492
493 NativeCall([&]() {
494 return CVB_CALL_CAPI(GSNSetInfoAsNode(Handle(), static_cast<CExports::TGSNodeInfo>(info), valueNode->Handle()));
495 });
496 }
497
498 inline void Node::SetInfo(const NodeInfo &info, const String &value)
499 {
500 if (value.empty())
501 throw std::runtime_error("value to set must not be empty");
502
503 NativeCall([&]() {
504 return CExports::GSNSetInfoAsStringTyped(Handle(), static_cast<CExports::TGSNodeInfo>(info), value.data());
505 });
506 }
507
508 template <class NodeT>
509 inline std::shared_ptr<NodeT> Node::GetInfoAs(const NodeInfo &info) const
510 {
511 CExports::GSNODE handle = nullptr;
512 NativeCall([&]() {
513 return CVB_CALL_CAPI(GSNGetInfoAsNode(Handle(), static_cast<CExports::TGSNodeInfo>(info), handle));
514 });
515
516 if (handle == nullptr)
517 return nullptr;
518
519 HandleGuard<Node> guard(handle);
520
521 std::shared_ptr<NodeT> tmpNode;
522 tmpNode = std::make_shared<NodeT>(std::move(guard));
523
524 return nodeMap_.lock()->Node<NodeT>(tmpNode->NameOnly());
525 }
526
527 template <>
529 {
530 return GetInfoAs<IntegerBaseNode>(NodeInfo::Max);
531 }
532
533 template <>
535 {
536 return GetInfoAs<IntegerBaseNode>(NodeInfo::Min);
537 }
538
539 template <>
541 {
542 return GetInfoAs<IntegerBaseNode>(NodeInfo::Increment);
543 }
544
545 template <>
547 {
548 SetInfo<IntegerBaseNodePtr>(NodeInfo::Max, value);
549 }
550
551 template <>
553 {
554 return GetInfoAs<IntegerBaseNode>(NodeInfo::Value);
555 }
556
557 template <>
559 {
560 return SetInfo<IntegerBaseNodePtr>(NodeInfo::Value, value);
561 }
562
563 template <>
565 {
566 SetInfo<IntegerBaseNodePtr>(NodeInfo::Min, value);
567 }
568
569 inline IntegerBaseNodePtr IntegerNode::ValueConfigAsNode() const
570 {
572 }
573
574 template <>
576 {
577 SetInfo<IntegerBaseNodePtr>(NodeInfo::Increment, value);
578 }
579
580 template <>
582 {
583 SetInfo<FloatBaseNodePtr>(NodeInfo::Value, value);
584 }
585
586 template <>
588 {
589 return GetInfoAs<FloatBaseNode>(NodeInfo::Max);
590 }
591
592 template <>
594 {
595 return GetInfoAs<FloatBaseNode>(NodeInfo::Min);
596 }
597
598 template <>
600 {
601 return GetInfoAs<FloatBaseNode>(NodeInfo::Increment);
602 }
603
604 template <>
606 {
607 SetInfo<FloatBaseNodePtr>(NodeInfo::Max, value);
608 }
609
610 template <>
612 {
613 return GetInfoAs<FloatBaseNode>(NodeInfo::Value);
614 }
615
616 template <>
618 {
619 SetInfo<FloatBaseNodePtr>(NodeInfo::Min, value);
620 }
621
622 inline FloatBaseNodePtr FloatNode::ValueConfigAsNode() const
623 {
625 }
626
627 template <>
629 {
630 SetInfo<FloatBaseNodePtr>(NodeInfo::Increment, value);
631 }
632
633 template <>
635 {
636 return GetInfoAs<IntegerBaseNode>(NodeInfo::Value);
637 }
638
639 template <>
641 {
642 SetInfo<IntegerBaseNodePtr>(NodeInfo::OnValue, value);
643 }
644
645 template <>
647 {
648 SetInfo<IntegerBaseNodePtr>(NodeInfo::Value, value);
649 }
650
651 inline IntegerBaseNodePtr CommandNode::ValueConfigAsNode() const
652 {
654 }
655
656 template <>
658 {
659 return GetInfoAs<IntegerBaseNode>(NodeInfo::Value);
660 }
661
662 template <>
664 {
665 SetInfo<IntegerBaseNodePtr>(NodeInfo::Value, value);
666 }
667
668 inline IntegerBaseNodePtr EnumerationNode::ValueConfigAsNode() const
669 {
671 }
672
673 template <>
675 {
676 return GetInfoAs<IntegerBaseNode>(NodeInfo::Value);
677 }
678
679 inline IntegerBaseNodePtr BooleanNode::ValueConfigAsNode() const
680 {
682 }
683
684 template <>
686 {
687 SetInfo<IntegerBaseNodePtr>(NodeInfo::Value, value);
688 }
689
690 template <>
692 {
693 return GetInfoAs<StringNode>(NodeInfo::Value);
694 }
695
696 inline StringNodePtr StringNode::ValueConfigAsNode() const
697 {
699 }
700
701 template <>
703 {
704 SetInfo<StringNodePtr>(NodeInfo::Value, value);
705 }
706
707 template <class NodeT, class ValueConfigNodeType>
709 std::function<bool(Node *)> f) const // NOLINT(misc-no-recursion)
710 {
711 auto hasValueConfig = dynamic_cast<Private::IHasValueConfig<ValueConfigNodeType> *>(
712 const_cast<NodeT *>(node)); // NOLINT(cppcoreguidelines-pro-type-const-cast)
713 if (hasValueConfig)
714 {
715 auto otherNode = hasValueConfig->ValueConfigAsNode();
716
717 if (f(dynamic_cast<Node *>(otherNode.get())))
718 return std::dynamic_pointer_cast<ValueNode>(otherNode);
719 else
720 {
721 auto valNode = dynamic_cast<ValueNode *>(otherNode.get());
723 }
724 }
725 else
726 return nullptr;
727 }
728 } // namespace GevServer
729 CVB_END_INLINE_NS
730} // namespace Cvb
Node that logically groups other nodes.
Definition category_node.hpp:19
void SetValueConfig(const T &)
Sets the value configuration of this boolean node.
Definition boolean_node.hpp:223
T ValueConfig() const
Gets the value configuration of this boolean node.
Definition boolean_node.hpp:201
Node that logically groups other nodes.
Definition category_node.hpp:16
void SetValueConfig(const T &)
Sets the value configuration of this command node.
Definition command_node.hpp:238
T ValueConfig() const
Gets and sets the value configuration of this command node.
Definition command_node.hpp:217
void SetCommandConfig(const T &)
Sets the command value configuration of this command node.
Definition command_node.hpp:196
void SetValueConfig(const T &)
Sets the value configuration of this enumeration node.
Definition enumeration_node.hpp:163
T ValueConfig() const
Gets the value configuration of this enumeration node.
Definition enumeration_node.hpp:141
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 SetIncrementConfig(const T &)
Sets the increment of this value.
Definition float_node.hpp:99
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
T ValueConfig() const
Gets the value configuration of this float node.
Definition float_node.hpp:308
T IncrementConfig() const
Gets and sets the increment configuration of this float node.
Definition float_node.hpp:81
void SetMinConfig(const T &)
Sets the minimum configuration of this integer node.
Definition integer_node.hpp:215
void SetMaxConfig(const T &)
Sets the maximum configuration of this integer node.
Definition integer_node.hpp:179
T MaxConfig() const
Gets the maximum configuration of this integer node.
Definition integer_node.hpp:159
void SetIncrementConfig(const T &)
Sets the increment of this value.
Definition integer_node.hpp:97
void SetValueConfig(const T &)
Sets the value configuration of this integer node.
Definition integer_node.hpp:255
T MinConfig() const
Gets the minimum configuration of this integer node.
Definition integer_node.hpp:195
T ValueConfig() const
Gets the value configuration of this integer node.
Definition integer_node.hpp:234
T IncrementConfig() const
Gets and sets the increment configuration of this integer node.
Definition integer_node.hpp:81
Basic GevServer node for device feature access.
Definition decl_node.hpp:34
EventCookie RegisterEventUpdated(std::function< void(Node &)> handler)
Register a listener to node updated event.
Definition detail_node.hpp:398
bool IsFeature() const
Gets whether this node is considered a feature node.
Definition detail_node.hpp:324
IntegerBaseNodePtr IsAvailableConfig() const
Gets the node that specifies whether a node is currently available or not.
Definition detail_node.hpp:304
IntegerBaseNodePtr IsImplementedConfig() const
Gets the node that specifies whether a node is implemented in the device or not.
Definition detail_node.hpp:294
IntegerBaseNodePtr IsLockedConfig() const
Gets the node that specifies whether a node is currently read only or not.
Definition detail_node.hpp:314
void SetImposedAccessMode(const Cvb::GenApi::AccessMode &accessMode)
Overrides the node's default AccessMode.
Definition detail_node.hpp:386
static std::shared_ptr< T > FromHandle(HandleGuard< Node > &&guard, ARGS &&...args)
Factory to create the appropriate Node object based on the given handle .
Definition decl_node.hpp:66
static NodePtr FromName(const NodeMapPtr &nodeMap, const String &name)
Factory to create the appropriate Node object on the given nodeMap based on the given name .
Definition detail_node.hpp:38
virtual Cvb::GenApi::CacheMode CacheMode() const
Gets the cache mode of this node.
Definition detail_node.hpp:393
void SetIsImplementedConfig(const IntegerBaseNodePtr &node)
Sets the node that specifies whether a node is implemented in the device or not.
Definition detail_node.hpp:299
void SetAliasNode(const NodePtr &value)
Sets the node that is an alias value for this node.
Definition detail_node.hpp:367
void SetIsLockedConfig(const IntegerBaseNodePtr &node)
Sets the node that specifies whether a node is currently read only or not.
Definition detail_node.hpp:319
String Name() const
Gets the full name of this node.
Definition decl_node.hpp:356
Cvb::GenApi::AccessMode ImposedAccessMode() const
Gets the node's default AccessMode.
Definition detail_node.hpp:377
bool Remove(const NodePtr &item, const NodeList &kind)
Remove a single Node item from this collection.
Definition detail_node.hpp:272
virtual GenApi::AccessMode AccessMode() const
Gets the GenApi::AccessMode of this node.
Definition detail_node.hpp:372
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition decl_node.hpp:611
void Add(const NodePtr &item, const NodeList &kind)
Adds a Node item .
Definition detail_node.hpp:241
ValueNodePtr GetTerminalRegisterNode(const NodeT *node, std::function< bool(Node *)> f) const
Try to get terminal register node.
Definition detail_node.hpp:708
void UnregisterEventUpdated(EventCookie eventCookie) noexcept
Manually unregister a listener to the node updated event.
Definition detail_node.hpp:404
String NameOnly() const
Gets the name of this node without namespace.
Definition detail_node.hpp:362
NodePtr AliasNode() const
Gets the node that is an alias value for this node.
Definition detail_node.hpp:357
void * Handle() const noexcept
Classic API node handle.
Definition decl_node.hpp:102
std::vector< std::shared_ptr< T > > GetDependentNodes(const NodeList &type) const
Gets the nodes categorized by this node.
Definition detail_node.hpp:410
void SetIsAvailableConfig(const IntegerBaseNodePtr &node)
Sets the node that specifies whether a node is currently available or not.
Definition detail_node.hpp:309
void SetValueConfig(const T &)
Sets the value configuration of this string node.
Definition string_node.hpp:149
T ValueConfig() const
Gets the value configuration of this string node.
Definition string_node.hpp:128
Base class for all nodes that have a value.
Definition value_node.hpp:21
T make_shared(T... args)
T move(T... args)
CacheMode
Defines how the value is cached.
Definition genapi.hpp:223
AccessMode
Access possibility of the node.
Definition genapi.hpp:188
@ NotImplemented
Definition genapi.hpp:196
Namespace for GevServer based device configuration.
Definition decl_int_swiss_knife_node.hpp:11
std::shared_ptr< Node > NodePtr
Convenience shared pointer for Node.
Definition gevserver.hpp:41
std::shared_ptr< IntegerBaseNode > IntegerBaseNodePtr
Convenience shared pointer for IntegerBaseNode.
Definition gevserver.hpp:73
std::shared_ptr< StringNode > StringNodePtr
Convenience shared pointer for StringNode.
Definition gevserver.hpp:57
std::shared_ptr< NodeMap > NodeMapPtr
Convenience shared pointer for NodeMap.
Definition gevserver.hpp:45
NodeInfo
Possible information a node can hold.
Definition gevserver.hpp:200
@ AccessMode
Gets the access mode of the node.
Definition gevserver.hpp:203
@ ImposedAccessMode
Definition gevserver.hpp:224
@ IsAvailable
Accesses the IInteger node defining whether the node is available.
Definition gevserver.hpp:228
@ CachingMode
Gets the caching mode.
Definition gevserver.hpp:209
@ OnValue
Definition gevserver.hpp:220
@ Value
Accesses the value configuration.
Definition gevserver.hpp:219
@ Max
Gets the maximum value.
Definition gevserver.hpp:204
@ Increment
Gets the increment.
Definition gevserver.hpp:206
@ Min
Gets the minimum value.
Definition gevserver.hpp:205
@ IsLocked
Accesses the IInteger node defining whether the node is read only.
Definition gevserver.hpp:229
@ IsImplemented
Access the IInteger node defining whether the node is implemented.
Definition gevserver.hpp:226
@ Alias
Accesses the alias node of this node.
Definition gevserver.hpp:230
std::shared_ptr< ValueNode > ValueNodePtr
Convenience shared pointer for ValueNode.
Definition gevserver.hpp:53
std::shared_ptr< CategoryNode > CategoryNodePtr
Convenience shared pointer for CategoryNode.
Definition gevserver.hpp:69
NodeType
Available node types.
Definition gevserver.hpp:171
@ String
Node is a string node (no reg).
Definition gevserver.hpp:177
@ Enumeration
Node is an enumeration node (no reg).
Definition gevserver.hpp:181
std::shared_ptr< FloatBaseNode > FloatBaseNodePtr
Convenience shared pointer for FloatBaseNode.
Definition gevserver.hpp:77
NodeList
Node access.
Definition gevserver.hpp:258
@ Child
Definition gevserver.hpp:259
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
T dynamic_pointer_cast(T... args)
T rethrow_exception(T... args)