17#include "../../libMagAOX/libMagAOX.hpp"
18#include "../../magaox_git_version.h"
302 config.add(
"camera.serial",
"",
"camera.serial", argType::Required,
"camera",
"serial",
false,
"string",
"The camera serial number.");
433 if(!
lock.owns_lock())
return 0;
600 std::cout <<
"Found " <<
DeviceCount <<
" Devices." << std::endl;
816 std::cerr <<
"setTempSetPt is not implemented\n";
823 std::cerr <<
"Set exposure time\n";
831 std::cerr <<
"setFPS\n";
845 std::cerr <<
"setNextROI:\n";
846 std::cerr <<
" m_nextROI.x = " <<
m_nextROI.x <<
"\n";
847 std::cerr <<
" m_nextROI.y = " <<
m_nextROI.y <<
"\n";
848 std::cerr <<
" m_nextROI.w = " <<
m_nextROI.w <<
"\n";
849 std::cerr <<
" m_nextROI.h = " <<
m_nextROI.h <<
"\n";
850 std::cerr <<
" m_nextROI.bin_x = " <<
m_nextROI.bin_x <<
"\n";
851 std::cerr <<
" m_nextROI.bin_y = " <<
m_nextROI.bin_y <<
"\n";
863 static_cast<void>(
sh);
889 std::cerr <<
"FullAOIControl: " << std::boolalpha <<
faoi <<
"\n";
899 std::cerr << xbin <<
" " << ybin <<
" " <<
left <<
" " <<
top <<
" " << width <<
" " << height <<
" " <<
"\n";
983 m_width =
static_cast<int>(width);
984 m_height =
static_cast<int>(height);
1118 std::cerr <<
"buffer skip!\n";
The base-class for MagAO-X 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_powerState
Current power state, 1=On, 0=Off, -1=Unk.
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.
unsigned long m_powerOnWait
Time in sec to wait for device to boot after power on.
std::mutex m_indiMutex
Mutex for locking INDI communications.
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.
int loadConfig(mx::app::appConfigurator &config)
load the configuration system results
uint8_t m_dataType
The ImageStreamIO type code.
bool m_reconfig
Flag to set if a camera reconfiguration requires a framegrabber reset.
uint32_t m_height
The height of the image, once deinterlaced etc.
int setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
MagAO-X standard camera interface.
float m_fpsSet
The commanded fps, as set by user.
pcf::IndiProperty m_indiP_roi_y
Property used to set the ROI x center coordinate.
std::string m_tempControlStatusStr
Camera specific description of temperature control status.
int m_full_w
The full ROI width.
float m_expTime
The current exposure time, in seconds.
int recordCamera(bool force=false)
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.
void setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
int m_full_h
The full ROI height.
float m_full_y
The full ROI center y coordinate.
float m_ccdTempSetpt
The desired temperature, in C.
bool m_tempControlStatus
Whether or not temperature control is active.
pcf::IndiProperty m_indiP_roi_w
Property used to set the ROI width.
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.
float m_startupTemp
The temperature to set after a power-on. Set to <= -999 to not use [default].
float m_ccdTemp
The current temperature, in C.
bool m_tempControlOnTarget
Whether or not the temperature control system is on its target temperature.
void loadConfig(mx::app::appConfigurator &config)
load the configuration system results
pcf::IndiProperty m_indiP_roi_set
Property used to trigger setting the ROI.
int appShutdown()
Application shutdown.
float m_fps
The current FPS.
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.
bool m_tempControlStatusSet
Desired state of temperature control.
static constexpr bool c_stdCamera_exptimeCtrl
app::dev config to tell stdCamera to expose exposure time controls
static constexpr bool c_stdCamera_emGain
app::dev config to tell stdCamera to expose EM gain controls
static constexpr bool c_stdCamera_synchro
app::dev config to tell stdCamera to not expose synchro mode controls
virtual int appShutdown()
Do any needed shutdown tasks. Currently nothing in this app.
int checkNextROI()
Required by stdCamera, checks the next ROI [stdCamera interface].
int recordTelem(const telem_stdcam *)
int cameraSelect()
Select the camera with the desired serial number.
int powerOnDefaults()
Set defaults for a power on state.
int acquireAndCheckValid()
static constexpr bool c_stdCamera_readoutSpeed
app::dev config to tell stdCamera to expose readout speed controls
static constexpr bool c_stdCamera_usesStateString
app::dev confg to tell stdCamera to expose the state string property
std::string m_serial
The camera serial number. This is a required configuration parameter.
int configureAcquisition()
static constexpr bool c_stdCamera_cropMode
app:dev config to tell stdCamera to expose Crop Mode controls
virtual void loadConfig()
load the configuration system results (called by MagAOXApp::setup())
int setShutter(int sh)
Required by stdCamera, but this does not do anything for this camera [stdCamera interface].
virtual void setupConfig()
Setup the configuration system (called by MagAOXApp::setup())
virtual int appLogic()
Implementation of the FSM for the Siglent SDG.
bool m_libInit
Flag indicating whether the AT library is initialized.
unsigned int m_imageTimeout
Timeout for waiting on images [msec]. Default is 1000 msec.
virtual int appStartup()
Startup functions.
static constexpr bool c_stdCamera_fpsCtrl
app::dev config to tell stdCamera to expose FPS controls
static constexpr bool c_stdCamera_temp
app::dev config to tell stdCamera to expose temperature
int setExpTime()
Required by stdCamera, but this does not do anything for this camera [stdCamera interface].
static constexpr bool c_stdCamera_usesModes
app:dev config to tell stdCamera not to expose mode controls
int setTempControl()
Turn temperature control on or off.
std::vector< unsigned char * > m_inputBuffers
unsigned char * m_outputBuffer
virtual int whilePowerOff()
Implementation of the while-powered-off FSM.
static constexpr bool c_stdCamera_usesROI
app:dev config to tell stdCamera to expose ROI controls
int loadImageIntoStream(void *dest)
int setTempSetPt()
Set the CCD temperature setpoint [stdCamera interface].
static constexpr bool c_stdCamera_vShiftSpeed
app:dev config to tell stdCamera to expose vertical shift speed control
static constexpr bool c_stdCamera_hasShutter
app:dev config to tell stdCamera to expose shutter controls
AT_H m_handle
The Andor API handle to the camera.
int setFPS()
Set the frame rate. [stdCamera interface].
virtual int onPowerOff()
Implementation of the on-power-off FSM logic.
int setNextROI()
Required by stdCamera, but this does not do anything for this camera [stdCamera interface].
static constexpr bool c_stdCamera_tempControl
app::dev config to tell stdCamera to expose temperature controls
static constexpr bool c_frameGrabber_flippable
app:dev config to tell framegrabber this camera can not be flipped
static constexpr bool c_stdCamera_fps
app::dev config to tell stdCamera not to expose FPS status
wchar_t m_pixelEncoding[256]
~zylaCtrl() noexcept
Destructor.
@ 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.
@ CONNECTED
The application has connected to the device or service.
@ NOTCONNECTED
The application is not connected to the device or service.
@ POWERON
The device power is on.
std::unique_lock< std::mutex > lock(m_indiMutex)
static constexpr logPrioT LOG_NOTICE
A normal but significant condition.
static constexpr logPrioT LOG_WARNING
A condition has occurred which may become an error, but the process continues.
A device base class which saves telemetry.
int loadConfig(appConfigurator &config)
Load the device section from an application configurator.
int setupConfig(appConfigurator &config)
Setup an application configurator for the device section.
Software CRITICAL log entry.
Log entry recording stdcam stage specific status.