API
cameraSim.hpp
Go to the documentation of this file.
1 /** \file cameraSim.hpp
2  * \brief The MagAO-X camera simulator.
3  *
4  * \author Jared R. Males (jaredmales@gmail.com)
5  *
6  * \ingroup cameraSim_files
7  */
8 
9 #ifndef cameraSim_hpp
10 #define cameraSim_hpp
11 
12 
13 
14 
15 //#include <ImageStruct.h>
16 #include <ImageStreamIO/ImageStreamIO.h>
17 
18 #include "../../libMagAOX/libMagAOX.hpp" //Note this is included on command line to trigger pch
19 #include "../../magaox_git_version.h"
20 
21 namespace MagAOX
22 {
23 namespace app
24 {
25 
26 /** \defgroup cameraSim Camera Simulator
27  * \brief A camera simulator
28  *
29  * <a href="../handbook/operating/software/apps/cameraSim.html">Application Documentation</a>
30  *
31  * \ingroup apps
32  *
33  */
34 
35 /** \defgroup cameraSim_files Camera Simulator Files
36  * \ingroup cameraSim
37  */
38 
39 /** MagAO-X application to simulate a camera
40  *
41  * \ingroup cameraSim
42  *
43  */
44 class cameraSim : public MagAOXApp<>, public dev::stdCamera<cameraSim>, public dev::frameGrabber<cameraSim>, public dev::telemeter<cameraSim>
45 {
46 
47  friend class dev::stdCamera<cameraSim>;
48  friend class dev::frameGrabber<cameraSim>;
49  friend class dev::telemeter<cameraSim>;
50 
51 public:
52  /** \name app::dev Configurations
53  *@{
54  */
55  static constexpr bool c_stdCamera_tempControl = true; ///< app::dev config to tell stdCamera to not expose temperature controls
56 
57  static constexpr bool c_stdCamera_temp = true; ///< app::dev config to tell stdCamera to expose temperature
58 
59  static constexpr bool c_stdCamera_readoutSpeed = true; ///< app::dev config to tell stdCamera not to expose readout speed controls
60 
61  static constexpr bool c_stdCamera_vShiftSpeed = true; ///< app:dev config to tell stdCamera not to expose vertical shift speed control
62 
63  static constexpr bool c_stdCamera_emGain = true; ///< app::dev config to tell stdCamera to not expose EM gain controls
64 
65  static constexpr bool c_stdCamera_exptimeCtrl = true; ///< app::dev config to tell stdCamera to expose exposure time controls
66 
67  static constexpr bool c_stdCamera_fpsCtrl = true; ///< app::dev config to tell stdCamera to expose FPS controls
68 
69  static constexpr bool c_stdCamera_fps = true; ///< app::dev config to tell stdCamera not to expose FPS status (ignored since fpsCtrl=true)
70 
71  static constexpr bool c_stdCamera_synchro = true; ///< app::dev config to tell stdCamera to not expose synchro mode controls
72 
73  static constexpr bool c_stdCamera_usesModes = false; ///< app:dev config to tell stdCamera not to expose mode controls
74 
75  static constexpr bool c_stdCamera_usesROI = true; ///< app:dev config to tell stdCamera to expose ROI controls
76 
77  static constexpr bool c_stdCamera_cropMode = true; ///< app:dev config to tell stdCamera not to expose Crop Mode controls
78 
79  static constexpr bool c_stdCamera_hasShutter = true; ///< app:dev config to tell stdCamera to expose shutter controls
80 
81  static constexpr bool c_stdCamera_usesStateString = true; ///< app::dev confg to tell stdCamera to expose the state string property
82 
83  static constexpr bool c_frameGrabber_flippable = true; ///< app:dev config to tell framegrabber that this camera can be flipped
84 
85  ///@}
86 
87 protected:
88 
89  mx::improc::eigenImage<int16_t> m_fgimage;
90 
91  double m_lastTime {0};
92  double m_offset = {0};
93 
94 public:
95 
96  ///Default c'tor
97  cameraSim();
98 
99  ///Destructor
100  ~cameraSim() noexcept;
101 
102  /// Setup the configuration system (called by MagAOXApp::setup())
103  virtual void setupConfig();
104 
105  /// load the configuration system results (called by MagAOXApp::setup())
106  virtual void loadConfig();
107 
108  /// Startup functions
109  /** Sets up the INDI vars.
110  *
111  */
112  virtual int appStartup();
113 
114  /// Implementation of the FSM for the Siglent SDG
115  virtual int appLogic();
116 
117  /// Do any needed shutdown tasks. Currently nothing in this app.
118  virtual int appShutdown();
119 
120  int configureAcquisition();
121  int startAcquisition();
122  int acquireAndCheckValid();
123  int loadImageIntoStream(void * dest);
124  int reconfig();
125 
126 protected:
127 
128  float fps();
129 
130  /** \name stdCamera Interface
131  *
132  * @{
133  */
134 
135 
136 
137  /// Set defaults for a power on state.
138  /**
139  * \returns 0 on success
140  * \returns -1 on error
141  */
142  int powerOnDefaults();
143 
144  int setTempControl();
145 
146  int setTempSetPt();
147 
148  int setReadoutSpeed();
149 
150  int setVShiftSpeed();
151 
152  /// Set the Exposure Time. [stdCamera interface]
153  /** Sets the frame rate to m_expTimeSet.
154  *
155  * \returns 0 on success
156  * \returns -1 on error
157  */
158  int setExpTime();
159 
160  /// Set the framerate.
161  /**
162  * \returns 0 always
163  */
164  int setFPS();
165 
166  int setSynchro();
167 
168  int setEMGain();
169 
170  /// Check the next ROI
171  /** Checks if the target values are valid and adjusts them to the closest valid values if needed.
172  *
173  * \returns 0 always
174  */
175  int checkNextROI();
176 
177  int setCropMode();
178 
179  /// Set the next ROI
180  /**
181  * \returns 0 always
182  */
183  int setNextROI();
184 
185  int setShutter(int ss);
186 
187  std::string stateString();
188 
189  bool stateStringValid();
190 
191  ///@}
192 
193  /** \name Telemeter Interface
194  *
195  * @{
196  */
197 
198  int checkRecordTimes();
199 
200  int recordTelem( const telem_stdcam * );
201 
202  ///@}
203 
204 };
205 
206 inline
207 cameraSim::cameraSim() : MagAOXApp(MAGAOX_CURRENT_SHA1, MAGAOX_REPO_MODIFIED)
208 {
209  m_powerMgtEnabled = false;
210 
211  m_defaultReadoutSpeed = "1";
212  m_defaultVShiftSpeed = "1";
213 
214 
215  m_default_x = 511.5;
216  m_default_y = 511.5;
217  m_default_w = 1024;
218  m_default_h = 1024;
219 
224  m_nextROI.bin_x = 1;
225  m_nextROI.bin_y = 1;
226 
227  m_full_x = 511.5;
228  m_full_y = 511.5;
229  m_full_w = 1024;
230  m_full_h = 1024;
231 
232  return;
233 }
234 
235 inline
237 {
238  return;
239 }
240 
241 inline
243 {
245 
247 
249 
250 }
251 
252 inline
254 {
256 
258 
260 }
261 
262 
263 inline
265 {
266 
267  //=================================
268  // Do camera configuration here
269 
270  m_ccdTemp = -40;
271  m_ccdTempSetpt = -40;
272 
273  m_readoutSpeedNames = {"one", "two", "three"};
274  m_readoutSpeedNameLabels = {"One", "Two", "Three"};
276 
277  m_vShiftSpeedNames = {"0.1", "0.2", "0.3"};
278  m_vShiftSpeedNameLabels = {"0.1 Hz", "0.2 kHz", "0.4 MhZ"};
280 
281 
282  m_shutterStatus = "READY";
283  m_shutterState = 0;
284 
285 
287  {
288  return log<software_critical,-1>({__FILE__,__LINE__});
289  }
290 
292  {
293  return log<software_critical,-1>({__FILE__,__LINE__});
294  }
295 
296 
298  {
299  return log<software_error,-1>({__FILE__,__LINE__});
300  }
301 
302  m_currentROI.x = 511.5;
303  m_currentROI.y = 511.5;
304  m_currentROI.w = 1024;
305  m_currentROI.h = 1024;
306  m_currentROI.bin_x = 1;
307  m_currentROI.bin_y = 1;
309 
310 
311  m_fpsSet = 100;
312  m_fps = 100;
313 
314  m_expTime = 1.0/m_fps;
316 
317  m_lastTime = mx::sys::get_curr_time();
318  m_offset = 0;
319 
321 
322  return 0;
323 
324 }
325 
326 inline
328 {
329  //and run stdCamera's appLogic
331  {
332  return log<software_error, -1>({__FILE__, __LINE__});
333  }
334 
335  //and run frameGrabber's appLogic to see if the f.g. thread has exited.
337  {
338  return log<software_error, -1>({__FILE__, __LINE__});
339  }
340 
341  std::cerr << m_offset << "\n";
342 
344  {
345  //Get a lock if we can
346  std::unique_lock<std::mutex> lock(m_indiMutex, std::try_to_lock);
347 
348  //but don't wait for it, just go back around.
349  if(!lock.owns_lock()) return 0;
350 
352  {
353  log<software_error>({__FILE__, __LINE__});
355  return 0;
356  }
357 
359  {
360  log<software_error>({__FILE__, __LINE__});
362  return 0;
363  }
364 
366  {
367  log<software_error>({__FILE__, __LINE__});
368  return 0;
369  }
370  }
371 
372  ///\todo Fall through check?
373 
374  return 0;
375 
376 }
377 
378 
379 inline
381 {
383 
385 
387 
388  return 0;
389 }
390 
392 {
393  try
394  {
395  recordCamera(true);
396 
397  m_currentROI.x = m_nextROI.x;
398  m_currentROI.y = m_nextROI.y;
399  m_currentROI.w = m_nextROI.w;
400  m_currentROI.h = m_nextROI.h;
401  m_currentROI.bin_x = m_nextROI.bin_x;
402  m_currentROI.bin_y = m_nextROI.bin_y;
403 
406  m_xbinning = m_currentROI.bin_x;
407  m_ybinning = m_currentROI.bin_y;
408 
409  m_fgimage.resize(m_width, m_height);
410 
413 
414 
415  recordCamera(true);
416  }
417  catch(...)
418  {
419  log<software_error>({__FILE__, __LINE__, "invalid ROI specifications"});
421  return -1;
422  }
423 
424  return 0;
425 }
426 
428 {
429 
430  m_offset = 0;
431  m_lastTime = mx::sys::get_curr_time();
432 
434 
435  return 0;
436 }
437 
438 
439 
441 {
442  double et = mx::sys::get_curr_time() - m_lastTime;
443  while(et <= m_expTime - m_offset)
444  {
445  mx::sys::nanoSleep(et*1e6);
446  et = mx::sys::get_curr_time() - m_lastTime;
447  }
448 
449  double dt = mx::sys::get_curr_time(m_currImageTimestamp);
450 
451  m_offset += 0.1*((dt - m_lastTime) - m_expTime);
452 
453  m_lastTime = dt;
454 
455  m_fgimage.setRandom();
456 
457  return 0;
458 }
459 
460 
462 {
463 
464  if( frameGrabber<cameraSim>::loadImageIntoStreamCopy(dest, m_fgimage.data(), m_width, m_height, sizeof(uint16_t)) == nullptr) return -1;
465  m_imageStream->md->atime = m_imageStream->md->writetime;
466  return 0;
467 }
468 
470 {
471 
472 
473  return 0;
474 }
475 
476 inline
478 {
479  return m_fps;
480 
481 }
482 
483 inline
485 {
490  m_nextROI.bin_x = m_default_bin_x;
491  m_nextROI.bin_y = m_default_bin_y;
492 
493  return 0;
494 }
495 
496 inline
498 {
500  return 0;
501 }
502 
503 inline
505 {
507  return 0;
508 }
509 
510 inline
512 {
514  return 0;
515 }
516 
517 inline
519 {
521  return 0;
522 }
523 
524 inline
526 {
527 
529  m_fps = 1./m_fps;
530  m_fpsSet = m_fps;
531 
532 
533  log<text_log>( "Set exposure time: " + std::to_string(m_expTimeSet) + " sec");
534 
535  m_reconfig = true;
536 
537  return 0;
538 }
539 
540 inline
542 {
543  recordCamera(true);
544 
545  m_fps = m_fpsSet;
546  m_expTime = 1.0/m_fps;
548 
549 
550  log<text_log>( "Set frame rate: " + std::to_string(m_fps) + " fps");
551 
552  m_reconfig = true;
553 
554  return 0;
555 }
556 
557 inline
559 {
561  return 0;
562 }
563 
564 inline
566 {
568  return 0;
569 }
570 
571 inline
573 {
574 
581 
582  return 0;
583 }
584 
585 inline
587 {
588  m_reconfig = true;
589 
590  updateSwitchIfChanged(m_indiP_roi_set, "request", pcf::IndiElement::Off, INDI_IDLE);
591  updateSwitchIfChanged(m_indiP_roi_full, "request", pcf::IndiElement::Off, INDI_IDLE);
592  updateSwitchIfChanged(m_indiP_roi_last, "request", pcf::IndiElement::Off, INDI_IDLE);
593  updateSwitchIfChanged(m_indiP_roi_default, "request", pcf::IndiElement::Off, INDI_IDLE);
594  return 0;
595 }
596 
597 inline
599 {
601  return 0;
602 }
603 
604 inline
606 {
607  m_shutterState=ss;
608 
609  return 0;
610 }
611 
612 inline
614 {
615  return "stateString";
616 }
617 
618 inline
620 {
621  return true;
622 }
623 
624 inline
626 {
628 }
629 
630 inline
632 {
633  return recordCamera(true);
634 }
635 
636 
637 }//namespace app
638 } //namespace MagAOX
639 #endif
#define IMAGESTRUCT_UINT16
Definition: ImageStruct.hpp:16
The base-class for MagAO-X applications.
Definition: MagAOXApp.hpp:75
void updateIfChanged(pcf::IndiProperty &p, const std::string &el, const T &newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
Update an INDI property element value if it has changed.
Definition: MagAOXApp.hpp:2877
stateCodes::stateCodeT state()
Get the current state code.
Definition: MagAOXApp.hpp:2082
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.
Definition: MagAOXApp.hpp:2901
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
Definition: MagAOXApp.hpp:1590
std::mutex m_indiMutex
Mutex for locking INDI communications.
Definition: MagAOXApp.hpp:540
bool m_powerMgtEnabled
Flag controls whether power mgt is used. Set this in the constructor of a derived app....
Definition: MagAOXApp.hpp:981
static constexpr bool c_stdCamera_usesStateString
app::dev confg to tell stdCamera to expose the state string property
Definition: cameraSim.hpp:81
int setFPS()
Set the framerate.
Definition: cameraSim.hpp:541
static constexpr bool c_stdCamera_fps
app::dev config to tell stdCamera not to expose FPS status (ignored since fpsCtrl=true)
Definition: cameraSim.hpp:69
int setShutter(int ss)
Definition: cameraSim.hpp:605
static constexpr bool c_stdCamera_usesROI
app:dev config to tell stdCamera to expose ROI controls
Definition: cameraSim.hpp:75
std::string stateString()
Definition: cameraSim.hpp:613
static constexpr bool c_stdCamera_fpsCtrl
app::dev config to tell stdCamera to expose FPS controls
Definition: cameraSim.hpp:67
int powerOnDefaults()
Set defaults for a power on state.
Definition: cameraSim.hpp:484
virtual void loadConfig()
load the configuration system results (called by MagAOXApp::setup())
Definition: cameraSim.hpp:253
static constexpr bool c_stdCamera_exptimeCtrl
app::dev config to tell stdCamera to expose exposure time controls
Definition: cameraSim.hpp:65
static constexpr bool c_stdCamera_hasShutter
app:dev config to tell stdCamera to expose shutter controls
Definition: cameraSim.hpp:79
mx::improc::eigenImage< int16_t > m_fgimage
Definition: cameraSim.hpp:89
int recordTelem(const telem_stdcam *)
Definition: cameraSim.hpp:631
static constexpr bool c_stdCamera_readoutSpeed
app::dev config to tell stdCamera not to expose readout speed controls
Definition: cameraSim.hpp:59
int setNextROI()
Set the next ROI.
Definition: cameraSim.hpp:586
static constexpr bool c_stdCamera_synchro
app::dev config to tell stdCamera to not expose synchro mode controls
Definition: cameraSim.hpp:71
~cameraSim() noexcept
Destructor.
Definition: cameraSim.hpp:236
virtual int appShutdown()
Do any needed shutdown tasks. Currently nothing in this app.
Definition: cameraSim.hpp:380
static constexpr bool c_stdCamera_vShiftSpeed
app:dev config to tell stdCamera not to expose vertical shift speed control
Definition: cameraSim.hpp:61
cameraSim()
Default c'tor.
Definition: cameraSim.hpp:207
static constexpr bool c_stdCamera_cropMode
app:dev config to tell stdCamera not to expose Crop Mode controls
Definition: cameraSim.hpp:77
static constexpr bool c_stdCamera_tempControl
app::dev config to tell stdCamera to not expose temperature controls
Definition: cameraSim.hpp:55
static constexpr bool c_stdCamera_temp
app::dev config to tell stdCamera to expose temperature
Definition: cameraSim.hpp:57
static constexpr bool c_frameGrabber_flippable
app:dev config to tell framegrabber that this camera can be flipped
Definition: cameraSim.hpp:83
int setExpTime()
Set the Exposure Time. [stdCamera interface].
Definition: cameraSim.hpp:525
int loadImageIntoStream(void *dest)
Definition: cameraSim.hpp:461
static constexpr bool c_stdCamera_emGain
app::dev config to tell stdCamera to not expose EM gain controls
Definition: cameraSim.hpp:63
virtual int appLogic()
Implementation of the FSM for the Siglent SDG.
Definition: cameraSim.hpp:327
int checkNextROI()
Check the next ROI.
Definition: cameraSim.hpp:572
virtual void setupConfig()
Setup the configuration system (called by MagAOXApp::setup())
Definition: cameraSim.hpp:242
static constexpr bool c_stdCamera_usesModes
app:dev config to tell stdCamera not to expose mode controls
Definition: cameraSim.hpp:73
virtual int appStartup()
Startup functions.
Definition: cameraSim.hpp:264
int m_xbinning
The x-binning according to the framegrabber.
timespec m_currImageTimestamp
The timestamp of the current image.
uint32_t m_width
The width of the image, once deinterlaced etc.
int appShutdown()
Shuts down the framegrabber thread.
void * loadImageIntoStreamCopy(void *dest, void *src, size_t width, size_t height, size_t szof)
int m_ybinning
The y-binning according to the framegrabber.
void loadConfig(mx::app::appConfigurator &config)
load the configuration system results
void setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
size_t m_typeSize
The size of the type, in bytes. Result of sizeof.
int updateINDI()
Update the INDI properties for this device controller.
uint8_t m_dataType
The ImageStreamIO type code.
bool m_reconfig
Flag to set if a camera reconfiguration requires a framegrabber reset.
IMAGE * m_imageStream
The ImageStreamIO shared memory buffer.
uint32_t m_height
The height of the image, once deinterlaced etc.
MagAO-X standard camera interface.
Definition: stdCamera.hpp:232
std::vector< std::string > m_readoutSpeedNames
Definition: stdCamera.hpp:279
float m_fpsSet
The commanded fps, as set by user.
Definition: stdCamera.hpp:320
bool m_synchroSet
Target status of m_synchro.
Definition: stdCamera.hpp:331
pcf::IndiProperty m_indiP_roi_y
Property used to set the ROI x center coordinate.
Definition: stdCamera.hpp:415
float m_default_x
Power-on ROI center x coordinate.
Definition: stdCamera.hpp:395
float m_emGain
The camera's current EM gain (if available).
Definition: stdCamera.hpp:294
std::vector< std::string > m_readoutSpeedNameLabels
Definition: stdCamera.hpp:280
float m_emGainSet
The camera's EM gain, as set by the user.
Definition: stdCamera.hpp:295
std::string m_vShiftSpeedNameSet
The user requested vshift speed name, to be set by derived()
Definition: stdCamera.hpp:289
bool m_cropModeSet
Desired status of crop mode ROIs, if enabled for this camera.
Definition: stdCamera.hpp:440
std::string m_defaultReadoutSpeed
The default readout speed of the camera.
Definition: stdCamera.hpp:245
float m_expTime
The current exposure time, in seconds.
Definition: stdCamera.hpp:312
int m_default_bin_x
Power-on ROI x binning.
Definition: stdCamera.hpp:399
bool m_cropMode
Status of crop mode ROIs, if enabled for this camera.
Definition: stdCamera.hpp:439
int m_default_h
Power-on ROI height.
Definition: stdCamera.hpp:398
pcf::IndiProperty m_indiP_roi_last
Property used to trigger setting the last ROI.
Definition: stdCamera.hpp:430
float m_expTimeSet
The exposure time, in seconds, as set by user.
Definition: stdCamera.hpp:313
pcf::IndiProperty m_indiP_roi_h
Property used to set the ROI height.
Definition: stdCamera.hpp:417
void setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
Definition: stdCamera.hpp:980
float m_full_y
The full ROI center y coordinate.
Definition: stdCamera.hpp:403
std::string m_readoutSpeedName
The current readout speed name.
Definition: stdCamera.hpp:282
float m_ccdTempSetpt
The desired temperature, in C.
Definition: stdCamera.hpp:260
bool m_tempControlStatus
Whether or not temperature control is active.
Definition: stdCamera.hpp:262
pcf::IndiProperty m_indiP_roi_w
Property used to set the ROI width.
Definition: stdCamera.hpp:416
pcf::IndiProperty m_indiP_roi_default
Property used to trigger setting the default and startup ROI.
Definition: stdCamera.hpp:431
pcf::IndiProperty m_indiP_roi_bin_x
Property used to set the ROI x binning.
Definition: stdCamera.hpp:418
float m_full_x
The full ROI center x coordinate.
Definition: stdCamera.hpp:402
bool m_synchro
Status of synchronization, true is on, false is off.
Definition: stdCamera.hpp:333
std::string m_vShiftSpeedName
The current vshift speed name.
Definition: stdCamera.hpp:288
float m_ccdTemp
The current temperature, in C.
Definition: stdCamera.hpp:258
int updateINDI()
Update the INDI properties for this device controller.
Definition: stdCamera.hpp:2739
std::vector< std::string > m_vShiftSpeedNames
Definition: stdCamera.hpp:285
std::string m_defaultVShiftSpeed
The default readout speed of the camera.
Definition: stdCamera.hpp:246
void loadConfig(mx::app::appConfigurator &config)
load the configuration system results
Definition: stdCamera.hpp:1019
std::vector< std::string > m_vShiftSpeedNameLabels
Definition: stdCamera.hpp:286
pcf::IndiProperty m_indiP_roi_full
Property used to trigger setting the full ROI.
Definition: stdCamera.hpp:427
pcf::IndiProperty m_indiP_roi_set
Property used to trigger setting the ROI.
Definition: stdCamera.hpp:425
int appShutdown()
Application shutdown.
Definition: stdCamera.hpp:1687
float m_default_y
Power-on ROI center y coordinate.
Definition: stdCamera.hpp:396
pcf::IndiProperty m_indiP_roi_bin_y
Property used to set the ROI y binning.
Definition: stdCamera.hpp:419
pcf::IndiProperty m_indiP_roi_x
Property used to set the ROI x center coordinate.
Definition: stdCamera.hpp:414
int m_default_bin_y
Power-on ROI y binning.
Definition: stdCamera.hpp:400
bool m_tempControlStatusSet
Desired state of temperature control.
Definition: stdCamera.hpp:263
std::string m_readoutSpeedNameSet
The user requested readout speed name, to be set by derived()
Definition: stdCamera.hpp:283
@ OPERATING
The device is operating, other than homing.
Definition: stateCodes.hpp:50
@ ERROR
The application has encountered an error, from which it is recovering (with or without intervention)
Definition: stateCodes.hpp:38
@ READY
The device is ready for operation, but is not operating.
Definition: stateCodes.hpp:51
@ NOTCONNECTED
The application is not connected to the device or service.
Definition: stateCodes.hpp:44
#define INDI_IDLE
Definition: indiUtils.hpp:28
#define INDI_OK
Definition: indiUtils.hpp:29
std::ostream & cerr()
void nanoSleep(unsigned long nsec)
Definition: dm.hpp:24
A device which saves telemetry.
Definition: telemeter.hpp:52
int appShutdown()
Perform telemeter application shutdown.
Definition: telemeter.hpp:259
int loadConfig(appConfigurator &config)
Load the device section from an application configurator.
Definition: telemeter.hpp:208
int appLogic()
Perform telemeter application logic.
Definition: telemeter.hpp:253
int setupConfig(appConfigurator &config)
Setup an application configurator for the device section.
Definition: telemeter.hpp:195
int checkRecordTimes(const telT &tel, telTs... tels)
Check the time of the last record for each telemetry type and make an entry if needed.
Definition: telemeter.hpp:266
Software CRITICAL log entry.
Software ERR log entry.
Log entry recording stdcam stage specific status.