API
Todo List
Module ALPAO Interface

document these members

Module dmMode

update md doc

the current_amps/target_amps thing is dumb. Should consider mode00.target, mode00.current maybe.

Member extractRuleProp (pcf::IndiProperty **prop, std::string &element, indiRuleMaps &maps, const std::string &section, const std::string &propkey, const std::string &elkey, const pcf::IndiProperty::Type &type, mx::app::appConfigurator &config)
have to split device and propertyName
Member flatlogs::timespecX::operator= (const timespec &ts)
make this use minval and maxval
Member getPix (void *imdata, size_t idx)
document this file
Member loadRuleConfig (indiRuleMaps &maps, mx::app::appConfigurator &config)

check for insertion failure ///

add a constructor that has priority, message, and comparison, to reduce duplication

Class logdump

document this

add config for colors, both on/off and options to change.

Member logdump::execute ()

if follow is set, then should nfiles default to 1 unless explicitly set?

check for errors on all reads . . .

what do we do if nrd not equal to expected size?

Member logdump::gettimes (std::vector< std::string > &logs)
check for errors on all reads . . .
Member logdump::loadConfig ()
need to check for lack of "." and error or fix
Namespace MagAOX
test that restarting fpsCtrl doesn't scram this
Class MagAOX::app::acronameUsbHub

add current, temperature, etc. monitoring

telemetry

Member MagAOX::app::acronameUsbHub::loadConfig ()
mxlib loadConfig needs to return int to propagate errors!
Member MagAOX::app::alpaoCtrl::get_actuator_mapping ()
convert this to use mxlib::fitsFile
Member MagAOX::app::alpaoCtrl::releaseDM ()
error check
Member MagAOX::app::andorCtrl::configureAcquisition ()
This should check whether we have a match between EDT and the camera right?
Member MagAOX::app::baslerCtrl::appLogic ()
Fall through check?
Member MagAOX::app::bmcCtrl::get_actuator_mapping ()
convert this to use mxlib::fitsFile
Member MagAOX::app::cacaoInterface::checkLoopProcesses ()
look for actual evidence of processes, such as interrogating ps.
Member MagAOX::app::cameraSim::appLogic ()
Fall through check?
Member MagAOX::app::dev::dm< derivedT, realT >::m_satThreadPrio
satThreadPrio configuration is not actually implemented.
Member MagAOX::app::dev::dm< derivedT, realT >::setFlat (bool update=false)
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.
Member MagAOX::app::dev::dm< derivedT, realT >::setTest ()
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.
Member MagAOX::app::dev::dm< derivedT, realT >::setupConfig (mx::app::appConfigurator &config)
we shmimMonitor now has configSection so this isn't necessary.
Member MagAOX::app::dev::dm< derivedT, realT >::zeroFlat ()
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.
Member MagAOX::app::dev::dm< derivedT, realT >::zeroTest ()
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.
Member MagAOX::app::dev::dssShutter< derivedT >::open ()
need shutter log types
Member MagAOX::app::dev::dssShutter< derivedT >::shut ()

need shutter log types

need shutter log types

Member MagAOX::app::dev::frameGrabber< derivedT >::fgThreadExec ()
this ought to wait until OPERATING, using READY as a sign of "not integrating"
Class MagAOX::app::dev::outletController< derivedT >
finalize 0-counting vs 1-counting rules --> do we subtract one from config-ed outlet indices if m_firstOne is true?
Member MagAOX::app::dev::outletController< derivedT >::loadConfig (mx::app::appConfigurator &config)

error checking on offDelays, should complain if not same length

test this error

error checking on onDelays, should complain if not same length

error checking on outlets

test this error

error checking on offOrder, should complain if not same length

Member MagAOX::app::dev::outletController< derivedT >::setupINDI ()
change this to be appStartup like other devs.
Member MagAOX::app::dev::outletController< derivedT >::updateOutletState (int outletNum)=0
this is declared pure virtual, but there is an implementation.
Class MagAOX::app::dev::shmimMonitor< derivedT, specificT >
move requirement for sigsegv handling to derived class – it should set m_restart on all shmimMonitors it inherited.
Member MagAOX::app::dev::shmimMonitor< derivedT, specificT >::smThreadExec ()

change to naxis?

change to naxis?

