API
 
Loading...
Searching...
No Matches
xigNode Class Referenceabstract

Implementation of basic instGraph node interface for MagAO-X. More...

#include <xigNode.hpp>

Inheritance diagram for xigNode:
Inheritance graph
Collaboration diagram for xigNode:
Collaboration graph

Public Member Functions

 xigNode ()=delete
 
 xigNode (const std::string &name, ingr::instGraphXML *parentGraph)
 Constructor.
 
std::string name ()
 Get the name of this node.
 
const std::set< std::string > & keys ()
 Get the set holding the INDI keys for this node.
 
void key (const std::string &nkey)
 Add a key to the set.
 
ingr::instNode * node ()
 Get the pointer to the underlying node.
 
virtual int handleSetProperty (const pcf::IndiProperty &ipRecv)=0
 INDI SetProperty callback.
 
virtual void togglePutsOn ()
 Change the state of all inputs and all outputs to on.
 
virtual void togglePutsOff ()
 Change the state of all inputs and all outputs to off.
 

Protected Attributes

std::set< std::string > m_keys
 The INDI keys (device.property) which this node subscribes to.
 
ingr::instGraphXML * m_parentGraph { nullptr }
 The parent instGraph that this node is a part of.
 
ingr::instNode * m_node { nullptr }
 The underlying instGraph node.
 
int m_changes { 0 }
 Counter that can be incremented when changes are detected. Set to 0 when graph is updated.
 

Detailed Description

Implementation of basic instGraph node interface for MagAO-X.

This class is pure virtual, derived classes must implement handleSetProperty.

Definition at line 30 of file xigNode.hpp.

Constructor & Destructor Documentation

◆ xigNode() [1/2]

xigNode::xigNode ( )
delete

◆ xigNode() [2/2]

xigNode::xigNode ( const std::string &  name,
ingr::instGraphXML *  parentGraph 
)
inline

Constructor.

Default c'tor is deleted. Must supply both node name and a parentGraph with a node with the same name in it.

Parameters
[in]namethe name of the node
[in]parentGraphthe parent instGraph

Definition at line 94 of file xigNode.hpp.

References m_node, m_parentGraph, name(), and XIGN_EXCEPTION.

Member Function Documentation

◆ handleSetProperty()

virtual int xigNode::handleSetProperty ( const pcf::IndiProperty &  ipRecv)
pure virtual

INDI SetProperty callback.

This is a pure virtual function in xigNode.

Parameters
[in]ipRecvthe received INDI property to handle

Implemented in fsmNode, indiPropNode, pwrOnOffNode, staticNode, stdMotionNode, and test_xigNode.

◆ key()

void xigNode::key ( const std::string &  nkey)
inline

◆ keys()

const std::set< std::string > & xigNode::keys ( )
inline

Get the set holding the INDI keys for this node.

Returns
a const reference to m_keys

Definition at line 111 of file xigNode.hpp.

References m_keys.

Referenced by SCENARIO().

◆ name()

◆ node()

ingr::instNode * xigNode::node ( )
inline

Get the pointer to the underlying node.

Returns
the node pointer, which can not be nullptr after construction

Definition at line 121 of file xigNode.hpp.

References m_node.

Referenced by SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), TEST_CASE(), and TEST_CASE().

◆ togglePutsOff()

void xigNode::togglePutsOff ( )
inlinevirtual

Change the state of all inputs and all outputs to off.

Reimplemented in staticNode, and stdMotionNode.

Definition at line 141 of file xigNode.hpp.

References m_node.

Referenced by fsmNode::handleSetProperty(), indiPropNode::toggleOff(), and pwrOnOffNode::toggleOff().

◆ togglePutsOn()

void xigNode::togglePutsOn ( )
inlinevirtual

Change the state of all inputs and all outputs to on.

Reimplemented in staticNode, and stdMotionNode.

Definition at line 126 of file xigNode.hpp.

References m_node.

Referenced by fsmNode::handleSetProperty(), indiPropNode::toggleOn(), pwrOnOffNode::toggleOn(), and stdMotionNode::togglePutsOn().

Member Data Documentation

◆ m_changes

int xigNode::m_changes { 0 }
protected

Counter that can be incremented when changes are detected. Set to 0 when graph is updated.

Definition at line 39 of file xigNode.hpp.

Referenced by fsmNode::handleSetProperty(), indiPropNode::handleSetProperty(), and stdMotionNode::handleSetProperty().

◆ m_keys

std::set<std::string> xigNode::m_keys
protected

The INDI keys (device.property) which this node subscribes to.

Definition at line 33 of file xigNode.hpp.

Referenced by key(), and keys().

◆ m_node

◆ m_parentGraph


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