MagAO-X EDT framegrabber interface. More...
#include <edtCamera.hpp>


Public Member Functions | |
| edtCamera () | |
| C'tor, sets up stdCamera. | |
| ~edtCamera () noexcept | |
| Destructor, destroys the PdvDev structure. | |
| int | pdvSerialWriteRead (std::string &response, const std::string &command, bool logErrors=true) |
| Send a serial command over cameralink and retrieve the response. | |
| int | pdvConfig (std::string &cfgname) |
| Configure the EDT framegrabber. | |
| void | setupConfig (mx::app::appConfigurator &config) |
| Setup the configuration system. | |
| void | loadConfig (mx::app::appConfigurator &config) |
| load the configuration system results | |
| int | appStartup () |
| Startup function. | |
| int | appLogic () |
| Application logic. | |
| int | onPowerOff () |
| Actions on power off. | |
| int | whilePowerOff () |
| Actions while powered off. | |
| int | appShutdown () |
| Application the shutdown. | |
| int | pdvStartAcquisition () |
| int | pdvAcquire (timespec &currImageTimestamp) |
| int | pdvReconfig () |
INDI | |
| int | updateINDI () |
| The static callback function to be registered for the channel properties. | |
Public Attributes | |
| unsigned | m_readTimeout {1000} |
| The read timeout [msec]. | |
| unsigned | m_writeTimeout {1000} |
| The write timeout [msec]. | |
Protected Attributes | |
| PdvDev * | m_pdv { nullptr } |
| The EDT PDV device handle. | |
| u_char * | m_image_p { nullptr } |
| The image data grabbed. | |
| int | m_raw_height { 0 } |
| The height of the frame, according to the framegrabber. | |
| int | m_raw_width { 0 } |
| The width of the frame, according to the framegrabber. | |
| int | m_raw_depth { 0 } |
| The bit-depth of the frame, according to the framegrabber. | |
| std::string | m_cameraType |
| The camera type according to the framegrabber. | |
Configurable Parameters | |
| int | m_unit { 0 } |
| EDT PDV board unit number. | |
| int | m_channel { 0 } |
| EDT PDV board channel number. | |
| int | m_numBuffs { 4 } |
| EDT PDV DMA buffer size, indicating number of images. | |
Private Member Functions | |
| derivedT & | derived () |
MagAO-X EDT framegrabber interface.
Implements an interface to the EDT PDV SDK
The derived class derivedT must be a MagAOXApp<true>, and must declare this class a friend like so:
A static configuration variable must be defined in derivedT as
which determines whether or not the EDT config path is relative to the MagAO-X config path (true) or absolute (false).
In addition, derivedT should be dev::frameGrabber or equivalent, with an m_reconfig member, and calls to this class's pdvStartAcquisition, pdvAcquire, and pdvReconfig in the relevant dev::frameGrabber implementation functions.
Calls to this class's setupConfig, loadConfig, appStartup, appLogic, appShutdown onPowerOff, and whilePowerOff, must be placed in the derived class's functions of the same name.
Definition at line 54 of file edtCamera.hpp.
| MagAOX::app::dev::edtCamera< derivedT >::edtCamera | ( | ) |
C'tor, sets up stdCamera.
Definition at line 240 of file edtCamera.hpp.
|
noexcept |
Destructor, destroys the PdvDev structure.
Definition at line 245 of file edtCamera.hpp.
References pdv_close().
| int MagAOX::app::dev::edtCamera< derivedT >::appLogic | ( | ) |
Application logic.
Checks the edtCamera thread
This should be called from the derived's appLogic() as in
with appropriate error checking.
Definition at line 517 of file edtCamera.hpp.
| int MagAOX::app::dev::edtCamera< derivedT >::appShutdown | ( | ) |
Application the shutdown.
Shuts down the edtCamera thread
with appropriate error checking.
Definition at line 535 of file edtCamera.hpp.
Referenced by MagAOX::app::cred2Ctrl::appShutdown(), and MagAOX::app::ocam2KCtrl::appShutdown().
| int MagAOX::app::dev::edtCamera< derivedT >::appStartup | ( | ) |
Startup function.
This should be called in derivedT::appStartup as
with appropriate error checking.
Definition at line 505 of file edtCamera.hpp.
|
inlineprivate |
Definition at line 233 of file edtCamera.hpp.
| void MagAOX::app::dev::edtCamera< derivedT >::loadConfig | ( | mx::app::appConfigurator & | config | ) |
load the configuration system results
This should be called in derivedT::loadConfig as
with appropriate error checking.
| [in] | config | the derived classes configurator |
Definition at line 493 of file edtCamera.hpp.
References MagAOX::app::dev::ioDevice::loadConfig().
Referenced by MagAOX::app::andorCtrl::loadConfig(), MagAOX::app::ocam2KCtrl::loadConfig(), and MagAOX::app::cred2Ctrl::loadConfigImpl().
| int MagAOX::app::dev::edtCamera< derivedT >::onPowerOff | ( | ) |
Actions on power off.
This should be called from the derived's onPowerOff() as in
with appropriate error checking.
Definition at line 523 of file edtCamera.hpp.
| int MagAOX::app::dev::edtCamera< derivedT >::pdvAcquire | ( | timespec & | currImageTimestamp | ) |
Definition at line 549 of file edtCamera.hpp.
References pdv_start_image(), and pdv_wait_last_image_timed().
| int MagAOX::app::dev::edtCamera< derivedT >::pdvConfig | ( | std::string & | cfgname | ) |
Configure the EDT framegrabber.
| [in] | cfgname | The configuration name for the mode to set |
Definition at line 344 of file edtCamera.hpp.
References edt_close(), EDT_INTERFACE, edt_open_channel(), edt_perror(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_INFO, pdv_alloc_dependent(), pdv_close(), pdv_flush_fifo(), pdv_get_cameratype(), pdv_get_depth(), pdv_get_height(), pdv_get_width(), pdv_initcam(), pdv_multibuf(), pdv_open_channel(), pdv_readcfg(), and pdv_serial_read_enable().
| int MagAOX::app::dev::edtCamera< derivedT >::pdvReconfig | ( | ) |
Definition at line 564 of file edtCamera.hpp.
References flatlogs::logPrio::LOG_ERROR.
| int MagAOX::app::dev::edtCamera< derivedT >::pdvSerialWriteRead | ( | std::string & | response, |
| const std::string & | command, | ||
| bool | logErrors = true |
||
| ) |
Send a serial command over cameralink and retrieve the response.
| [out] | response | the response to the command from the device |
| [in] | command | the command to send to the device |
| [in] | logErrors | log serial transport failures when true |
Definition at line 256 of file edtCamera.hpp.
References MAGAOX_PDV_SERBUFSIZE, pdv_get_waitchar(), pdv_serial_command(), pdv_serial_read(), and pdv_serial_wait().
| int MagAOX::app::dev::edtCamera< derivedT >::pdvStartAcquisition | ( | ) |
Definition at line 541 of file edtCamera.hpp.
References pdv_start_images().
| void MagAOX::app::dev::edtCamera< derivedT >::setupConfig | ( | mx::app::appConfigurator & | config | ) |
Setup the configuration system.
This should be called in derivedT::setupConfig as
with appropriate error checking.
| [out] | config | the derived classes configurator |
Definition at line 459 of file edtCamera.hpp.
References MagAOX::app::dev::ioDevice::setupConfig().
Referenced by MagAOX::app::andorCtrl::setupConfig(), MagAOX::app::cred2Ctrl::setupConfig(), and MagAOX::app::ocam2KCtrl::setupConfig().
| int MagAOX::app::dev::edtCamera< derivedT >::updateINDI | ( | ) |
The static callback function to be registered for the channel properties.
Definition at line 582 of file edtCamera.hpp.
| int MagAOX::app::dev::edtCamera< derivedT >::whilePowerOff | ( | ) |
Actions while powered off.
This should be called from the derived's whilePowerOff() as in
with appropriate error checking.
Definition at line 529 of file edtCamera.hpp.
|
protected |
The camera type according to the framegrabber.
Definition at line 84 of file edtCamera.hpp.
|
protected |
EDT PDV board channel number.
Definition at line 64 of file edtCamera.hpp.
|
protected |
The image data grabbed.
Definition at line 75 of file edtCamera.hpp.
|
protected |
EDT PDV DMA buffer size, indicating number of images.
Definition at line 65 of file edtCamera.hpp.
|
protected |
The EDT PDV device handle.
Definition at line 73 of file edtCamera.hpp.
|
protected |
The bit-depth of the frame, according to the framegrabber.
Definition at line 83 of file edtCamera.hpp.
|
protected |
The height of the frame, according to the framegrabber.
Definition at line 81 of file edtCamera.hpp.
|
protected |
The width of the frame, according to the framegrabber.
Definition at line 82 of file edtCamera.hpp.
|
inherited |
The read timeout [msec].
Definition at line 28 of file ioDevice.hpp.
Referenced by MagAOX::app::rhusbMon::rhusbMon(), MagAOX::app::tcsInterface::acquireFromGuider(), MagAOX::app::picoMotorCtrl::appLogic(), MagAOX::app::trippLitePDU::devPostLogin(), MagAOX::app::trippLitePDU::devStatus(), MagAOX::app::pi335Ctrl::finishInit(), MagAOX::app::pi335Ctrl::getCom(), MagAOX::app::smc100ccCtrl::getCtrlState(), MagAOX::app::smc100ccCtrl::getLastError(), MagAOX::app::tcsInterface::getMagTelStatus(), MagAOX::app::flipperCtrl::getPos(), MagAOX::app::smc100ccCtrl::getPosition(), MagAOX::app::pi335Ctrl::initDM(), MagAOX::app::dev::ioDevice::loadConfig(), MagAOX::app::rhusbMon::readProbe(), MagAOX::app::tcsInterface::sendFoffload(), MagAOX::app::tcsInterface::sendPyrNudge(), MagAOX::app::tcsInterface::sendTToffload(), MagAOX::app::pi335Ctrl::testConnection(), MagAOX::app::smc100ccCtrl::testConnection(), MagAOX::app::trippLitePDU::turnOutletOff(), and MagAOX::app::trippLitePDU::turnOutletOn().
|
protected |
EDT PDV board unit number.
Definition at line 63 of file edtCamera.hpp.
|
inherited |
The write timeout [msec].
Definition at line 29 of file ioDevice.hpp.
Referenced by MagAOX::app::rhusbMon::rhusbMon(), MagAOX::app::picoMotorCtrl::appLogic(), MagAOX::app::smc100ccCtrl::appLogic(), MagAOX::app::picoMotorCtrl::channelThreadExec(), MagAOX::app::trippLitePDU::devPostLogin(), MagAOX::app::trippLitePDU::devStatus(), MagAOX::app::pi335Ctrl::finishInit(), MagAOX::app::pi335Ctrl::getCom(), MagAOX::app::smc100ccCtrl::getCtrlState(), MagAOX::app::smc100ccCtrl::getLastError(), MagAOX::app::flipperCtrl::getPos(), MagAOX::app::smc100ccCtrl::getPosition(), MagAOX::app::pi335Ctrl::home_1(), MagAOX::app::pi335Ctrl::home_2(), MagAOX::app::pi335Ctrl::home_3(), MagAOX::app::pi335Ctrl::initDM(), MagAOX::app::dev::ioDevice::loadConfig(), MagAOX::app::pi335Ctrl::move_1(), MagAOX::app::pi335Ctrl::move_2(), MagAOX::app::pi335Ctrl::move_3(), MagAOX::app::smc100ccCtrl::moveTo(), MagAOX::app::flipperCtrl::moveTo(), MagAOX::app::rhusbMon::readProbe(), MagAOX::app::pi335Ctrl::releaseDM(), MagAOX::app::smc100ccCtrl::startHoming(), MagAOX::app::smc100ccCtrl::stop(), MagAOX::app::pi335Ctrl::testConnection(), MagAOX::app::smc100ccCtrl::testConnection(), MagAOX::app::trippLitePDU::turnOutletOff(), and MagAOX::app::trippLitePDU::turnOutletOn().