7#ifndef pwrOnOffNode_hpp
8#define pwrOnOffNode_hpp
29 void pwrKey(
const std::string &pk );
31 const std::string &
pwrKey()
const;
40 void loadConfig( mx::app::appConfigurator &config );
57 if( ipRecv.createUniqueKey() !=
m_pwrKey )
62 if( !ipRecv.find(
"state" ) )
67 if( ipRecv[
"state"].get<std::string>() ==
"On" )
87 std::cerr <<
"writing\n";
108 std::string msg =
"pwrOnOffNode::loadConfig: parent graph is null";
111 msg +=
" " + std::to_string( __LINE__ );
113 throw std::runtime_error( msg );
117 config.configUnused( type, mx::app::iniFile::makeKey(
name(),
"type" ) );
119 if( type !=
"pwrOnOff" )
121 std::string msg =
"pwrOnOffNode::loadConfig: node type is not pwrOnOff";
124 msg +=
" " + std::to_string( __LINE__ );
125 throw std::runtime_error( msg );
129 config.configUnused( pk, mx::app::iniFile::makeKey(
name(),
"pwrKey" ) );
133 std::string msg =
"pwrOnOffNode::loadConfig: pwrKey can not be empty";
136 msg +=
" " + std::to_string( __LINE__ );
138 throw std::runtime_error( msg );
void loadConfig(mx::app::appConfigurator &config)
pwrOnOffNode(const std::string &name, ingr::instGraphXML *parentGraph)
const std::string & pwrKey() const
virtual int handleSetProperty(const pcf::IndiProperty &ipRecv)
INDI SetProperty callback.
Implementation of basic instGraph node interface for MagAO-X.
void key(const std::string &nkey)
Add a key to the set.
ingr::instNode * m_node
The underlying instGraph node.
virtual void togglePutsOn()
Change the state of all inputs and all outputs to on.
ingr::instGraphXML * m_parentGraph
The parent instGraph that this node is a part of.
std::string name()
Get the name of this node.
virtual void togglePutsOff()
Change the state of all inputs and all outputs to off.
The base MagAO-X instGraph node header file.