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

#include <pwrOnOffNode.hpp>

Inheritance diagram for pwrOnOffNode:
Inheritance graph
Collaboration diagram for pwrOnOffNode:
Collaboration graph

Public Member Functions

 pwrOnOffNode (const std::string &name, ingr::instGraphXML *parentGraph)
 
void pwrKey (const std::string &pk)
 
const std::string & pwrKey () const
 
virtual int handleSetProperty (const pcf::IndiProperty &ipRecv)
 INDI SetProperty callback.
 
virtual void toggleOn ()
 
virtual void toggleOff ()
 
void loadConfig (mx::app::appConfigurator &config)
 
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 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::string m_pwrKey
 
int m_pwrState { -1 }
 
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

Definition at line 12 of file pwrOnOffNode.hpp.

Constructor & Destructor Documentation

◆ pwrOnOffNode()

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

Definition at line 20 of file pwrOnOffNode.hpp.

References xigNode::m_node, and xigNode::m_parentGraph.

Member Function Documentation

◆ handleSetProperty()

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

INDI SetProperty callback.

Parameters
[in]ipRecvthe received INDI property to handle

Implements xigNode.

Definition at line 55 of file pwrOnOffNode.hpp.

References m_pwrKey, toggleOff(), and toggleOn().

◆ 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 pwrOnOffNode::loadConfig ( mx::app::appConfigurator &  config)
inline

Definition at line 104 of file pwrOnOffNode.hpp.

References xigNode::m_parentGraph, xigNode::name(), and pwrKey().

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().

◆ pwrKey() [1/2]

const std::string & pwrOnOffNode::pwrKey ( ) const
inline

Definition at line 50 of file pwrOnOffNode.hpp.

References m_pwrKey.

Referenced by loadConfig().

◆ pwrKey() [2/2]

void pwrOnOffNode::pwrKey ( const std::string &  pk)
inline

Definition at line 43 of file pwrOnOffNode.hpp.

References xigNode::key(), and m_pwrKey.

Referenced by TEST_CASE().

◆ toggleOff()

void pwrOnOffNode::toggleOff ( )
inlinevirtual

◆ toggleOn()

void pwrOnOffNode::toggleOn ( )
inlinevirtual

◆ togglePutsOff()

void xigNode::togglePutsOff ( )
inlinevirtualinherited

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

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

◆ togglePutsOn()

void xigNode::togglePutsOn ( )
inlinevirtualinherited

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

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

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_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_parentGraph

◆ m_pwrKey

std::string pwrOnOffNode::m_pwrKey
protected

Definition at line 16 of file pwrOnOffNode.hpp.

Referenced by handleSetProperty(), pwrKey(), and pwrKey().

◆ m_pwrState

int pwrOnOffNode::m_pwrState { -1 }
protected

Definition at line 17 of file pwrOnOffNode.hpp.

Referenced by toggleOff(), and toggleOn().


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