Represents a GenAPI node. More...
#include <peak/node_map/peak_node.hpp>
Public Types | |
| using | ChangedCallback = std::function<void(const std::shared_ptr<Node>& changedNode)> |
| using | ChangedCallbackHandle = ChangedCallback* |
Public Member Functions | |
| Node ()=delete | |
| virtual | ~Node () |
| Node (const Node &other)=delete | |
| Node & | operator= (const Node &other)=delete |
| Node (Node &&other)=delete | |
| Node & | operator= (Node &&other)=delete |
| PEAK_COMMON_NO_DISCARD std::string | Name () const |
| Returns the name. | |
| PEAK_COMMON_NO_DISCARD std::string | DisplayName () const |
| Returns the display name. | |
| PEAK_COMMON_NO_DISCARD NodeNamespace | Namespace () const |
| Returns the namespace the node belongs to. | |
| PEAK_COMMON_NO_DISCARD NodeVisibility | Visibility () const |
| Returns the visibility. | |
| PEAK_COMMON_NO_DISCARD NodeAccessStatus | AccessStatus () const |
| Returns the access status. | |
| PEAK_COMMON_NO_DISCARD bool | IsReadable () const |
| Returns whether the node is currently readable. | |
| PEAK_COMMON_NO_DISCARD bool | IsWriteable () const |
| Returns whether the node is currently writeable. | |
| PEAK_COMMON_NO_DISCARD bool | IsAvailable () const |
| Returns whether the node is currently either readable or writeable. | |
| PEAK_COMMON_NO_DISCARD bool | IsImplemented () const |
| Returns whether the node is implemented. | |
| PEAK_COMMON_NO_DISCARD bool | IsCacheable () const |
| Checks whether the node is cacheable. | |
| PEAK_COMMON_NO_DISCARD bool | IsAccessStatusCacheable () const |
| Checks whether the node's access status is cacheable. | |
| PEAK_COMMON_NO_DISCARD bool | IsStreamable () const |
| Checks whether the node is streamable. | |
| PEAK_COMMON_NO_DISCARD bool | IsDeprecated () const |
| Checks whether the node is deprecated. | |
| PEAK_COMMON_NO_DISCARD bool | IsFeature () const |
| Checks whether the node is a feature, i.e. it can be reached via category nodes from a category node named "Root". | |
| PEAK_COMMON_NO_DISCARD NodeCachingMode | CachingMode () const |
| Returns the caching mode. | |
| PEAK_COMMON_NO_DISCARD int64_t | PollingTime () const |
| Returns the polling time. | |
| PEAK_COMMON_NO_DISCARD std::string | ToolTip () const |
| Returns the tool tip. | |
| PEAK_COMMON_NO_DISCARD std::string | Description () const |
| Returns the description. | |
| PEAK_COMMON_NO_DISCARD NodeType | Type () const |
| Returns the type. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< NodeMap > | ParentNodeMap () const |
| Returns the parent node map. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< Node > | FindInvalidatedNode (const std::string &name) const |
| Tries to find an invalidated node with the given name. | |
| template<class NodeType, typename std::enable_if< std::is_base_of< Node, NodeType >::value, int >::type = 0> | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< NodeType > | FindInvalidatedNode (const std::string &name) const |
| Tries to find an invalidated node with the given name and type. | |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< Node > > | InvalidatedNodes () const |
| Returns the invalidated nodes. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< Node > | FindInvalidatingNode (const std::string &name) const |
| Tries to find an invalidating node with the given name. | |
| template<class NodeType, typename std::enable_if< std::is_base_of< Node, NodeType >::value, int >::type = 0> | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< NodeType > | FindInvalidatingNode (const std::string &name) const |
| Tries to find an invalidating node with the given name and type. | |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< Node > > | InvalidatingNodes () const |
| Returns the invalidating nodes. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< Node > | FindSelectedNode (const std::string &name) const |
| Tries to find a selected node with the given name. | |
| template<class NodeType, typename std::enable_if< std::is_base_of< Node, NodeType >::value, int >::type = 0> | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< NodeType > | FindSelectedNode (const std::string &name) const |
| Tries to find a selected node with the given name and type. | |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< Node > > | SelectedNodes () const |
| Returns the selected nodes. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< Node > | FindSelectingNode (const std::string &name) const |
| Tries to find a selecting node with the given name. | |
| template<class NodeType, typename std::enable_if< std::is_base_of< Node, NodeType >::value, int >::type = 0> | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< NodeType > | FindSelectingNode (const std::string &name) const |
| Tries to find a selecting node with the given name and type. | |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< Node > > | SelectingNodes () const |
| Returns the selecting nodes. | |
| PEAK_COMMON_NO_DISCARD ChangedCallbackHandle | RegisterChangedCallback (const ChangedCallback &callback) |
| Registers a callback for signaling a change to the node. | |
| void | UnregisterChangedCallback (ChangedCallbackHandle callbackHandle) |
| Unregisters a changed callback. | |
Represents a GenAPI node.
This class allows to interact with a single node of a module. It is the base class for all nodes a module can have.
| using peak::core::nodes::Node::ChangedCallback = std::function<void(const std::shared_ptr<Node>& changedNode)> |
The type of changed callbacks.
The type of changed callback handles.
|
delete |
|
inlinevirtual |
|
delete |
|
delete |
|
inline |
Returns the access status.
| IOException | A communication error has occured, e.g. when the device is disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the caching mode.
See Node Caching and Polling Concepts.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the description.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the display name.
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find an invalidated node with the given name.
See Node Caching and Polling Concepts.
This query uses the same scope as InvalidatedNodes: it can return directly and indirectly dependent nodes that become invalid when this node changes.
| [in] | name | The name of the invalidated node to find. |
| NotFoundException | There is no invalidated node with the given name |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find an invalidated node with the given name and type.
This typed query uses the same scope as InvalidatedNodes: it can return directly and indirectly dependent nodes that become invalid when this node changes.
| [in] | name | The name of the invalidated node to find. |
| NotFoundException | There is no invalidated node with the given name |
| InvalidCastException | The found node cannot be cast to the given type |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find an invalidating node with the given name.
See Node Caching and Polling Concepts.
This query uses the same scope as InvalidatingNodes: it can return only directly connected upstream nodes that can invalidate this node.
| [in] | name | The name of the invalidating node to find. |
| NotFoundException | There is no invalidating node with the given name |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find an invalidating node with the given name and type.
This typed query uses the same scope as InvalidatingNodes: it can return only directly connected upstream nodes that can invalidate this node.
| [in] | name | The name of the invalidating node to find. |
| NotFoundException | There is no invalidating node with the given name |
| InvalidCastException | The found node cannot be cast to the given type |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find a selected node with the given name.
| [in] | name | The name of the selected node to find. |
| NotFoundException | There is no selected node with the given name |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find a selected node with the given name and type.
| [in] | name | The name of the selected node to find. |
| NotFoundException | There is no selected node with the given name |
| InvalidCastException | The found node cannot be cast to the given type |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find a selecting node with the given name.
| [in] | name | The name of the selecting node to find. |
| NotFoundException | There is no selecting node with the given name |
| InternalErrorException | An internal error has occurred. |
|
inline |
Tries to find a selecting node with the given name and type.
| [in] | name | The name of the selecting node to find. |
| NotFoundException | There is no selecting node with the given name |
| InvalidCastException | The found node cannot be cast to the given type |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the invalidated nodes.
See Node Caching and Polling Concepts.
Returns dependent nodes that become invalid when this node changes. The returned set can include both directly and indirectly connected nodes.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the invalidating nodes.
See Node Caching and Polling Concepts.
Returns upstream nodes that can invalidate this node. The returned set contains directly connected nodes only.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the node's access status is cacheable.
See Node Caching and Polling Concepts.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns whether the node is currently either readable or writeable.
| IOException | A communication error has occurred, e.g. when the device is disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the node is cacheable.
See Node Caching and Polling Concepts.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the node is deprecated.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the node is a feature, i.e. it can be reached via category nodes from a category node named "Root".
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns whether the node is implemented.
| IOException | A communication error has occurred, e.g. when the device is disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns whether the node is currently readable.
| IOException | A communication error has occurred, e.g. when the device is disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the node is streamable.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns whether the node is currently writeable.
| IOException | A communication error has occurred, e.g. when the device is disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the name.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the namespace the node belongs to.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the parent node map.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the polling time.
See Node Caching and Polling Concepts.
| InternalErrorException | An internal error has occurred. |
|
inline |
Registers a callback for signaling a change to the node.
This function registers a callback which gets called every time the node changes. Pass the callback handle returned by this function to UnregisterChangedCallback() to unregister the callback.
| [in] | callback | The callback to call if the node has changed. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the selected nodes.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the selecting nodes.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the tool tip.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the type.
The returned type is necessary to know the type the node has to be casted to if you want to access the full functionality of the node.
| InternalErrorException | An internal error has occurred. |
|
inline |
Unregisters a changed callback.
This function unregisters a changed callback by taking its handle.
| [in] | callbackHandle | The handle of the callback to unregister. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the visibility.
| InternalErrorException | An internal error has occurred. |