26 ingr::instGraphXML *parentGraph
33 const std::set<std::string> &
inputsOn()
const;
39 const std::set<std::string> &
inputsOff()
const;
45 const std::set<std::string> &
outputsOn()
const;
51 const std::set<std::string> &
outputsOff()
const;
67 void loadConfig( mx::app::appConfigurator &config );
96 static_cast<void>( ipRecv );
107 m_node->input( iput )->state( ingr::putState::on );
110 catch(
const std::exception &e )
112 std::string msg =
XIGN_EXCEPTION(
"staticNode::togglePutsAll",
"exception changing state on inputs" );
115 throw std::runtime_error( msg );
122 m_node->input( iput )->state( ingr::putState::off );
125 catch(
const std::exception &e )
127 std::string msg =
XIGN_EXCEPTION(
"staticNode::togglePutsAll",
"parent graph is null" );
130 throw std::runtime_error( msg );
137 m_node->output( iput )->state( ingr::putState::on );
140 catch(
const std::exception &e )
142 std::string msg =
XIGN_EXCEPTION(
"staticNode::togglePutsAll",
"parent graph is null" );
145 throw std::runtime_error( msg );
152 m_node->output( iput )->state( ingr::putState::off );
155 catch(
const std::exception &e )
157 std::string msg =
XIGN_EXCEPTION(
"staticNode::togglePutsAll",
"parent graph is null" );
160 throw std::runtime_error( msg );
178 std::string msg =
XIGN_EXCEPTION(
"staticNode::loadConfig",
"parent graph is null" );
179 throw std::runtime_error( msg );
183 config.configUnused( type, mx::app::iniFile::makeKey(
name(),
"type" ) );
185 if( type !=
"static" )
187 std::string msg =
XIGN_EXCEPTION(
"staticNode::loadConfig",
"node type is not static" );
188 throw std::runtime_error( msg );
192 config.configUnused(
inputsOn, mx::app::iniFile::makeKey(
name(),
"inputsOn" ) );
202 catch(
const std::exception & e)
204 std::string msg =
XIGN_EXCEPTION(
"staticNode::loadConfig",
"exception caught loading inputsOn" );
210 config.configUnused(
inputsOff, mx::app::iniFile::makeKey(
name(),
"inputsOff" ) );
220 catch(
const std::exception & e)
222 std::string msg =
XIGN_EXCEPTION(
"staticNode::loadConfig",
"exception caught loading inputsOff" );
228 config.configUnused(
outputsOn, mx::app::iniFile::makeKey(
name(),
"outputsOn" ) );
237 catch(
const std::exception & e)
239 std::string msg =
XIGN_EXCEPTION(
"staticNode::loadConfig",
"exception caught loading outputsOn" );
245 config.configUnused(
outputsOff, mx::app::iniFile::makeKey(
name(),
"outputsOff" ) );
254 catch(
const std::exception & e)
256 std::string msg =
XIGN_EXCEPTION(
"staticNode::loadConfig",
"exception caught loading outputsOff" );
An instGraph node which is static, with status set at config time and not changing.
virtual int handleSetProperty(const pcf::IndiProperty &ipRecv)
INDI SetProperty callback.
std::set< std::string > m_outputsOn
outputs which are always on
std::set< std::string > m_inputsOff
inputs which are always off
const std::set< std::string > & inputsOff() const
Get the always off inputs.
std::set< std::string > m_inputsOn
inputs which are always on
std::set< std::string > m_outputsOff
outputs which are always off
virtual void togglePutsOff()
Toggle all puts off.
virtual void togglePutsAll()
Toggle all puts to their static state.
const std::set< std::string > & inputsOn() const
Get the always on inputs.
const std::set< std::string > & outputsOn() const
Get the always on outputs.
virtual void togglePutsOn()
Toggle all puts on.
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 > & outputsOff() const
Get the always off outputs.
void loadConfig(mx::app::appConfigurator &config)
Configure this node form an appConfigurator.
Implementation of basic instGraph node interface for MagAO-X.
ingr::instNode * m_node
The underlying instGraph node.
ingr::instGraphXML * m_parentGraph
The parent instGraph that this node is a part of.
std::string name()
Get the name of this node.
The base MagAO-X instGraph node header file.
#define XIGN_EXCEPTION(src, expl)