Functions | |
int | addTextElement (pcf::IndiProperty &prop, const std::string &name, const std::string &label="") |
Add a standard INDI Text element. More... | |
template<typename T > | |
int | addNumberElement (pcf::IndiProperty &prop, const std::string &name, const T &min, const T &max, const T &step, const std::string &format, const std::string &label="") |
Add a standard INDI Number element. More... | |
template<typename T , class indiDriverT > | |
void | updateIfChanged (pcf::IndiProperty &p, const std::string &el, const T &newVal, indiDriverT *indiDriver, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok) |
Update the value of the INDI element, but only if it has changed. More... | |
template<typename T , class indiDriverT > | |
void | updateIfChanged (pcf::IndiProperty &p, const std::vector< std::string > &els, const std::vector< T > &newVals, indiDriverT *indiDriver, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok) |
Update the elements of an INDI propery, but only if there has been a change in at least one. More... | |
template<class indiDriverT > | |
void | updateSwitchIfChanged (pcf::IndiProperty &p, const std::string &el, const pcf::IndiElement::SwitchStateType &newVal, indiDriverT *indiDriver, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok) |
Update the value of the INDI element, but only if it has changed. More... | |
template<class indiDriverT > | |
void | updateSelectionSwitchIfChanged (pcf::IndiProperty &p, const std::string &el, indiDriverT *indiDriver, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok) |
Update the values of a one-of-many INDI switch vector, but only if it has changed. More... | |
int | parseIndiKey (std::string &devName, std::string &propName, const std::string &key) |
Parse an INDI key into the device and property names. More... | |
int MagAOX::app::indi::addNumberElement | ( | pcf::IndiProperty & | prop, |
const std::string & | name, | ||
const T & | min, | ||
const T & | max, | ||
const T & | step, | ||
const std::string & | format, | ||
const std::string & | label = "" |
||
) |
Add a standard INDI Number element.
[out] | prop | the property to which to add the elemtn |
[in] | name | the name of the element |
[in] | min | the minimum value for the element |
[in] | max | the minimum value for the element |
[in] | step | the step size of the lement |
[in] | format | the _ value for the elements, applied to both target and current. Set to "" to use the MagAO-X standard for type. |
[in] | label | [optional] the GUI label suggestion for this property |
Definition at line 63 of file indiUtils.hpp.
Referenced by MagAOX::app::refRMS::appStartup(), MagAOX::app::userGainCtrl::appStartup(), MagAOX::app::zaberCtrl::appStartup(), and MagAOX::app::userGainCtrl::getModeBlocks().
|
inline |
Add a standard INDI Text element.
[out] | prop | the property to which to add the elemtn |
[in] | name | the name of the element |
[in] | label | [optional] the GUI label suggestion for this property |
Definition at line 40 of file indiUtils.hpp.
Referenced by MagAOX::app::cacaoInterface::appStartup().
|
inline |
Parse an INDI key into the device and property names.
We often represent an INDI property as a unique key in the form deviceName.propName
. This function parses such a key into its parts.
[out] | devName | the device name |
[out] | propName | the property name |
[in] | key | the key to parse |
Definition at line 317 of file indiUtils.hpp.
Referenced by MagAOX::app::stateRuleEngine::appStartup(), and SCENARIO().
void MagAOX::app::indi::updateIfChanged | ( | pcf::IndiProperty & | p, |
const std::string & | el, | ||
const T & | newVal, | ||
indiDriverT * | indiDriver, | ||
pcf::IndiProperty::PropertyStateType | newState = pcf::IndiProperty::Ok |
||
) |
Update the value of the INDI element, but only if it has changed.
Only sends the set property message if the new value is different. For properties with more than one element that may have changed, you should use the vector version below.
p | [in/out] The property containing the element to possibly update | |
[in] | el | The element name |
[in] | newVal | the new value |
[in] | indiDriver | the MagAOX INDI driver to use |
Definition at line 95 of file indiUtils.hpp.
Referenced by MagAOX::app::dev::dmPokeWFS< derivedT >::appLogic(), MagAOX::app::baslerCtrl::checkNextROI(), MagAOX::app::MagAOXApp< _useINDI >::clearFSMAlert(), MagAOX::app::baslerCtrl::configureAcquisition(), MagAOX::app::MagAOXApp< _useINDI >::indiTargetUpdate(), MagAOX::app::dev::stdCamera< derivedT >::onPowerOff(), MagAOX::app::MagAOXApp< _useINDI >::state(), MagAOX::app::dev::outletController< derivedT >::turnChannelOff(), MagAOX::app::dev::outletController< derivedT >::turnChannelOn(), MagAOX::app::MagAOXApp< _useINDI >::updateIfChanged(), MagAOX::app::streamWriter::updateINDI(), MagAOX::app::tcsInterface::updateINDI(), MagAOX::app::dev::frameGrabber< derivedT >::updateINDI(), MagAOX::app::dev::outletController< derivedT >::updateINDI(), MagAOX::app::dev::shmimMonitor< derivedT, specificT >::updateINDI(), and MagAOX::app::dev::stdMotionStage< derivedT >::updateINDI().
void MagAOX::app::indi::updateIfChanged | ( | pcf::IndiProperty & | p, |
const std::vector< std::string > & | els, | ||
const std::vector< T > & | newVals, | ||
indiDriverT * | indiDriver, | ||
pcf::IndiProperty::PropertyStateType | newState = pcf::IndiProperty::Ok |
||
) |
Update the elements of an INDI propery, but only if there has been a change in at least one.
Only sends the set property message if at least one of the new values is different, or if the state has changed.
p | [in/out] The property containing the element to possibly update | |
[in] | els | The element names |
[in] | newVals | the new values |
[in] | indiDriver | the MagAOX INDI driver to use |
Definition at line 143 of file indiUtils.hpp.
void MagAOX::app::indi::updateSelectionSwitchIfChanged | ( | pcf::IndiProperty & | p, |
const std::string & | el, | ||
indiDriverT * | indiDriver, | ||
pcf::IndiProperty::PropertyStateType | newState = pcf::IndiProperty::Ok |
||
) |
Update the values of a one-of-many INDI switch vector, but only if it has changed.
Only sends the set property message if the new settings are different.
p | [in/out] The property containing the element to possibly update | |
[in] | el | The element name which is now on |
[in] | indiDriver | the MagAOX INDI driver to use |
Definition at line 249 of file indiUtils.hpp.
Referenced by MagAOX::app::dev::stdCamera< derivedT >::updateINDI().
void MagAOX::app::indi::updateSwitchIfChanged | ( | pcf::IndiProperty & | p, |
const std::string & | el, | ||
const pcf::IndiElement::SwitchStateType & | newVal, | ||
indiDriverT * | indiDriver, | ||
pcf::IndiProperty::PropertyStateType | newState = pcf::IndiProperty::Ok |
||
) |
Update the value of the INDI element, but only if it has changed.
Only sends the set property message if the new value is different.
investigate how this handles floating point values and string conversions.
this needs a const char specialization to std::string
p | [in/out] The property containing the element to possibly update | |
[in] | el | The element name |
[in] | newVal | the new value |
[in] | indiDriver | the MagAOX INDI driver to use |
Definition at line 212 of file indiUtils.hpp.
Referenced by MagAOX::app::dev::dmPokeWFS< derivedT >::appLogic(), MagAOX::app::if(), MagAOX::app::INDI_NEWCALLBACK_DEFN(), MagAOX::app::dmSpeckle::modThreadExec(), MagAOX::app::sparkleClock::modThreadExec(), MagAOX::app::MagAOXApp< _useINDI >::newCallBack_clearFSMAlert(), MagAOX::app::dev::stdMotionStage< derivedT >::newCallBack_m_indiP_home(), MagAOX::app::dev::stdMotionStage< derivedT >::newCallBack_m_indiP_stop(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_reconfigure(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_check(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_default(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_full(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_fullbin(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_last(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_loadlast(), MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_set(), MagAOX::app::dev::dm< derivedT, realT >::newCallBack_zeroAll(), MagAOX::app::baslerCtrl::setNextROI(), MagAOX::app::streamWriter::updateINDI(), and MagAOX::app::MagAOXApp< _useINDI >::updateSwitchIfChanged().