this isn't right--> isn't there a define in cacao to use?

Member MagAOX::app::dev::stdCamera< derivedT >::newCallBack_roi_x (const pcf::IndiProperty &ipRecv)
why don't these check if usesROI is true?
Member MagAOX::app::dmMode::appLogic ()
this is hardcoded in ImageStreamIO.c – should be a define
Member MagAOX::app::dmMode::sendCommand ()
change to naxis?
Member MagAOX::app::dmModulator::appLogic ()

this is hardcoded in ImageStreamIO.c – should be a define

this is hardcoded in ImageStreamIO.c – should be a define

Member MagAOX::app::dmPokeCenter::fitPupil ()
use work version
Member MagAOX::app::dmPokeCenter::runSensor (bool firstRun)

this should be configurable and based on fps

this should be configurable

this should be configurable

Member MagAOX::app::dmSpeckle::appLogic ()

this is hardcoded in ImageStreamIO.c – should be a define

this is hardcoded in ImageStreamIO.c – should be a define

Class MagAOX::app::filterWheelCtrl

add temperature monitoring

add INDI props to md doc

should move in least time direction, rather than always in the same direction.

add tests

should be an iodevice

Class MagAOX::app::hsfwCtrl
add tests
Member MagAOX::app::indi::updateIfChanged (pcf::IndiProperty &p, const std::string &el, const T &newVal, indiDriverT *indiDriver, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok)
this needs a const char specialization to std::string
Member 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)
this needs a const char specialization to std::string
Member 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)

investigate how this handles floating point values and string conversions.

this needs a const char specialization to std::string

Member MagAOX::app::INDI_NEWCALLBACK_DEFN (dmMode, m_indiP_tgtAmps)(const pcf
add bounds checks here
Member MagAOX::app::INDI_NEWCALLBACK_DEFN (dmMode, m_indiP_currAmps)(const pcf
add bounds checks here
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C2freq)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C2outp)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C1phse)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C1ofst)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C1volts)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C1freq)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C1outp)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C2phse)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C2ofst)(const pcf
use find to test
Member MagAOX::app::INDI_SETCALLBACK_DEFN (ttmModulator, m_indiP_C2volts)(const pcf
use find to test
Member MagAOX::app::irisaoCtrl::releaseDM ()
need to trigger shmimMonitor loop to pause it.
Member MagAOX::app::kcubeCtrl::appStartup ()
if format is "" this crashes INDI startup... wtf
Member MagAOX::app::kcubeCtrl::kcubeCtrl_test
needs telems
Member MagAOX::app::koolanceCtrl::getStatus ()
needs to be iodevice
Member MagAOX::app::koolanceCtrl::initialConnect ()
needs to be iodevice
Class MagAOX::app::MagAOXApp< _useINDI >

implement libMagAOX error handling? (a stack?)

make m_powerMgtEnabled a template parameter, and static_assert checki if _useINDI== false and power management is true

Member MagAOX::app::MagAOXApp< _useINDI >::createINDIFIFOS ()
make driver FIFO path full configurable.
Member MagAOX::app::MagAOXApp< _useINDI >::execute ()
Need a heartbeat update here.
Member MagAOX::app::MagAOXApp< _useINDI >::handleNewProperty (const pcf::IndiProperty &ipRecv)
handle errors, are they FATAL?
Member MagAOX::app::MagAOXApp< _useINDI >::handleSetProperty (const pcf::IndiProperty &ipRecv)

log an error here because callBack should not be null

handle errors, are they FATAL?

log invalid SetProperty request.

Member MagAOX::app::MagAOXApp< _useINDI >::m_indiDriver
instead of making this public, provide an accessor.
Member MagAOX::app::MagAOXApp< _useINDI >::state (const stateCodes::stateCodeT &s, bool stateAlert=false)
move this to a function in stateCodes
Class MagAOX::app::mzmqClient

handle the alternate local name option as in the base milkzmqClient

md docs for this.

Class MagAOX::app::mzmqServer

document this better

implement thread-kills for shutdown. Maybe switch to USR1, with library wide empty handler, so it isn't logged.

Member MagAOX::app::ocam2KCtrl::acquireAndCheckValid ()
need frame corrupt log type
Member MagAOX::app::ocam2KCtrl::appLogic ()
Fall through check?
Member MagAOX::app::ocam2KCtrl::appShutdown ()
error check these base class fxns.
Member MagAOX::app::ocam2KCtrl::configureAcquisition ()
check response of pdvSerialWriteRead
Member MagAOX::app::ocam2KCtrl::resetEMProtection ()
check response.
Member MagAOX::app::ocam2KCtrl::setEMGain ()
check response
Member MagAOX::app::ocam2KCtrl::setFPS ()

verify that this works!!

check response

Member MagAOX::app::ocam2KCtrl::setSynchro ()

check response

check response

Member MagAOX::app::ocam2KCtrl::setTempControl ()
check response
Member MagAOX::app::ocam2KCtrl::setTempSetPt ()

check response

make more configurable

Member MagAOX::app::parseBSWV (int &channel, std::string &wvtp, double &freq, double &peri, double &amp, double &ampvrms, double &ofst, double &hlev, double &llev, double &phse, double &wdth, const std::string &strRead)

document tests

update tests for new wdth parameter in PULSE

Member MagAOX::app::parseFPS (float &fps, const std::string &fstr)
add test for FPS
Member MagAOX::app::pi335Ctrl::appLogic ()

promote usbDevice to dev:: and make this part of its appStartup

promote usbDevice to dev:: and make this part of its appLogic

Member MagAOX::app::pi335Ctrl::appStartup ()

error checks here

promote usbDevice to dev:: and make this part of its appStartup

Member MagAOX::app::pi335Ctrl::getPos (float &pos, int n)
this should be a separate unit-tested parser
Member MagAOX::app::pi335Ctrl::getSva (float &sva, int n)
this should be a separate unit-tested parser
Member MagAOX::app::pi335Ctrl::home_1 ()
remmove m_homingStart once ATZ? works.
Member MagAOX::app::pi335Ctrl::homeState (int axis)
this should be a separate unit-tested parser
Member MagAOX::app::pi335Ctrl::testConnection ()
this needs to only happen once, and then never again
Class MagAOX::app::picamCtrl

Config item for ImageStreamIO name filename

implement ImageStreamIO circular buffer, with config setting

Member MagAOX::app::picamCtrl::appShutdown ()
error check these base class fxns.
Member MagAOX::app::picamCtrl::reconfig ()
clean this up. Just need to wait on acquisition update the first time probably.
Member MagAOX::app::picamCtrl::setTempSetPt ()
bounds check here.
Class MagAOX::app::picoMotorCtrl

need to recognize signals in tty polls and not return errors, etc.

need to implement an onDisconnect() to update values to unknown indicators.

need a frequency-dependent max amp facility.

convert to ioDevice

need telnet device, with optional username/password.

Member MagAOX::app::picoMotorCtrl::appStartup ()
read state from disk to get current counts.
Member MagAOX::app::propType ()
move propType to an INDI utils file, and document.
Member MagAOX::app::psfFit::fps ()
this needs to infer the stream fps and return it
Member MagAOX::app::pupilAlign::processImage (void *curr_src, const dev::shmimT &)
need a more robust corner averaging system here.
Member MagAOX::app::pupilFit::fps ()
this needs to infer the stream fps and return it
Member MagAOX::app::pvcamCtrl::appLogic ()
why do we run dev appLogics first?
Member MagAOX::app::pvcamCtrl::appShutdown ()

this error code is manually defined

error check these base class fxns.

Member MagAOX::app::pvcamCtrl::connect ()
this error code is manually defined
Member MagAOX::app::pvcamCtrl::fillSpeedTable ()
log this properly
Member MagAOX::app::pvcamCtrl::m_tempTol
implement config-ing of this
Member MagAOX::app::qhyCtrl::appLogic ()
Fall through check?
Class MagAOX::app::rhusbMon
need a test mode (compile-time) which adds a way (INDI?) to initiate testing of parameter limits.
Member MagAOX::app::rhusbMon::appLogic ()
updateIfChanged should have a force flag
Member MagAOX::app::shmimIntegrator::configureAcquisition ()
potential but verrrrry unlikely bug: shmimMonitorT could change these before allocate sets the lock above. Should use a local set of w/h instead.
Member MagAOX::app::shmimIntegrator::fps ()
this needs to infer the stream fps and return it
Member MagAOX::app::shmimIntegrator::processImage (void *curr_src, const dev::shmimT &dummy)

this should happen in a different less-real-time thread.

should this be /= m_sinceUpdate?

Class MagAOX::app::siglentSDG

need to recognize signals in tty polls and not return errors, etc.

need to implement an onDisconnect() to update values to unknown indicators.

need a frequency-dependent max amp facility.

convert to ioDevice

need telnet device, with optional username/password.

Member MagAOX::app::siglentSDG::appLogic ()
the connection process in siglentSDG is a total hack. Figure out why this is needed to clear the channel, especially on a post-poweroff/on reconnect.
Class MagAOX::app::sshDigger

add options for verboseness of ssh and autossh (loglevel)

add options for ssh and autossh log thread priorities

Member MagAOX::app::sshDigger::processAutoSSHLog (const std::string &logs)
interpret logs, giving errors vs info vs debug, strip timestamps, etc.
Member MagAOX::app::stateRuleEngine::appLogic ()
how to handle startup vs misconfiguration
Member MagAOX::app::streamCircBuff::configureAcquisition ()
potential but verrrrry unlikely bug: shmimMonitorT could change these before allocate sets the lock above. Should use a local set of w/h instead.
Member MagAOX::app::streamCircBuff::fps ()
this needs to infer the stream fps and return it
Member MagAOX::app::streamWriter::fgThreadExec ()

might still be writing here, so must check

this isn't right--> isn't there a define in cacao to use?

change to naxis?

might still be writing here, so must check

Member MagAOX::app::sysMonitor::setlatThreadExec ()

this needs error checks

this needs error checks

Member MagAOX::app::t2wOffloader::allocate (const dev::shmimT &dummy)
size checks here.
Member MagAOX::app::tcsInterface::acquireFromGuider ()
need logtypes for nudges and offloads
Member MagAOX::app::tcsInterface::offloadThreadExec ()
offloading: These sections ought to be separate functions for clarity
Member MagAOX::app::tcsInterface::sendPyrNudge (float x, float y, float z)
need logtypes for nudges and offloads
Class MagAOX::app::trippLitePDU

need username and secure password handling

need to recognize signals in tty polls and not return errors, etc.

begin logging freq/volt/amps telemetry

research load warnings

tests for parser

test for load warnings

load warnings/crit values can be logged on parse errors – make this an issue

segfaults if device can not be reached on network – make this an issue

Class MagAOX::app::ttmModulator
need tests fo ttmModulator
Member MagAOX::app::ttmModulator::modTTM (double newRad, double newFreq)

make sleep-time configurable

make frequency tolerance a configurable

should we set the offset here just to be sure?

here maximum radius should be frequency dependent.

Implement changing modulation without setting first.

logging in these steps

log this

make voltage tolerance a configurable.

Member MagAOX::app::xt1121Ctrl::getState ()
this hangs if power goes off during call
Member MagAOX::app::xt1121Ctrl::loadConfig ()
mxlib loadConfig needs to return int to propagate errors!
Member MagAOX::app::zaberCtrl::moveTo (const double &pos)
this actually should move to a preset position by nearest integet.. A moveToMM should be used for the mm command.
Member MagAOX::logger::flatbuffer_log::format (void *msgBuffer, const fbMessage &msg)
this is an unneccesary memcpy from the FlatBufferBuilder, we need to figure out how to not do this.
Member MagAOX::logger::logFileRaw::createFile (flatlogs::timespecX &ts)
handle case where file exists (only if another instance tries at same ns – pathological)
Member MagAOX::logger::logFileRaw::flush ()
this probably should be fsync, with appropriate error handling (see fsyncgate)
Class MagAOX::logger::logManager< _parentT, _logFileT >
document all the requirements of logFileT
Member MagAOX::logger::logManager< _parentT, _logFileT >::logThreadExec ()
must check this for errors, and investigate how fsyncgate impacts us
Member MagAOX::logger::logManager< _parentT, _logFileT >::m_configSection
Make these protected members, with appropriate access methods
Class MagAOX::tty::netSerial

document this, including methods

add errors to ttyErrors

Member microsleep (unsigned usec)
add timeutils to libMagAOX
Member ULONGLONG_IMG
document this file
Class xrif2shmim
finish md doc for xrif2shmim