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) |
| 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 56 of file edtCamera.hpp.
| MagAOX::app::dev::edtCamera< derivedT >::edtCamera | ( | ) |
C'tor, sets up stdCamera.
Definition at line 247 of file edtCamera.hpp.
|
noexcept |
Destructor, destroys the PdvDev structure.
Definition at line 253 of file edtCamera.hpp.
| 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 478 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 497 of file edtCamera.hpp.
Referenced by 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 465 of file edtCamera.hpp.
|
inlineprivate |
Definition at line 240 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 451 of file edtCamera.hpp.
References MagAOX::app::dev::ioDevice::loadConfig().
Referenced by MagAOX::app::andorCtrl::loadConfig(), and MagAOX::app::ocam2KCtrl::loadConfig().
| 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 485 of file edtCamera.hpp.
| int MagAOX::app::dev::edtCamera< derivedT >::pdvAcquire | ( | timespec & | currImageTimestamp | ) |
Definition at line 511 of file edtCamera.hpp.
| 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 326 of file edtCamera.hpp.
References flatlogs::logPrio::LOG_ERROR, and flatlogs::logPrio::LOG_INFO.
| int MagAOX::app::dev::edtCamera< derivedT >::pdvReconfig | ( | ) |
Definition at line 527 of file edtCamera.hpp.
References flatlogs::logPrio::LOG_ERROR.
| int MagAOX::app::dev::edtCamera< derivedT >::pdvSerialWriteRead | ( | std::string & | response, |
| const std::string & | command | ||
| ) |
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 |
Definition at line 264 of file edtCamera.hpp.
References MAGAOX_PDV_SERBUFSIZE.
| int MagAOX::app::dev::edtCamera< derivedT >::pdvStartAcquisition | ( | ) |
Definition at line 503 of file edtCamera.hpp.
| 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 441 of file edtCamera.hpp.
References MagAOX::app::dev::ioDevice::setupConfig().
Referenced by MagAOX::app::andorCtrl::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 546 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 491 of file edtCamera.hpp.
|
protected |
The camera type according to the framegrabber.
Definition at line 89 of file edtCamera.hpp.
|
protected |
EDT PDV board channel number.
Definition at line 69 of file edtCamera.hpp.
|
protected |
The image data grabbed.
Definition at line 80 of file edtCamera.hpp.
|
protected |
EDT PDV DMA buffer size, indicating number of images.
Definition at line 70 of file edtCamera.hpp.
|
protected |
The EDT PDV device handle.
Definition at line 78 of file edtCamera.hpp.
|
protected |
The bit-depth of the frame, according to the framegrabber.
Definition at line 88 of file edtCamera.hpp.
|
protected |
The height of the frame, according to the framegrabber.
Definition at line 86 of file edtCamera.hpp.
|
protected |
The width of the frame, according to the framegrabber.
Definition at line 87 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 68 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().