API
 
Loading...
Searching...
No Matches
staticNode Class Reference

An instGraph node which is static, with status set at config time and not changing. More...

#include <staticNode.hpp>

Inheritance diagram for staticNode:
Inheritance graph
Collaboration diagram for staticNode:
Collaboration graph

Public Member Functions

 staticNode (const std::string &name, ingr::instGraphXML *parentGraph)
 Only c'tor. Must be constructed with node name and a parent graph.
 
const std::set< std::string > & inputsOn () const
 Get the always on inputs.
 
const std::set< std::string > & inputsOff () const
 Get the always off inputs.
 
const std::set< std::string > & outputsOn () const
 Get the always on outputs.
 
const std::set< std::string > & outputsOff () const
 Get the always off outputs.
 
virtual int handleSetProperty (const pcf::IndiProperty &ipRecv)
 INDI SetProperty callback.
 
virtual void togglePutsAll ()
 Toggle all puts to their static state.
 
virtual void togglePutsOn ()
 Toggle all puts on.
 
virtual void togglePutsOff ()
 Toggle all puts off.
 
void loadConfig (mx::app::appConfigurator &config)
 Configure this node form an appConfigurator.
 
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.
 

Protected Attributes

std::set< std::string > m_inputsOn
 inputs which are always on
 
std::set< std::string > m_inputsOff
 inputs which are always off
 
std::set< std::string > m_outputsOn
 outputs which are always on
 
std::set< std::string > m_outputsOff
 outputs which are always off
 
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

An instGraph node which is static, with status set at config time and not changing.

Definition at line 13 of file staticNode.hpp.

Constructor & Destructor Documentation

◆ staticNode()

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

Only c'tor. Must be constructed with node name and a parent graph.

Parameters
[in]parentGraphthe name of this node [in] the graph which this node belongs to

Definition at line 70 of file staticNode.hpp.

Member Function Documentation

◆ handleSetProperty()

int staticNode::handleSetProperty ( const pcf::IndiProperty &  ipRecv)
inlinevirtual

INDI SetProperty callback.

Parameters
[in]ipRecvthe received INDI property to handle

Implements xigNode.

Definition at line 94 of file staticNode.hpp.

◆ inputsOff()

const std::set< std::string > & staticNode::inputsOff ( ) const

Get the always off inputs.

Returns
the value of m_inputsOff

Definition at line 79 of file staticNode.hpp.

References m_inputsOff.

Referenced by loadConfig(), and TEST_CASE().

◆ inputsOn()

const std::set< std::string > & staticNode::inputsOn ( ) const

Get the always on inputs.

Returns
the value of m_inputsOn

Definition at line 74 of file staticNode.hpp.

References m_inputsOn.

Referenced by loadConfig(), and TEST_CASE().

◆ key()

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

◆ keys()

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

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 xigNode::m_keys.

Referenced by SCENARIO().

◆ loadConfig()

void staticNode::loadConfig ( mx::app::appConfigurator &  config)
inline

Configure this node form an appConfigurator.

Parameters
[in]configthe loaded configuration

Definition at line 174 of file staticNode.hpp.

References inputsOff(), inputsOn(), m_inputsOff, m_inputsOn, m_outputsOff, m_outputsOn, xigNode::m_parentGraph, xigNode::name(), outputsOff(), outputsOn(), togglePutsAll(), and XIGN_EXCEPTION.

Referenced by TEST_CASE().

◆ name()

◆ node()

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

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 xigNode::m_node.

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

◆ outputsOff()

const std::set< std::string > & staticNode::outputsOff ( ) const

Get the always off outputs.

Returns
the value of m_outputsOff

Definition at line 89 of file staticNode.hpp.

References m_outputsOff.

Referenced by loadConfig(), and TEST_CASE().

◆ outputsOn()

const std::set< std::string > & staticNode::outputsOn ( ) const

Get the always on outputs.

Returns
the value of m_outputsOn

Definition at line 84 of file staticNode.hpp.

References m_outputsOn.

Referenced by loadConfig(), and TEST_CASE().

◆ togglePutsAll()

void staticNode::togglePutsAll ( )
inlinevirtual

Toggle all puts to their static state.

Definition at line 101 of file staticNode.hpp.

References m_inputsOff, m_inputsOn, xigNode::m_node, m_outputsOff, m_outputsOn, and XIGN_EXCEPTION.

Referenced by loadConfig(), togglePutsOff(), and togglePutsOn().

◆ togglePutsOff()

void staticNode::togglePutsOff ( )
inlinevirtual

Toggle all puts off.

Reimplemented from xigNode.

Definition at line 169 of file staticNode.hpp.

References togglePutsAll().

◆ togglePutsOn()

void staticNode::togglePutsOn ( )
inlinevirtual

Toggle all puts on.

Reimplemented from xigNode.

Definition at line 164 of file staticNode.hpp.

References togglePutsAll().

Member Data Documentation

◆ m_changes

int xigNode::m_changes { 0 }
protectedinherited

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_inputsOff

std::set<std::string> staticNode::m_inputsOff
protected

inputs which are always off

Definition at line 18 of file staticNode.hpp.

Referenced by inputsOff(), loadConfig(), and togglePutsAll().

◆ m_inputsOn

std::set<std::string> staticNode::m_inputsOn
protected

inputs which are always on

Definition at line 17 of file staticNode.hpp.

Referenced by inputsOn(), loadConfig(), and togglePutsAll().

◆ m_keys

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

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

Definition at line 33 of file xigNode.hpp.

Referenced by xigNode::key(), and xigNode::keys().

◆ m_node

◆ m_outputsOff

std::set<std::string> staticNode::m_outputsOff
protected

outputs which are always off

Definition at line 21 of file staticNode.hpp.

Referenced by loadConfig(), outputsOff(), and togglePutsAll().

◆ m_outputsOn

std::set<std::string> staticNode::m_outputsOn
protected

outputs which are always on

Definition at line 20 of file staticNode.hpp.

Referenced by loadConfig(), outputsOn(), and togglePutsAll().

◆ m_parentGraph


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