MagAO-X EDT framegrabber interface. More...
#include <edtCamera.hpp>
Public Member Functions | |
edtCamera () | |
C'tor, sets up stdCamera. More... | |
~edtCamera () noexcept | |
Destructor, destroys the PdvDev structure. More... | |
int | pdvSerialWriteRead (std::string &response, const std::string &command) |
Send a serial command over cameralink and retrieve the response. More... | |
int | pdvConfig (std::string &cfgname) |
Configure the EDT framegrabber. More... | |
void | setupConfig (mx::app::appConfigurator &config) |
Setup the configuration system. More... | |
void | loadConfig (mx::app::appConfigurator &config) |
load the configuration system results More... | |
int | appStartup () |
Startup function. More... | |
int | appLogic () |
Application logic. More... | |
int | onPowerOff () |
Actions on power off. More... | |
int | whilePowerOff () |
Actions while powered off. More... | |
int | appShutdown () |
Application the shutdown. More... | |
int | pdvStartAcquisition () |
int | pdvAcquire (timespec &currImageTimestamp) |
int | pdvReconfig () |
INDI | |
int | updateINDI () |
The static callback function to be registered for the channel properties. More... | |
Public Attributes | |
unsigned | m_readTimeout {1000} |
The read timeout [msec]. More... | |
unsigned | m_writeTimeout {1000} |
The write timeout [msec]. More... | |
Protected Attributes | |
PdvDev * | m_pdv {nullptr} |
The EDT PDV device handle. More... | |
u_char * | m_image_p {nullptr} |
The image data grabbed. More... | |
int | m_raw_height {0} |
The height of the frame, according to the framegrabber. More... | |
int | m_raw_width {0} |
The width of the frame, according to the framegrabber. More... | |
int | m_raw_depth {0} |
The bit-depth of the frame, according to the framegrabber. More... | |
std::string | m_cameraType |
The camera type according to the framegrabber. More... | |
Configurable Parameters | |
int | m_unit {0} |
EDT PDV board unit number. More... | |
int | m_channel {0} |
EDT PDV board channel number. More... | |
int | m_numBuffs {4} |
EDT PDV DMA buffer size, indicating number of images. More... | |
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 473 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 492 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 460 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 446 of file edtCamera.hpp.
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 480 of file edtCamera.hpp.
int MagAOX::app::dev::edtCamera< derivedT >::pdvAcquire | ( | timespec & | currImageTimestamp | ) |
Definition at line 506 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 321 of file edtCamera.hpp.
int MagAOX::app::dev::edtCamera< derivedT >::pdvReconfig |
Definition at line 522 of file edtCamera.hpp.
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.
int MagAOX::app::dev::edtCamera< derivedT >::pdvStartAcquisition |
Definition at line 498 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 436 of file edtCamera.hpp.
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 541 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 486 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().