API
 
Loading...
Searching...
No Matches
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// #include <ImageStruct.h>
13#include <ImageStreamIO/ImageStreamIO.h>
14
15#include <mx/math/func/gaussian.hpp>
16#include <mx/math/randomT.hpp>
17
18#include "../../libMagAOX/libMagAOX.hpp" //Note this is included on command line to trigger pch
19#include "../../magaox_git_version.h"
20
21namespace MagAOX
22{
23namespace 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 */
44class cameraSim : public MagAOXApp<>,
45 public dev::stdCamera<cameraSim>,
46 public dev::frameGrabber<cameraSim>,
47 public dev::telemeter<cameraSim>
48{
49
50 friend class dev::stdCamera<cameraSim>;
51 friend class dev::frameGrabber<cameraSim>;
52 friend class dev::telemeter<cameraSim>;
53
54 public:
58
59 /** \name app::dev Configurations
60 *@{
61 */
62 static constexpr bool c_stdCamera_tempControl =
63 true; ///< app::dev config to tell stdCamera to not expose temperature controls
64
65 static constexpr bool c_stdCamera_temp = true; ///< app::dev config to tell stdCamera to expose temperature
66
67 static constexpr bool c_stdCamera_readoutSpeed =
68 true; ///< app::dev config to tell stdCamera not to expose readout speed controls
69
70 static constexpr bool c_stdCamera_vShiftSpeed =
71 true; ///< app:dev config to tell stdCamera not to expose vertical shift speed control
72 static constexpr bool c_stdCamera_fanSpeed =
73 false; ///< app::dev config to tell stdCamera not to expose fan-speed control
74
75 static constexpr bool c_stdCamera_emGain =
76 true; ///< app::dev config to tell stdCamera to not expose EM gain controls
77
78 static constexpr bool c_stdCamera_exptimeCtrl =
79 true; ///< app::dev config to tell stdCamera to expose exposure time controls
80
81 static constexpr bool c_stdCamera_fpsCtrl = true; ///< app::dev config to tell stdCamera to expose FPS controls
82
83 static constexpr bool c_stdCamera_fps =
84 true; ///< app::dev config to tell stdCamera not to expose FPS status (ignored since fpsCtrl=true)
85
86 static constexpr bool c_stdCamera_synchro =
87 true; ///< app::dev config to tell stdCamera to not expose synchro mode controls
88
89 static constexpr bool c_stdCamera_usesModes =
90 false; ///< app:dev config to tell stdCamera not to expose mode controls
91
92 static constexpr bool c_stdCamera_usesROI = true; ///< app:dev config to tell stdCamera to expose ROI controls
93
94 static constexpr bool c_stdCamera_cropMode =
95 true; ///< app:dev config to tell stdCamera not to expose Crop Mode controls
96
97 static constexpr bool c_stdCamera_hasShutter =
98 true; ///< app:dev config to tell stdCamera to expose shutter controls
99
100 static constexpr bool c_stdCamera_hasFocus =
101 true; ///< app:dev config to tell stdCamera this camera can expose focus-state and goto-focus controls
102
103 static constexpr bool c_stdCamera_usesStateString =
104 true; ///< app::dev confg to tell stdCamera to expose the state string property
105
106 static constexpr bool c_frameGrabber_flippable =
107 true; ///< app:dev config to tell framegrabber that this camera can be flipped
108
109 ///@}
110
111 protected:
112 mx::improc::eigenImage<int16_t> m_fgimage;
113
114 double m_lastTime{ 0 };
115 double m_offset = { 0 };
116
117 float m_bias{ 500 }; ///< the simulated bias level. default 500.
118 float m_ron{ 5 }; ///< the simulated readout noise, in counts/read. default 5.
119
120 std::vector<float> m_xcen{ 0 }; /**< the simulated star x center coordinate, relative to image center.
121 one per star. default 0*/
122 std::vector<float> m_ycen{ 0 }; /**< the simulated star y center coordinate, relative to image center.
123 one per star. default 0.*/
124 std::vector<float> m_peak{ 2000 }; ///< the simulated star peak, in counts/second. one per star. default 2000.
125 float m_fwhm{ 2 }; ///< the simulated star FWHM in pixels. the same for all stars. default 2.
126
127 float m_jitter{ 0.1 }; ///< the simulated jitter, in pixels/read. the same for all stars. default 0.1.
128
129 mx::math::normDistT<float> m_norm;
130
131 bool m_focusInFocus{ false }; ///< Simulated in-focus state reported through the stdCamera focus interface.
132
133 bool m_gotoFocusRequested{ false }; ///< True after the simulated goto-focus command has been received.
134
135 public:
136 /// Default c'tor
137 cameraSim();
138
139 /// Destructor
141
142 /// Setup the configuration system (called by MagAOXApp::setup())
143 virtual void setupConfig();
144
145 /// load the configuration system results (called by MagAOXApp::setup())
146 virtual int loadConfigImpl( mx::app::appConfigurator &cfg );
147
148 /// load the configuration system results (called by MagAOXApp::setup())
149 virtual void loadConfig();
150
151 /// Startup functions
152 /** Sets up the INDI vars.
153 *
154 */
155 virtual int appStartup();
156
157 /// Implementation of the FSM for the Siglent SDG
158 virtual int appLogic();
159
160 /// Do any needed shutdown tasks. Currently nothing in this app.
161 virtual int appShutdown();
162
164 int startAcquisition();
166 int loadImageIntoStream( void *dest );
167 int reconfig();
168
169 protected:
170 float fps();
171
172 /** \name stdCamera Interface
173 *
174 * @{
175 */
176
177 /// Set defaults for a power on state.
178 /**
179 * \returns 0 on success
180 * \returns -1 on error
181 */
182 int powerOnDefaults();
183
184 int setTempControl();
185
186 int setTempSetPt();
187
188 int setReadoutSpeed();
189
190 int setVShiftSpeed();
191
192 /// Set the Exposure Time. [stdCamera interface]
193 /** Sets the frame rate to m_expTimeSet.
194 *
195 * \returns 0 on success
196 * \returns -1 on error
197 */
198 int setExpTime();
199
200 /// Set the framerate.
201 /**
202 * \returns 0 always
203 */
204 int setFPS();
205
206 int setSynchro();
207
208 int setEMGain();
209
210 /// Check the next ROI
211 /** Checks if the target values are valid and adjusts them to the closest valid values if needed.
212 *
213 * \returns 0 always
214 */
215 int checkNextROI();
216
217 int setCropMode();
218
219 /// Set the next ROI
220 /**
221 * \returns 0 always
222 */
223 int setNextROI();
224
225 /// Report whether the simulated camera is currently in focus.
226 bool checkFocus();
227
228 /// Simulate a goto-focus request.
229 int gotoFocus();
230
231 int setShutter( int ss );
232
233 std::string stateString();
234
235 bool stateStringValid();
236
237 ///@}
238
239 /** \name Telemeter Interface
240 *
241 * @{
242 */
243
244 int checkRecordTimes();
245
247
248 ///@}
249};
250
252{
253 m_powerMgtEnabled = true;
254
257
258 m_default_x = 511.5;
259 m_default_y = 511.5;
260 m_default_w = 1024;
261 m_default_h = 1024;
262
267 m_nextROI.bin_x = 1;
268 m_nextROI.bin_y = 1;
269
270 m_full_x = 511.5;
271 m_full_y = 511.5;
272 m_full_w = 1024;
273 m_full_h = 1024;
274
275 return;
276}
277
279{
280 return;
281}
282
284{
286
288
289 TELEMETER_SETUP_CONFIG( config );
290
291 config.add( "camsim.fullW",
292 "",
293 "camsim.fullW",
294 argType::Required,
295 "camsim",
296 "fullW",
297 false,
298 "int",
299 "Full (maximum) width of the simulated detector" );
300
301 config.add( "camsim.fullH",
302 "",
303 "camsim.fullH",
304 argType::Required,
305 "camsim",
306 "fullH",
307 false,
308 "int",
309 "Full (maximum) height of the simulated detector" );
310
311 config.add( "camsim.defaultFPS",
312 "",
313 "camsim.defaultFPS",
314 argType::Required,
315 "camsim",
316 "defaultFPS",
317 false,
318 "float",
319 "the camera default FPS, set at startup. Default is 10" );
320
321 config.add( "camsim.bias",
322 "",
323 "camsim.bias",
324 argType::Required,
325 "camsim",
326 "bias",
327 false,
328 "float",
329 "the simulated bias level. default 500." );
330
331 config.add( "camsim.ron",
332 "",
333 "camsim.ron",
334 argType::Required,
335 "camsim",
336 "ron",
337 false,
338 "float",
339 "the simulated readout noise, in counts/read. default 5." );
340
341 config.add( "camsim.xcen",
342 "",
343 "camsim.xcen",
344 argType::Required,
345 "camsim",
346 "xcen",
347 false,
348 "vector<float>",
349 "the simulated star x center coordinate, relative to image center. one per star. default 0." );
350
351 config.add( "camsim.ycen",
352 "",
353 "camsim.ycen",
354 argType::Required,
355 "camsim",
356 "ycen",
357 false,
358 "vector<float>",
359 "the simulated star y center coordinate, relative to image center. one per star. default 0." );
360
361 config.add( "camsim.peak",
362 "",
363 "camsim.peak",
364 argType::Required,
365 "camsim",
366 "peak",
367 false,
368 "vector<float>",
369 "the simulated star peak, in counts/second. one per star. default 2000." );
370
371 config.add( "camsim.fwhm",
372 "",
373 "camsim.fwhm",
374 argType::Required,
375 "camsim",
376 "fwhm",
377 false,
378 "float",
379 "the simulated star FWHM in pixels. the same for all stars. default 2." );
380
381 config.add( "camsim.jitter",
382 "",
383 "camsim.jitter",
384 argType::Required,
385 "camsim",
386 "jitter",
387 false,
388 "float",
389 "the simulated jitter, in pixels/read. the same for all stars. default 0.1." );
390}
391
392inline int cameraSim::loadConfigImpl( mx::app::appConfigurator &cfg )
393{
395
397
399
400 cfg( m_full_w, "camsim.fullW" );
401 cfg( m_full_h, "camsim.fullH" );
402
403 m_full_x = 0.5 * ( m_full_w - 1.0 );
404 m_full_y = 0.5 * ( m_full_h - 1.0 );
405
407 {
410 }
411
413 {
416 }
417
418 m_fps = 10;
419 cfg( m_fps, "camsim.defaultFPS" );
420 m_fpsSet = m_fps;
421
422 config( m_bias, "camsim.bias" );
423 config( m_ron, "camsim.ron" );
424
425 config( m_xcen, "camsim.xcen" );
426 config( m_ycen, "camsim.ycen" );
427 config( m_peak, "camsim.peak" );
428
429 if( m_xcen.size() != m_ycen.size() || m_xcen.size() != m_peak.size() )
430 {
431 log<software_error>( { __FILE__, __LINE__, "cameraSim: xcen, ycen, and peak must be the same size." } );
432 }
433
434 config( m_fwhm, "camsim.fwhm" );
435
436 config( m_jitter, "camsim.jitter" );
437 return 0;
438}
439
441{
442 if( loadConfigImpl( config ) < 0 )
443 {
444 m_shutdown = 1;
445 }
446}
447
449{
450
451 //=================================
452 // Do camera configuration here
453
454 m_ccdTemp = -40;
455 m_ccdTempSetpt = -40;
456
457 m_readoutSpeedNames = { "one", "two", "three" };
458 m_readoutSpeedNameLabels = { "One", "Two", "Three" };
460
461 m_vShiftSpeedNames = { "0.1", "0.2", "0.3" };
462 m_vShiftSpeedNameLabels = { "0.1 Hz", "0.2 kHz", "0.4 MhZ" };
464
465 m_shutterStatus = "READY";
466 m_shutterState = 0;
467
469 {
470 return log<software_critical, -1>( { __FILE__, __LINE__ } );
471 }
472
474
476
481 m_currentROI.bin_x = 1;
482 m_currentROI.bin_y = 1;
484
485 m_expTime = 1.0 / m_fps;
487
488 m_lastTime = mx::sys::get_curr_time();
489 m_offset = 0;
490
492
493 return 0;
494}
495
497{
499
500 // and run stdCamera's appLogic
502 {
503 return log<software_error, -1>( { __FILE__, __LINE__ } );
504 }
505
506 // and run frameGrabber's appLogic to see if the f.g. thread has exited.
508
510
512 {
513 // Get a lock if we can
514 std::unique_lock<std::mutex> lock( m_indiMutex, std::try_to_lock );
515
516 // but don't wait for it, just go back around.
517 if( !lock.owns_lock() )
518 return 0;
519
521 {
524 return 0;
525 }
526
528 }
529
530 ///\todo Fall through check?
531
532 return 0;
533}
534
536{
537
539
541
543
544 return 0;
545}
546
548{
549 try
550 {
551 recordCamera( true );
552
557 m_currentROI.bin_x = m_nextROI.bin_x;
558 m_currentROI.bin_y = m_nextROI.bin_y;
559
562 m_xbinning = m_currentROI.bin_x;
563 m_ybinning = m_currentROI.bin_y;
564
565 m_fgimage.resize( m_width, m_height );
566
569
570 recordCamera( true );
571 }
572 catch( ... )
573 {
574 log<software_error>( { __FILE__, __LINE__, "invalid ROI specifications" } );
576 return -1;
577 }
578
579 return 0;
580}
581
583{
584
585 m_offset = 0;
586 m_lastTime = mx::sys::get_curr_time();
587
589
590 return 0;
591}
592
594{
595 double et = mx::sys::get_curr_time() - m_lastTime;
596 while( et <= m_expTime - m_offset )
597 {
598 mx::sys::nanoSleep( et * 1e6 );
599 et = mx::sys::get_curr_time() - m_lastTime;
600 }
601
602 double dt = mx::sys::get_curr_time( m_currImageTimestamp );
603
604 m_offset += 0.1 * ( ( dt - m_lastTime ) - m_expTime );
605
606 m_lastTime = dt;
607
608 for( uint32_t cc = 0; cc < m_height; ++cc )
609 {
610 float y = ( cc - 0.5 * ( 1.0 * m_height - 1.0 ) ) +
611 ( m_currentROI.y - 0.5 * ( 1.0 * m_full_h - 1.0 ) ); // Y position relative to the full array
612
613 for( uint32_t rr = 0; rr < m_width; ++rr )
614 {
615 float x = ( rr - 0.5 * ( 1.0 * m_width - 1.0 ) ) +
616 ( m_currentROI.x - 0.5 * ( 1.0 * m_full_w - 1.0 ) ); // X position realtive to the full array
617
618 m_fgimage( rr, cc ) = m_bias + m_norm * m_ron;
619
620 if( m_shutterState == 1 )
621 {
622 for( size_t s = 0; s < m_xcen.size(); ++s )
623 {
624 if( ( fabs( y - m_ycen[s] ) < 4 * m_fwhm ) && ( fabs( x - m_xcen[s] ) < 4 * m_fwhm ) )
625 {
626 float xcen = m_xcen[s] + m_norm * m_jitter;
627 float ycen = m_ycen[s] + m_norm * m_jitter;
628
629 float flux = mx::math::func::gaussian2D<float>(
630 x, y, 0.0, m_peak[s] * m_expTime, xcen, ycen, mx::math::func::fwhm2sigma( m_fwhm ) );
631 flux += m_norm * sqrt( flux );
632
633 m_fgimage( rr, cc ) += flux;
634 }
635 }
636 }
637 }
638 }
639
640 return 0;
641}
642
644{
645
647 dest, m_fgimage.data(), m_width, m_height, sizeof( uint16_t ) ) == nullptr )
648 {
649 return -1;
650 }
651
652 m_imageStream->md->atime = m_imageStream->md->writetime;
653
654 return 0;
655}
656
658{
659
660 return 0;
661}
662
663inline float cameraSim::fps()
664{
665 return m_fps;
666}
667
669{
676
677 return 0;
678}
679
681{
683 return 0;
684}
685
687{
689 return 0;
690}
691
693{
695 return 0;
696}
697
699{
701 return 0;
702}
703
705{
706
708 m_fps = 1. / m_fps;
709 m_fpsSet = m_fps;
710
711 log<text_log>( "Set exposure time: " + std::to_string( m_expTimeSet ) + " sec" );
712
713 m_reconfig = true;
714
715 return 0;
716}
717
719{
720 recordCamera( true );
721
722 m_fps = m_fpsSet;
723 m_expTime = 1.0 / m_fps;
725
726 log<text_log>( "Set frame rate: " + std::to_string( m_fps ) + " fps" );
727
728 m_reconfig = true;
729
730 return 0;
731}
732
734{
736 return 0;
737}
738
740{
742 return 0;
743}
744
746{
747
754
755 return 0;
756}
757
759{
760 m_reconfig = true;
761
762 updateSwitchIfChanged( m_indiP_roi_set, "request", pcf::IndiElement::Off, INDI_IDLE );
763 updateSwitchIfChanged( m_indiP_roi_full, "request", pcf::IndiElement::Off, INDI_IDLE );
764 updateSwitchIfChanged( m_indiP_roi_last, "request", pcf::IndiElement::Off, INDI_IDLE );
765 updateSwitchIfChanged( m_indiP_roi_default, "request", pcf::IndiElement::Off, INDI_IDLE );
766 return 0;
767}
768
770{
772 return 0;
773}
774
776{
777 return m_focusInFocus;
778}
779
781{
782 m_focusInFocus = true;
784
785 return 0;
786}
787
788inline int cameraSim::setShutter( int ss )
789{
791
792 return 0;
793}
794
795inline std::string cameraSim::stateString()
796{
797 return "stateString";
798}
799
801{
802 return true;
803}
804
809
811{
812 return recordCamera( true );
813}
814
815} // namespace app
816} // namespace MagAOX
817#endif
#define IMAGESTRUCT_UINT16
The base-class for XWCTk applications.
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.
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.
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.
std::mutex m_indiMutex
Mutex for locking INDI communications.
static constexpr bool c_stdCamera_usesStateString
app::dev confg to tell stdCamera to expose the state string property
int setFPS()
Set the framerate.
static constexpr bool c_stdCamera_fps
app::dev config to tell stdCamera not to expose FPS status (ignored since fpsCtrl=true)
Definition cameraSim.hpp:83
static constexpr bool c_stdCamera_fanSpeed
app::dev config to tell stdCamera not to expose fan-speed control
Definition cameraSim.hpp:72
dev::stdCamera< cameraSim > stdCameraT
Definition cameraSim.hpp:55
std::vector< float > m_xcen
static constexpr bool c_stdCamera_usesROI
app:dev config to tell stdCamera to expose ROI controls
Definition cameraSim.hpp:92
std::string stateString()
static constexpr bool c_stdCamera_fpsCtrl
app::dev config to tell stdCamera to expose FPS controls
Definition cameraSim.hpp:81
int powerOnDefaults()
Set defaults for a power on state.
virtual void loadConfig()
load the configuration system results (called by MagAOXApp::setup())
bool checkFocus()
Report whether the simulated camera is currently in focus.
int gotoFocus()
Simulate a goto-focus request.
bool m_gotoFocusRequested
True after the simulated goto-focus command has been received.
static constexpr bool c_stdCamera_exptimeCtrl
app::dev config to tell stdCamera to expose exposure time controls
Definition cameraSim.hpp:78
float m_jitter
the simulated jitter, in pixels/read. the same for all stars. default 0.1.
static constexpr bool c_stdCamera_hasShutter
app:dev config to tell stdCamera to expose shutter controls
Definition cameraSim.hpp:97
mx::improc::eigenImage< int16_t > m_fgimage
static constexpr bool c_stdCamera_hasFocus
app:dev config to tell stdCamera this camera can expose focus-state and goto-focus controls
int recordTelem(const telem_stdcam *)
dev::telemeter< cameraSim > telemeterT
Definition cameraSim.hpp:57
float m_ron
the simulated readout noise, in counts/read. default 5.
virtual int loadConfigImpl(mx::app::appConfigurator &cfg)
load the configuration system results (called by MagAOXApp::setup())
std::vector< float > m_peak
the simulated star peak, in counts/second. one per star. default 2000.
static constexpr bool c_stdCamera_readoutSpeed
app::dev config to tell stdCamera not to expose readout speed controls
Definition cameraSim.hpp:67
int setNextROI()
Set the next ROI.
static constexpr bool c_stdCamera_synchro
app::dev config to tell stdCamera to not expose synchro mode controls
Definition cameraSim.hpp:86
~cameraSim() noexcept
Destructor.
virtual int appShutdown()
Do any needed shutdown tasks. Currently nothing in this app.
static constexpr bool c_stdCamera_vShiftSpeed
app:dev config to tell stdCamera not to expose vertical shift speed control
Definition cameraSim.hpp:70
std::vector< float > m_ycen
cameraSim()
Default c'tor.
static constexpr bool c_stdCamera_cropMode
app:dev config to tell stdCamera not to expose Crop Mode controls
Definition cameraSim.hpp:94
static constexpr bool c_stdCamera_tempControl
app::dev config to tell stdCamera to not expose temperature controls
Definition cameraSim.hpp:62
static constexpr bool c_stdCamera_temp
app::dev config to tell stdCamera to expose temperature
Definition cameraSim.hpp:65
mx::math::normDistT< float > m_norm
bool m_focusInFocus
Simulated in-focus state reported through the stdCamera focus interface.
static constexpr bool c_frameGrabber_flippable
app:dev config to tell framegrabber that this camera can be flipped
int setExpTime()
Set the Exposure Time. [stdCamera interface].
float m_fwhm
the simulated star FWHM in pixels. the same for all stars. default 2.
int loadImageIntoStream(void *dest)
static constexpr bool c_stdCamera_emGain
app::dev config to tell stdCamera to not expose EM gain controls
Definition cameraSim.hpp:75
virtual int appLogic()
Implementation of the FSM for the Siglent SDG.
dev::frameGrabber< cameraSim > frameGrabberT
Definition cameraSim.hpp:56
int checkNextROI()
Check the next ROI.
virtual void setupConfig()
Setup the configuration system (called by MagAOXApp::setup())
static constexpr bool c_stdCamera_usesModes
app:dev config to tell stdCamera not to expose mode controls
Definition cameraSim.hpp:89
float m_bias
the simulated bias level. default 500.
virtual int appStartup()
Startup functions.
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 m_ybinning
The y-binning according to the framegrabber.
size_t m_typeSize
The size of the type, in bytes. Result of sizeof.
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.
std::vector< std::string > m_readoutSpeedNames
float m_fpsSet
The commanded fps, as set by user.
bool m_synchroSet
Target status of m_synchro.
pcf::IndiProperty m_indiP_roi_y
Property used to set the ROI x center coordinate.
float m_default_x
Power-on ROI center x coordinate.
float m_emGain
The camera's current EM gain (if available).
std::vector< std::string > m_readoutSpeedNameLabels
float m_emGainSet
The camera's EM gain, as set by the user.
std::string m_vShiftSpeedNameSet
The user requested vshift speed name, to be set by derived()
bool m_cropModeSet
Desired status of crop mode ROIs, if enabled for this camera.
std::string m_defaultReadoutSpeed
The default readout speed of the camera.
float m_expTime
The current exposure time, in seconds.
int m_default_bin_x
Power-on ROI x binning.
bool m_cropMode
Status of crop mode ROIs, if enabled for this camera.
pcf::IndiProperty m_indiP_roi_last
Property used to trigger setting the last ROI.
float m_expTimeSet
The exposure time, in seconds, as set by user.
pcf::IndiProperty m_indiP_roi_h
Property used to set the ROI height.
float m_full_y
The full ROI center y coordinate.
std::string m_readoutSpeedName
The current readout speed name.
float m_ccdTempSetpt
The desired temperature, in C.
bool m_tempControlStatus
Whether or not temperature control is active.
int setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
pcf::IndiProperty m_indiP_roi_w
Property used to set the ROI width.
pcf::IndiProperty m_indiP_roi_default
Property used to trigger setting the default and startup ROI.
pcf::IndiProperty m_indiP_roi_bin_x
Property used to set the ROI x binning.
float m_full_x
The full ROI center x coordinate.
int loadConfig(mx::app::appConfigurator &config)
load the configuration system results
bool m_synchro
Status of synchronization, true is on, false is off.
std::string m_vShiftSpeedName
The current vshift speed name.
float m_ccdTemp
The current temperature, in C.
std::vector< std::string > m_vShiftSpeedNames
std::string m_defaultVShiftSpeed
The default readout speed of the camera.
std::vector< std::string > m_vShiftSpeedNameLabels
pcf::IndiProperty m_indiP_roi_full
Property used to trigger setting the full ROI.
pcf::IndiProperty m_indiP_roi_set
Property used to trigger setting the ROI.
int appShutdown()
Application shutdown.
float m_default_y
Power-on ROI center y coordinate.
pcf::IndiProperty m_indiP_roi_bin_y
Property used to set the ROI y binning.
pcf::IndiProperty m_indiP_roi_x
Property used to set the ROI x center coordinate.
int m_default_bin_y
Power-on ROI y binning.
bool m_tempControlStatusSet
Desired state of temperature control.
std::string m_readoutSpeedNameSet
The user requested readout speed name, to be set by derived()
#define protected
#define FRAMEGRABBER_SETUP_CONFIG(cfig)
Call frameGrabberT::setupConfig with error checking for frameGrabber.
#define FRAMEGRABBER_APP_LOGIC
Call frameGrabberT::appLogic with error checking for frameGrabber.
#define FRAMEGRABBER_APP_SHUTDOWN
Call frameGrabberT::appShutdown with error checking for frameGrabber.
#define FRAMEGRABBER_UPDATE_INDI
Call frameGrabberT::updateINDI with error checking for frameGrabber.
#define FRAMEGRABBER_LOAD_CONFIG(cfig)
Call frameGrabberT::loadConfig with error checking for frameGrabber.
#define FRAMEGRABBER_APP_STARTUP
Call frameGrabberT::appStartup with error checking for frameGrabber.
#define INDI_IDLE
Definition indiUtils.hpp:27
#define INDI_OK
Definition indiUtils.hpp:28
std::unique_lock< std::mutex > lock(m_indiMutex)
Definition dm.hpp:19
A device base class which saves telemetry.
Definition telemeter.hpp:75
@ OPERATING
The device is operating, other than homing.
@ ERROR
The application has encountered an error, from which it is recovering (with or without intervention)
@ READY
The device is ready for operation, but is not operating.
@ NOTCONNECTED
The application is not connected to the device or service.
Software CRITICAL log entry.
Software ERR log entry.
Log entry recording stdcam stage specific status.
#define TELEMETER_APP_LOGIC
Call telemeter::appLogic with error checking.
#define TELEMETER_LOAD_CONFIG(cfig)
Call telemeter::loadConfig with error checking.
#define TELEMETER_APP_STARTUP
Call telemeter::appStartup with error checking.
#define TELEMETER_SETUP_CONFIG(cfig)
Call telemeter::setupConfig with error checking.
#define TELEMETER_APP_SHUTDOWN
Call telemeter::appShutdown with error checking.