IDS peak genericC++ v1.7.3
Loading...
Searching...
No Matches
peak::core::nodes::CommandNode Class Reference

Represents a GenAPI command node. More...

#include <peak/node_map/peak_command_node.hpp>

Inheritance diagram for peak::core::nodes::CommandNode:
peak::core::nodes::Node

Public Member Functions

 CommandNode ()=delete
 
 ~CommandNode () override=default
 
 CommandNode (const CommandNode &other)=delete
 
CommandNode & operator= (const CommandNode &other)=delete
 
 CommandNode (CommandNode &&other)=delete
 
CommandNode & operator= (CommandNode &&other)=delete
 
bool IsDone () const
 Checks whether the command is done.
 
void Execute ()
 Executes the command associated with this node.
 
void WaitUntilDone (Timeout waitTimeout_ms=500)
 (Blocking) Wait for the executed command to be finished, i.e. until IsDone() is true.
 
- Public Member Functions inherited from peak::core::nodes::Node
 Node ()=delete
 
virtual ~Node ()
 
 Node (const Node &other)=delete
 
Node & operator= (const Node &other)=delete
 
 Node (Node &&other)=delete
 
Node & operator= (Node &&other)=delete
 
std::string Name () const
 Returns the name.
 
std::string DisplayName () const
 Returns the display name.
 
NodeNamespace Namespace () const
 Returns the namespace the node belongs to.
 
NodeVisibility Visibility () const
 Returns the visibility.
 
NodeAccessStatus AccessStatus () const
 Returns the access status.
 
bool IsCacheable () const
 Checks whether the node is cacheable.
 
bool IsAccessStatusCacheable () const
 Checks whether the node's access status is cacheable.
 
bool IsStreamable () const
 Checks whether the node is streamable.
 
bool IsDeprecated () const
 Checks whether the node is deprecated.
 
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".
 
NodeCachingMode CachingMode () const
 Returns the caching mode.
 
int64_t PollingTime () const
 Returns the polling time.
 
std::string ToolTip () const
 Returns the tool tip.
 
std::string Description () const
 Returns the description.
 
NodeType Type () const
 Returns the type.
 
std::shared_ptr< NodeMap > ParentNodeMap () const
 Returns the parent node map.
 
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>
std::shared_ptr< NodeType > FindInvalidatedNode (const std::string &name) const
 Tries to find an invalidated node with the given name and type.
 
std::vector< std::shared_ptr< Node > > InvalidatedNodes () const
 Returns the invalidated nodes.
 
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>
std::shared_ptr< NodeType > FindInvalidatingNode (const std::string &name) const
 Tries to find an invalidating node with the given name and type.
 
std::vector< std::shared_ptr< Node > > InvalidatingNodes () const
 Returns the invalidating nodes.
 
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>
std::shared_ptr< NodeType > FindSelectedNode (const std::string &name) const
 Tries to find a selected node with the given name and type.
 
std::vector< std::shared_ptr< Node > > SelectedNodes () const
 Returns the selected nodes.
 
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>
std::shared_ptr< NodeType > FindSelectingNode (const std::string &name) const
 Tries to find a selecting node with the given name and type.
 
std::vector< std::shared_ptr< Node > > SelectingNodes () const
 Returns the selecting nodes.
 
ChangedCallbackHandle RegisterChangedCallback (const ChangedCallback &callback)
 Registers a callback for signaling a change to the node.
 
void UnregisterChangedCallback (ChangedCallbackHandle callbackHandle)
 Unregisters a changed callback.
 

Additional Inherited Members

- Public Types inherited from peak::core::nodes::Node
using ChangedCallback = std::function< void(const std::shared_ptr< Node > &changedNode)>
 
using ChangedCallbackHandle = ChangedCallback *
 

Detailed Description

Represents a GenAPI command node.

Constructor & Destructor Documentation

◆ CommandNode() [1/3]

peak::core::nodes::CommandNode::CommandNode ( )
delete

◆ ~CommandNode()

peak::core::nodes::CommandNode::~CommandNode ( )
overridedefault

◆ CommandNode() [2/3]

peak::core::nodes::CommandNode::CommandNode ( const CommandNode &  other)
delete

◆ CommandNode() [3/3]

peak::core::nodes::CommandNode::CommandNode ( CommandNode &&  other)
delete

Member Function Documentation

◆ Execute()

void peak::core::nodes::CommandNode::Execute ( )
inline

Executes the command associated with this node.

Since
1.0
Exceptions
IOExceptionA communication error has occured, e.g. when the device is disconnected.
InternalErrorExceptionAn internal error has occurred.

◆ IsDone()

bool peak::core::nodes::CommandNode::IsDone ( ) const
inline

Checks whether the command is done.

Returns
True, if the command is done
False otherwise.
Since
1.0
Exceptions
IOExceptionA communication error has occured, e.g. when the device is disconnected.
InternalErrorExceptionAn internal error has occurred.

◆ operator=() [1/2]

CommandNode & peak::core::nodes::CommandNode::operator= ( CommandNode &&  other)
delete

◆ operator=() [2/2]

CommandNode & peak::core::nodes::CommandNode::operator= ( const CommandNode &  other)
delete

◆ WaitUntilDone()

void peak::core::nodes::CommandNode::WaitUntilDone ( Timeout  waitTimeout_ms = 500)
inline

(Blocking) Wait for the executed command to be finished, i.e. until IsDone() is true.

Parameters
[in]waitTimeout_msThe maximum waiting time in milliseconds.
Since
1.0
Exceptions
TimeoutExceptionThe specified timeout expired without the executed command being finished.
InternalErrorExceptionAn internal error has occurred.

The documentation for this class was generated from the following file: