7#ifndef modalGainOpt_hpp
8#define modalGainOpt_hpp
10#include <mx/mxException.hpp>
11#include <mx/ao/analysis/clGainOpt.hpp>
12#include <mx/ao/analysis/clAOLinearPredictor.hpp>
14#include "../../libMagAOX/libMagAOX.hpp"
15#include "../../magaox_git_version.h"
69 return "gainFactShmim";
82 return "multFactShmim";
91struct pcGainFactShmimT
95 return "pcGainFactShmim";
104struct pcMultFactShmimT
108 return "pcMultFactShmim";
121 return "numpccoeffShmim";
134 return "acoeffShmim";
147 return "bcoeffShmim";
160 return "gainCalShmim";
173 return "gainCalFactShmim";
178 return "gainCalFact";
212 return "wfsavgShmim";
225 return "wfsmaskShmim";
293 typedef std::chrono::time_point<std::chrono::steady_clock>
timePointT;
338 std::vector<mx::AO::analysis::clGainOpt<float>>
m_goptSI;
339 std::vector<mx::AO::analysis::clGainOpt<float>>
m_goptLP;
340 std::vector<mx::AO::analysis::clAOLinearPredictor<float>>
m_linPred;
736 config.add(
"loop.number",
744 "The number of the loop. Used to set shmim names, as in aolN_mgainfact." );
746 config.add(
"loop.name",
754 "The name of the loop control INDI device name." );
756 config.add(
"loop.psdDev",
764 "The INDI device name of the PSD calculator. Defaults to aolN_modevalPSDs where N is loop.number." );
766 config.add(
"loop.autoUpdate",
774 "Flag controlling whether the gains are auto updated. Also settable via INDI." );
776 config.add(
"loop.gainGain",
784 "The gain to use for closed-loop gain updates. Default is 0.1" );
1151 mx::improc::eigenImage<uint32_t>
Npc(
m_nModes, 2 );
1161 std::cerr <<
"created numppccoeff shmim\n";
1172 std::cerr <<
"created acoeff shmim\n";
1183 std::cerr <<
"created bcoeff shmim\n";
1194 std::cerr <<
"created pcGainFact shmim\n";
1205 std::cerr <<
"created pcMultFact shmim\n";
1213 static_cast<void>(
dummy );
1511 static_cast<void>(
dummy );
1529 if( !
lock.owns_lock() )
1554 static_cast<void>(
dummy );
1561 static_cast<void>(
dummy );
1570 float *
f =
static_cast<float *
>(
curr_src );
1581 for(
size_t n = 0;
n <
sz; ++
n )
1600 for(
size_t n = 0;
n <
sz; ++
n )
1612 std::cerr <<
"got freq: " <<
sz <<
'\n';
1613 std::cerr <<
" fps: " <<
m_fps <<
'\n';
1621 static_cast<void>(
dummy );
1633 static_cast<void>(
dummy );
1651 float *
g =
static_cast<float *
>(
curr_src );
1693 std::cerr <<
"got gains: " <<
m_gainFacts.size() <<
"\n";
1703 static_cast<void>(
dummy );
1715 static_cast<void>(
dummy );
1733 float *
m =
static_cast<float *
>(
curr_src );
1762 std::cerr <<
"got mcs: " <<
m_multFacts.size() <<
" " << w <<
"\n";
1771 static_cast<void>(
dummy );
1783 static_cast<void>(
dummy );
1801 float *
g =
static_cast<float *
>(
curr_src );
1842 std::cerr <<
"got pc gains: " <<
m_pcGainFacts.size() <<
"\n";
1852 static_cast<void>(
dummy );
1864 static_cast<void>(
dummy );
1882 float *
m =
static_cast<float *
>(
curr_src );
1912 std::cerr <<
"got mcs: " <<
m_multFacts.size() <<
"\n";
1920 static_cast<void>(
dummy );
1927 std::cerr <<
"numpccoeffShmimMonitorT::allocate\n";
1933 static_cast<void>(
dummy );
2002 std::cerr <<
"got num pc coeffs: " <<
m_Na.size() <<
"\n";
2010 static_cast<void>(
dummy );
2017 static_cast<void>(
dummy );
2035 m_as.resize( w - 1, h );
2085 std::cerr <<
"got a coeffs: " << w <<
' ' << h <<
' ' <<
m_NaCurrent.size() <<
"\n";
2093 static_cast<void>(
dummy );
2100 static_cast<void>(
dummy );
2119 m_bs.resize( w - 1, h );
2168 std::cerr <<
"got b coeffs: " << w <<
' ' << h <<
' ' <<
m_NbCurrent.size() <<
"\n";
2178 static_cast<void>(
dummy );
2185 static_cast<void>(
dummy );
2209 float *
g =
static_cast<float *
>(
curr_src );
2232 std::cerr <<
"got gainCals: " <<
m_gainCals.size() <<
"\n";
2241 static_cast<void>(
dummy );
2248 static_cast<void>(
dummy );
2271 float *
g =
static_cast<float *
>(
curr_src );
2294 std::cerr <<
"got gainCalsFacts: " <<
m_gainCalFacts.size() <<
"\n";
2303 static_cast<void>(
dummy );
2310 static_cast<void>(
dummy );
2333 float *
t =
static_cast<float *
>(
curr_src );
2357 std::cerr <<
"got taus: " <<
m_taus.size() <<
"\n";
2365 static_cast<void>(
dummy );
2372 static_cast<void>(
dummy );
2395 mx::improc::eigenMap<float>
np(
static_cast<float *
>(
curr_src ), 3, h );
2428 static_cast<void>(
dummy );
2436 static_cast<void>(
dummy );
2438 m_wfsavg = mx::improc::eigenMap<float>(
2453 static_cast<void>(
dummy );
2461 static_cast<void>(
dummy );
2463 m_wfsmask = mx::improc::eigenMap<float>(
2478 static std::vector<bool>
logged( 50,
false );
2750 std::cerr <<
"check sizes failed\n";
2763 std::cerr <<
"updating gopt structures\n";
2788 for(
size_t m = 0;
m <
ta.size(); ++
m )
2795 for(
size_t m = 0;
m <
tb.size(); ++
m )
2820 std::cerr <<
"done.\n";
2836#pragma omp parallel for num_threads( 15 )
2895 std::vector<float>
npsd(
f1 -
f0 );
2896 for(
size_t f =
f0;
f <
f1; ++
f )
2909 std::nth_element(
npsd.begin(),
nth,
npsd.end() );
2933 for(
size_t f = 1;
f < 0.05 *
m_freq.size(); ++
f )
2949 if(
noff > 0.5 * ( 0.05 *
m_freq.size() - 1 ) &&
n > 1 )
2962 #pragma omp critical
3011 for(
size_t f = 2;
f <
smw.size(); ++
f )
3013 smw[
f] = 2 +
static_cast<float>(
f ) / 10;
3017 mx::math::vectorSmoothMean(
smol,
l10,
smw );
3041 #pragma omp critical
3059 #pragma omp critical
3171 #pragma omp critical
3190 #pragma omp critical
3220 #pragma omp critical
3257 std::cerr <<
"Optimization took " <<
dt.count() <<
" seconds\n";
3449 m_olPSDs[0].size() *
sizeof(
float ) );
3454 m_nPSDs[0].size() *
sizeof(
float ) );
3499 if(
ipRecv.find(
"toggle" ) )
3501 if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::On )
3507 m_autoUpdate =
true;
3515 m_autoUpdate =
false;
3526 if(
ipRecv.find(
"request" ) )
3528 if(
ipRecv[
"request"].getSwitchState() == pcf::IndiElement::On )
3530 m_updateOnce =
true;
3534 m_updateOnce =
false;
3545 if(
ipRecv.find(
"request" ) )
3547 if(
ipRecv[
"request"].getSwitchState() == pcf::IndiElement::On )
3565 if( indiTargetUpdate( m_indiP_opticalGain, target,
ipRecv,
true ) < 0 )
3567 log<software_error>( { __FILE__, __LINE__ } );
3571 m_opticalGain = target;
3580 if(
ipRecv.find(
"toggle"))
3582 if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::Off)
3584 m_opticalGainUpdate =
false;
3588 m_opticalGainUpdate =
true;
3590 if(m_opticalGainSource > 0 && m_opticalGainSource < 1)
3592 m_opticalGain = m_opticalGainSource;
3604 if(
ipRecv.find( m_opticalGainElement ) )
3606 float opticalg =
ipRecv[m_opticalGainElement].get<
float>();
3608 opticalg = (floor(opticalg * 100 + 0.5))/100.;
3610 if(opticalg > 0 && opticalg < 1)
3612 m_opticalGainSource = opticalg;
3615 if(m_opticalGainUpdate)
3617 m_opticalGain = m_opticalGainSource;
3628 if( indiTargetUpdate( m_indiP_gainGain, target,
ipRecv,
true ) < 0 )
3630 log<software_error>( { __FILE__, __LINE__ } );
3634 m_gainGain = target;
3643 if(
ipRecv.find(
"current" ) )
3645 float emg =
ipRecv[
"current"].get<
float>();
3650 std::cerr <<
"Got EMG: " << m_emg <<
'\n';
3660 if(
ipRecv.find(
"current" ) )
3662 float psdTime =
ipRecv[
"current"].get<
float>();
3664 if( psdTime != m_psdTime )
3667 std::lock_guard<std::mutex>
lock( m_goptMutex );
3670 m_psdTime = psdTime;
3675 std::cerr <<
"Got psdTime: " << m_psdTime <<
'\n';
3685 if(
ipRecv.find(
"current" ) )
3687 float psdAvgTime =
ipRecv[
"current"].get<
float>();
3689 if( psdAvgTime != m_psdAvgTime )
3692 std::lock_guard<std::mutex>
lock( m_goptMutex );
3695 m_psdAvgTime = psdAvgTime;
3700 std::cerr <<
"Got psdAvgTime: " << m_psdAvgTime <<
'\n';
3711 if(
ipRecv.find(
"toggle" ) )
3715 if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::On )
3724 if( state != m_loop )
3727 std::lock_guard<std::mutex>
lock( m_goptMutex );
3734 m_autoUpdate =
false;
3740 std::cerr <<
"Got loop: " << m_loop <<
'\n';
3751 if(
ipRecv.find(
"current" ) )
3753 float gain =
ipRecv[
"current"].get<
float>();
3755 if( gain != m_gain && !m_pcOn )
3758 std::lock_guard<std::mutex>
lock( m_goptMutex );
3770 std::cerr <<
"Got gain: " << m_gain <<
'\n';
3785 if(
ipRecv.find(
"current" ) )
3787 float mc =
ipRecv[
"current"].get<
float>();
3789 if( mc != m_mult && !m_pcOn )
3792 std::lock_guard<std::mutex>
lock( m_goptMutex );
3802 m_goptUpdated =
true;
3804 std::cerr <<
"Got mc: " << m_mult <<
'\n';
3819 if(
ipRecv.find(
"current" ) )
3821 float gain =
ipRecv[
"current"].get<
float>();
3823 if( gain != m_pcGain && m_pcOn )
3826 std::lock_guard<std::mutex>
lock( m_goptMutex );
3838 std::cerr <<
"Got pc gain: " << m_pcGain <<
'\n';
3853 if(
ipRecv.find(
"current" ) )
3855 float mc =
ipRecv[
"current"].get<
float>();
3857 if( mc != m_pcMult && m_pcOn )
3860 std::lock_guard<std::mutex>
lock( m_goptMutex );
3870 m_pcgoptUpdated =
true;
3872 std::cerr <<
"Got pc mc: " << m_pcMult <<
'\n';
3887 if(
ipRecv.find(
"toggle" ) )
3891 if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::On )
3900 if( state != m_pcOn )
3903 std::lock_guard<std::mutex>
lock( m_goptMutex );
3910 std::cerr <<
"Got pcOn: " << std::boolalpha << m_pcOn <<
'\n';
3921 if(
ipRecv.find(
"toggle" ) )
3925 if(
ipRecv[
"toggle"].getSwitchState() == pcf::IndiElement::On )
3934 if( ext != m_extrapOL )
3937 std::lock_guard<std::mutex>
lock( m_goptMutex );
3944 std::cerr <<
"Got extrap: " << m_extrapOL <<
'\n';
#define XWCAPP_THREAD_CHECK(thrdSt, thrdName)
Error handling wrapper for checking on thread status with tryjoin.
#define XWCAPP_THREAD_START(thrdSt, thrdInit, thrdId, thrdProp, thrdPrio, thrdCpuset, thrdName, thrdStart)
Error handling wrapper for the threadStart function of the XWCApp.
#define XWCAPP_THREAD_STOP(thrdSt)
Error handlng wrapper for stopping a thread.
The base-class for XWCTk applications.
stateCodes::stateCodeT state()
Get the current state code.
int m_shutdown
Flag to signal it's time to shutdown. When not 0, the main loop exits.
int shutdown()
Get the value of the shutdown flag.
void updateSwitchIfChanged(pcf::IndiProperty &p, const std::string &el, const pcf::IndiElement::SwitchStateType &newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
Update an INDI switch element value if it has changed.
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
uint32_t m_width
The width of the images in the stream.
uint32_t m_height
The height of the images in the stream.
IMAGE m_imageStream
The ImageStreamIO shared memory buffer.
int create(uint32_t width, uint32_t height, uint32_t depth, uint8_t datatype, void *initData=nullptr)
Create the image.
uint8_t m_dataType
The ImageStreamIO type code.
shmimMonitorState m_smState
The MagAO-X PSD-based gain optimizer.
pcf::IndiProperty m_indiP_emg
std::vector< mx::AO::analysis::clGainOpt< float > > m_goptCurrent
Each mode gets its own gain optimizer.
eigenImage< float > m_wfsavg
pcf::IndiProperty m_indiP_gainGain
std::string m_clXferSIShmimName
bool m_opticalGainUpdate
Flag controlling whether optical gain is automatically updated;.
std::vector< uint32_t > m_NbCurrent
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_updateOnce)
std::string m_clXferCurrentShmimName
dev::shmimMonitor< modalGainOpt, numpccoeffShmimT > numpccoeffShmimMonitorT
mx::improc::eigenImage< float > m_clXferCurrent
~modalGainOpt() noexcept
D'tor, declared and defined for noexcept.
std::vector< float > m_modeVarCL
IMAGE * m_clXferLPStream
The ImageStreamIO shared memory buffer to publish the LP ETF.
dev::shmimMonitor< modalGainOpt, wfsmaskShmimT > wfsmaskShmimMonitorT
std::vector< int > m_regCounter
Counters to track when this mode was last regularized.
std::vector< float > m_gmaxLP
The previously calculated maximum gains for LP.
std::vector< float > m_pcGainFacts
std::vector< mx::AO::analysis::clGainOpt< float > > m_goptLP
std::string m_optGainSIShmimName
std::chrono::time_point< std::chrono::steady_clock > timePointT
dev::shmimMonitor< modalGainOpt, pcGainFactShmimT > pcGainFactShmimMonitorT
pid_t m_goptThreadID
gain optimization thread PID.
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_autoUpdate)
dev::shmimMonitor< modalGainOpt, pcMultFactShmimT > pcMultFactShmimMonitorT
std::vector< float > m_taus
dev::shmimMonitor< modalGainOpt, gainCalShmimT > gainCalShmimMonitorT
float m_psdOverlapFraction
int allocate(const psdShmimT &)
std::vector< int > m_timesOnLP
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_dump)
std::string m_modevarShmimName
std::vector< float > m_freq
pcf::IndiProperty m_indiP_siGain
virtual int appLogic()
Implementation of the FSM for modalGainOpt.
std::vector< float > m_modeVarSI
pcf::IndiProperty m_indiP_autoUpdate
int m_loopNum
The number of the loop. Used to set shmim names, as in aolN_mgainfact.
std::vector< float > m_gainCalFacts
pcf::IndiProperty m_indiP_dump
std::vector< float > m_gainFacts
dev::shmimMonitor< modalGainOpt, bcoeffShmimT > bcoeffShmimMonitorT
int checkSizes()
Check that all sizes and allocations have occurred.
int m_goptThreadPrio
Priority of the gain optimization thread.
pcf::IndiProperty m_indiP_opticalGainUpdate
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_pcOn)
std::vector< float > m_optGainLP
sem_t m_goptSemaphore
Semaphore used to synchronize the psdShmim thread and the gopt thread.
std::string m_maxGainSIShmimName
IMAGE * m_optGainLPStream
The ImageStreamIO shared memory buffer to publish the LP optimal gains.
std::string m_goptThreadCpuset
The cpuset to use for the gain optimization thread.
pcf::IndiProperty m_indiP_loop
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_siGain)
mx::improc::eigenImage< float > m_clPSDs
dev::shmimMonitor< modalGainOpt, wfsavgShmimT > wfsavgShmimMonitorT
std::vector< float > m_gmaxSI
The previously calculated maximum gains for LP.
pcf::IndiProperty m_indiP_siMult
pcf::IndiProperty m_indiP_pcOn
IMAGE * m_olPSDStream
The ImageStreamIO shared memory buffer to publish the open loop PSDs.
std::string m_opticalGainElement
IMAGE * m_clXferSIStream
The ImageStreamIO shared memory buffer to publish the SI ETF.
std::vector< std::vector< float > > m_olPSDs
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_loop)
eigenImage< float > m_wfsmask
std::string m_clXferLPShmimName
pcf::IndiProperty m_indiP_modesOn
std::string m_olPSDShmimName
bool m_goptUpdated
Tracks if a parameter has updated requiring updates to the m_gopt entries.
mx::improc::eigenImage< float > m_clXferLP
dev::shmimMonitor< modalGainOpt, freqShmimT > freqShmimMonitorT
virtual void loadConfig()
std::string m_loopName
The name of the loop control INDI device name.
std::chrono::duration< double > durationT
std::string m_opticalGainDevice
dev::shmimMonitor< modalGainOpt, gainFactShmimT > gainFactShmimMonitorT
IMAGE * m_maxGainLPStream
The ImageStreamIO shared memory buffer to publish the LP max gains.
bool m_updateOnce
Flag to trigger a single update with gain.
pcf::IndiProperty m_indiP_updateOnce
dev::shmimMonitor< modalGainOpt, tauShmimT > tauShmimMonitorT
eigenImage< float > m_noiseParams
std::vector< mx::AO::analysis::clAOLinearPredictor< float > > m_linPred
pcf::IndiProperty m_goptThreadProp
The property to hold the gain optimization thread details.
static void goptThreadStart(modalGainOpt *p)
Gain Optimization thread starter function.
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_psdAvgTime)
bool m_dump
Flag to trigger a single update with no gain.
mx::improc::eigenImage< float > m_clXferSI
std::string m_opticalGainProperty
pcf::IndiProperty m_indiP_psdAvgTime
std::vector< float > m_modeVarLP
IMAGE * m_optGainStream
The ImageStreamIO shared memory buffer to publish the optimal gains.
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_opticalGainSource)
std::vector< float > m_optGainSI
IMAGE * m_optGainSIStream
The ImageStreamIO shared memory buffer to publish the SI optimal gains.
modalGainOpt()
Default c'tor.
IMAGE * m_clXferCurrentStream
The ImageStreamIO shared memory buffer to publish the SI ETF.
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_extrapOL)
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_psdTime)
int loadConfigImpl(mx::app::appConfigurator &_config)
Implementation of loadConfig logic, separated for testing.
std::vector< float > m_gainCals
virtual int appStartup()
Startup function.
std::thread m_goptThread
The gain optimization thread.
void goptThreadExec()
Gain optimization thread function.
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_opticalGain)
pcf::IndiProperty m_indiP_opticalGain
dev::shmimMonitor< modalGainOpt, psdShmimT > psdShmimMonitorT
std::string m_noisePSDShmimName
virtual void setupConfig()
bool m_updating
Flag used to indicate to the goptThread that it should stop calculations ASAP.
virtual int appShutdown()
Shutdown the app.
bool m_goptThreadInit
Initialization flag for the gain optimization thread.
int processImage(void *curr_src, const psdShmimT &)
std::vector< float > m_modeVarOL
std::string m_optGainShmimName
std::vector< float > m_pcMultFacts
std::mutex m_goptMutex
Mutex for synchronizing updates.
dev::shmimMonitor< modalGainOpt, multFactShmimT > multFactShmimMonitorT
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_siMult)
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_emg)
bool m_autoUpdate
Flag controlling whether gains are automatically updated.
dev::shmimMonitor< modalGainOpt, gainCalFactShmimT > gainCalFactShmimMonitorT
std::vector< uint32_t > m_NaCurrent
std::vector< int > m_timesOnSI
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_pcMult)
IMAGE * m_modevarStream
The ImageStreamIO shared memory buffer to publish the LP optimal gains.
std::string m_optGainLPShmimName
int m_extrapOL
Which extrapolation method to use for the OL PSD. 0 is none. The only other option is 1.
std::string m_maxGainLPShmimName
std::vector< float > m_multFacts
dev::shmimMonitor< modalGainOpt, acoeffShmimT > acoeffShmimMonitorT
std::vector< float > m_regScale
The regularization scale factors for each mode.
bool m_pcgoptUpdated
Tracks if a parameter has updated requiring updates to the m_gopt entries.
pcf::IndiProperty m_indiP_opticalGainSource
std::vector< uint32_t > m_Nb
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_opticalGainUpdate)
std::vector< std::vector< float > > m_nPSDs
IMAGE * m_maxGainSIStream
The ImageStreamIO shared memory buffer to publish the SI max gains.
float m_gainGain
The gain to use for closed-loop gain updates. Default is 0.1.
pcf::IndiProperty m_indiP_pcGain
std::vector< mx::AO::analysis::clGainOpt< float > > m_goptSI
dev::shmimMonitor< modalGainOpt, noiseShmimT > noiseShmimMonitorT
float m_opticalGainSource
INDI_SETCALLBACK_DECL(modalGainOpt, m_indiP_pcGain)
INDI_NEWCALLBACK_DECL(modalGainOpt, m_indiP_gainGain)
std::vector< uint32_t > m_Na
pcf::IndiProperty m_indiP_extrapOL
pcf::IndiProperty m_indiP_psdTime
int m_nRegCycles
How often to regularize each mode.
pcf::IndiProperty m_indiP_pcMult
friend class modalGainOpt_test
#define INDI_NEWCALLBACK_DEFN(class, prop)
Define the callback for a new property request.
#define CREATE_REG_INDI_NEW_TOGGLESWITCH(prop, name)
Create and register a NEW INDI property as a standard toggle switch, using the standard callback name...
#define CREATE_REG_INDI_NEW_REQUESTSWITCH(prop, name)
Create and register a NEW INDI property as a standard request switch, using the standard callback nam...
#define CREATE_REG_INDI_NEW_NUMBERF(prop, name, min, max, step, format, label, group)
Create and register a NEW INDI property as a standard number as float, using the standard callback na...
#define INDI_SETCALLBACK_DEFN(class, prop)
Define the callback for a set property request.
#define REG_INDI_SETPROP(prop, devName, propName)
Register a SET INDI property with the class, using the standard callback name.
#define CREATE_REG_INDI_RO_NUMBER(prop, name, label, group)
Create and register a RO INDI property as a number, using the standard callback name.
@ OPERATING
The device is operating, other than homing.
#define INDI_VALIDATE_CALLBACK_PROPS(prop1, prop2)
Standard check for matching INDI properties in a callback.
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.
const pcf::IndiProperty & ipRecv
std::unique_lock< std::mutex > lock(m_indiMutex)
static constexpr logPrioT LOG_NOTICE
A normal but significant condition.
#define XWC_SEM_WAIT_TS_RETVOID(ts, sec, nsec)
Add the wait time to a timespec for a sem_timedwait call, with no value returned on error.
#define SHMIMMONITORT_APP_STARTUP(SHMIMMONITORT)
Call shmimMonitorT::appStartup with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_UPDATE_INDI(SHMIMMONITORT)
Call shmimMonitorT::updateINDI with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_SETUP_CONFIG(SHMIMMONITORT, cfig)
Call shmimMonitorT::setupConfig with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_APP_LOGIC(SHMIMMONITORT)
Call shmimMonitorT::appLogic with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_APP_SHUTDOWN(SHMIMMONITORT)
Call shmimMonitorT::appShutodwn with error checking for a typedef-ed shmimMonitor.
#define SHMIMMONITORT_LOAD_CONFIG(SHMIMMONITORT, cfig)
Call shmimMonitorT::loadConfig with error checking for a typedef-ed shmimMonitor.
static std::string configSection()
static std::string indiPrefix()
static std::string indiPrefix()
static std::string configSection()
static std::string indiPrefix()
static std::string configSection()
static std::string configSection()
static std::string indiPrefix()
static std::string indiPrefix()
static std::string configSection()
static std::string configSection()
static std::string indiPrefix()
static std::string configSection()
static std::string indiPrefix()
static std::string indiPrefix()
static std::string configSection()
static std::string indiPrefix()
static std::string configSection()
static std::string configSection()
static std::string indiPrefix()
static std::string indiPrefix()
static std::string configSection()
static std::string configSection()
static std::string indiPrefix()
static std::string indiPrefix()
static std::string configSection()
static std::string configSection()
static std::string indiPrefix()
static std::string indiPrefix()
static std::string configSection()
Software CRITICAL log entry.