Developer Application Interface (ARC API) v3.6.2
ARC, Inc. GenII/III Application Interface
arc::gen3::CArcDevice Class Referenceabstract

#include <CArcDevice.h>

Inheritance diagram for arc::gen3::CArcDevice:
arc::gen3::CArcPCIBase arc::gen3::CArcPCI arc::gen3::CArcPCIe

Public Member Functions

 CArcDevice (void)
 
virtual ~CArcDevice (void)=default
 
virtual constexpr std::string_view toString (void)=0
 
virtual bool isOpen (void) noexcept
 
virtual void open (const std::uint32_t uiDeviceNumber=0)=0
 
virtual void open (const std::uint32_t uiDeviceNumber, const std::uint32_t uiBytes)=0
 
virtual void open (const std::uint32_t uiDeviceNumber, const std::uint32_t uiRows, const std::uint32_t uiCols)=0
 
virtual void close (void)=0
 
virtual void reset (void)=0
 
virtual void mapCommonBuffer (const std::size_t uiBytes=0)=0
 
virtual void unMapCommonBuffer (void)=0
 
virtual void reMapCommonBuffer (const std::uint32_t uiBytes=0)
 
virtual void fillCommonBuffer (const std::uint16_t uwValue=0)
 
virtual std::uint8_t * commonBufferVA (void)
 
virtual std::uint64_t commonBufferPA (void)
 
virtual std::uint64_t commonBufferSize (void)
 
virtual std::uint32_t getId (void)=0
 
virtual std::uint32_t getStatus (void)=0
 
virtual void clearStatus (void)=0
 
virtual void set2xFOTransmitter (bool bOnOff)=0
 
virtual void loadDeviceFile (const std::filesystem::path &tFile)=0
 
virtual std::uint32_t command (const std::initializer_list< const std::uint32_t > &tCmdList)=0
 
virtual void command (const std::initializer_list< const std::uint32_t > &tCmdList, std::uint32_t uiExpectedReply)
 
virtual std::uint32_t getControllerId (void)=0
 
virtual void resetController (void)=0
 
virtual bool isControllerConnected (void)=0
 
virtual void setupController (bool bReset, bool bTdl, bool bPower, const std::uint32_t uiRows, const std::uint32_t uiCols, const std::filesystem::path &tTimFile, const std::filesystem::path &tUtilFile=std::filesystem::path(), const std::filesystem::path &tPciFile=std::filesystem::path(), bool *pAbort=nullptr)
 
virtual void loadControllerFile (const std::filesystem::path &tFilename, bool bValidate=true, bool *pAbort=nullptr)
 
virtual void setImageSize (const std::uint32_t uiRows, const std::uint32_t uiCols)
 
virtual std::uint32_t getImageRows (void)
 
virtual std::uint32_t getImageCols (void)
 
virtual std::uint32_t getCCParams (void)
 
virtual bool isCCParamSupported (const std::uint32_t uiParameter)
 
virtual bool isCCD (void)
 
virtual bool isBinningSet (void)
 
virtual void setBinning (const std::uint32_t uiRows, const std::uint32_t uiCols, const std::uint32_t uiRowFactor, const std::uint32_t uiColFactor, std::uint32_t *pBinRows=nullptr, std::uint32_t *pBinCols=nullptr)
 
virtual void unSetBinning (const std::uint32_t uiRows, const std::uint32_t uiCols)
 
virtual void setSubArray (std::uint32_t &uiOldRows, std::uint32_t &uiOldCols, const std::uint32_t uiRow, const std::uint32_t uiCol, const std::uint32_t uiSubRows, const std::uint32_t uiSubCols, const std::uint32_t uiBiasOffset, const std::uint32_t uiBiasWidth)
 
virtual void unSetSubArray (const std::uint32_t uiRows, const std::uint32_t uiCols)
 
virtual bool isSyntheticImageMode (void)
 
virtual void setSyntheticImageMode (bool bMode)
 
virtual void setOpenShutter (bool bShouldOpen)
 
virtual void expose (const float fExpTime, const std::uint32_t uiRows, const std::uint32_t uiCols, const bool *pAbort=nullptr, arc::gen3::CExpIFace *pExpIFace=nullptr, bool bOpenShutter=true)
 
virtual void stopExposure (void)=0
 
virtual void continuous (const std::uint32_t uiRows, const std::uint32_t uiCols, const std::uint32_t uiNumOfFrames, const float fExpTime, const bool *pAbort=nullptr, arc::gen3::CConIFace *pConIFace=nullptr, bool bOpenShutter=true)
 
virtual void stopContinuous (void)
 
virtual bool isReadout (void)=0
 
virtual std::uint32_t getPixelCount (void)=0
 
virtual std::uint32_t getCRPixelCount (void)=0
 
virtual std::uint32_t getFrameCount (void)=0
 
virtual bool containsError (const std::uint32_t uiWord) noexcept
 
virtual bool containsError (const std::uint32_t uiWord, const std::uint32_t uiWordMin, const std::uint32_t uiWordMax) noexcept
 
virtual const std::string getNextLoggedCmd (void)
 
virtual std::uint32_t getLoggedCmdCount (void)
 
virtual void setLogCmds (bool bOnOff) noexcept
 
virtual double getArrayTemperature (void)
 
virtual double getArrayTemperatureDN (void)
 
virtual void setArrayTemperature (double gTempVal)
 
virtual void loadTemperatureCtrlData (const std::filesystem::path &tFilename)
 
virtual void saveTemperatureCtrlData (const std::filesystem::path &tFilename)
 

Static Public Attributes

static constexpr auto CTLR_CMD_MAX = static_cast< std::uint32_t >( 6 )
 
static constexpr auto READ_TIMEOUT = static_cast< std::uint32_t >( 200 )
 
static constexpr auto NOPARAM = static_cast< std::uint32_t >( 0xFF000000 )
 

Protected Member Functions

virtual bool getCommonBufferProperties (void)=0
 
virtual void setDefaultTemperatureValues (void) noexcept
 
virtual double ADUToVoltage (const std::uint32_t uiAdu, bool bArc12=false, bool bHighGain=false) noexcept
 
virtual double voltageToADU (const double gVoltage, bool bArc12=false, bool bHighGain=false) noexcept
 
virtual double calculateAverageTemperature (void)
 
virtual double calculateVoltage (const double gTemperature)
 
virtual double calculateTemperature (const double gVoltage)
 
virtual std::uint32_t getContinuousImageSize (const std::uint32_t uiImageSize)=0
 
virtual std::uint32_t smallCamDLoad (const std::uint32_t uiBoardId, const std::vector< std::uint32_t > *pvData)=0
 
virtual void loadSmallCamControllerFile (const std::filesystem::path &tFilename, bool bValidate, bool *pAbort=nullptr)
 
virtual void loadGen23ControllerFile (const std::filesystem::path &tFilename, bool bValidate, bool *pAbort=nullptr)=0
 
virtual void setByteSwapping (void)=0
 
virtual const std::string formatDLoadString (const std::uint32_t uiReply, const std::uint32_t uiBoardId, const std::vector< std::uint32_t > *pvData)
 

Protected Attributes

double m_gTmpCtrl_DT670Coeff1
 
double m_gTmpCtrl_DT670Coeff2
 
double m_gTmpCtrl_SDAduOffset
 
double m_gTmpCtrl_SDAduPerVolt
 
double m_gTmpCtrl_HGAduOffset
 
double m_gTmpCtrl_HGAduPerVolt
 
double m_gTmpCtrl_SDVoltTolerance
 
double m_gTmpCtrl_SDDegTolerance
 
std::uint32_t m_gTmpCtrl_SDNumberOfReads
 
std::uint32_t m_gTmpCtrl_SDVoltToleranceTrials
 
TmpCtrlCoeff_t m_tTmpCtrl_SD_2_12K
 
TmpCtrlCoeff_t m_tTmpCtrl_SD_12_24K
 
TmpCtrlCoeff_t m_tTmpCtrl_SD_24_100K
 
TmpCtrlCoeff_t m_tTmpCtrl_SD_100_475K
 
arc::gen3::arcDevHandle_t m_hDevice
 
std::unique_ptr< arc::gen3::CArcLogm_pCLog
 
arc::gen3::device::ImgBuf_t m_tImgBuffer
 
std::uint32_t m_uiCCParam
 
bool m_bStoreCmds
 

Detailed Description

ARC PCI/PCIe device class. This is the class for all controller and device driver communications.

See also
arc::gen3::device::CArcDevice

Constructor & Destructor Documentation

◆ CArcDevice()

arc::gen3::CArcDevice::CArcDevice ( void  )

Default constructor

◆ ~CArcDevice()

virtual arc::gen3::CArcDevice::~CArcDevice ( void  )
virtualdefault

Default destructor

Member Function Documentation

◆ ADUToVoltage()

double arc::gen3::CArcDevice::ADUToVoltage ( const std::uint32_t  uiAdu,
bool  bArc12 = false,
bool  bHighGain = false 
)
protectedvirtualnoexcept

Calculates the voltage associated with the specified digital number (adu). There is a different calculation for SmallCam, which can be specified via the parameters.

Parameters
uiADU- The digital number to use for the voltage calculation.
bArc12- true to use the SmallCam calculation (default = false).
bHighGain- true if High Gain is used (default = false).

◆ calculateAverageTemperature()

double arc::gen3::CArcDevice::calculateAverageTemperature ( void  )
protectedvirtual

Calculates the average array temperature.

Returns
The average temperature value ( in Celcius ). The temperature is read m_gTmpCtrl_SDNumberOfReads times and averaged. Also, for a read to be included in the average the difference between the target temperature and the actual temperature must be less than the tolerance specified by m_gTmpCtrl_SDDegTolerance (default = 3.0 degrees celcius).
Exceptions
std::runtime_error

◆ calculateTemperature()

double arc::gen3::CArcDevice::calculateTemperature ( const double  gVoltage)
protectedvirtual

Calculates the silicon diode temperature using a voltage ( converted digital number read from the controller ) and a Chebychev polynomial series.

Parameters
gVoltage- The voltage to use for the temperature calculation.
Returns
The temperature, in Celcius, as calculated from the specified voltage.
Exceptions
std::rumtime_error

◆ calculateVoltage()

double arc::gen3::CArcDevice::calculateVoltage ( const double  gTemperature)
protectedvirtual

Calculates the voltage using the specified temperature. The voltage is determined using the number of trials specified by m_gTmpCtrl_SDVoltToleranceTrials. Also, the difference between the target temperature and the actual must be less than the tolerance specified by m_gTmpCtrl_SDVoltTolerance.

Parameters
gTemperature- The temperature to use for the calculation.
Returns
The voltage as calculated from the specified temperature.
Exceptions
std::runtime_error

◆ clearStatus()

virtual void arc::gen3::CArcDevice::clearStatus ( void  )
pure virtual

Clears the PCI/PCIe board status register.

Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ close()

virtual void arc::gen3::CArcDevice::close ( void  )
pure virtual

Closes the ARC PCI/PCIe device connection

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ command() [1/2]

virtual std::uint32_t arc::gen3::CArcDevice::command ( const std::initializer_list< const std::uint32_t > &  tCmdList)
pure virtual

Send a command to the controller.

Parameters
tCmdList- The command and any arguments to be sent. The command should be the first value, followed by any arguments. e.g. cmd arg0 arg1 etc.
Returns
The controller status reply. Will return the ascii value 'DON' on success, 'ERR' on error, or 'TOUT' on timeout. The timeout value derives from the device driver, while done and error derive from the controller.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ command() [2/2]

void arc::gen3::CArcDevice::command ( const std::initializer_list< const std::uint32_t > &  tCmdList,
std::uint32_t  uiExpectedReply 
)
virtual

Send a command to the controller and verify the reply.

Parameters
tCmdList- The command and any arguments to be sent. The command should be the first value, followed by any arguments. e.g. cmd arg0 arg1 etc.
uiExpectedReply- The expected controller reply
Exceptions
std::runtime_error

◆ commonBufferPA()

std::uint64_t arc::gen3::CArcDevice::commonBufferPA ( void  )
virtual

Returns the kernel image buffer physical address. The returned value should never be accessed by the user. This value is for informational purposes only.

Returns
The kernel image buffer physical address.

◆ commonBufferSize()

std::uint64_t arc::gen3::CArcDevice::commonBufferSize ( void  )
virtual

Returns the kernel image buffer size (in bytes). return The kernel image buffer size (in bytes).

◆ commonBufferVA()

std::uint8_t * arc::gen3::CArcDevice::commonBufferVA ( void  )
virtual

Returns the kernel image buffer virtual address. The returned value can be used to access the image data.

Returns
A pointer to the kernel image buffer.

◆ containsError() [1/2]

bool arc::gen3::CArcDevice::containsError ( const std::uint32_t  uiWord)
virtualnoexcept

Returns whether or not the specified parameter contains one of the error status codes (i.e. 'ERR', 'TOUT', etc).

Parameters
uiWord- The value to check for error status codes. This is typically a command reply value.
Returns
true if an error status code was found; false otherwise.

◆ containsError() [2/2]

bool arc::gen3::CArcDevice::containsError ( const std::uint32_t  uiWord,
const std::uint32_t  uiWordMin,
const std::uint32_t  uiWordMax 
)
virtualnoexcept

Returns whether or not the specified value falls within the specified range.

Parameters
uiWord- The value to range check
uiWordMin- The lower range value (inclusive)
uiWordMax- The upper range value (inclusive)
Returns
true if the specified value falls outside the specified range; false otherwise.

◆ continuous()

void arc::gen3::CArcDevice::continuous ( const std::uint32_t  uiRows,
const std::uint32_t  uiCols,
const std::uint32_t  uiNumOfFrames,
const float  fExpTime,
const bool *  pAbort = nullptr,
arc::gen3::CConIFace pConIFace = nullptr,
bool  bOpenShutter = true 
)
virtual

Start continuous image aquisition.

Parameters
uiRows- The image row size ( in pixels ).
uiCols- The image column size ( in pixels ).
uiNumOfFrames- The number of image frames to read.
fExpTime- The exposure time ( in seconds ).
pAbort- Pointer to a boolean value that can be used to cancel the exposure/readout (default = nullptr).
pConIFace- Function pointer to a CConIFace object, whose methods are called to provide frame completion updates (default = nullptr).
bOpenShutter- Set to true if the shutter should open during the exposure. Set to false to keep the shutter closed (default = true).
Exceptions
std::runtime_error

◆ expose()

void arc::gen3::CArcDevice::expose ( const float  fExpTime,
const std::uint32_t  uiRows,
const std::uint32_t  uiCols,
const bool *  pAbort = nullptr,
arc::gen3::CExpIFace pExpIFace = nullptr,
bool  bOpenShutter = true 
)
virtual

Start image aquisition

Parameters
fExpTime- The exposure time ( in seconds ).
uiRows- The image row size ( in pixels ).
uiCols- The image column size ( in pixels ).
pAbort- Pointer to a boolean value that can be used to cancel the exposure/readout (default = nullptr).
pExpIFace- Function pointer to a CExpIFace object, whose methods are called during exposure and readout to provide exposure time and pixel count updates (default = nullptr).
bOpenShutter- Set to true if the shutter should open during the exposure. Set to false to keep the shutter closed (default = true).
Exceptions
std::runtime_error

◆ fillCommonBuffer()

void arc::gen3::CArcDevice::fillCommonBuffer ( const std::uint16_t  uwValue = 0)
virtual

Fill the kernel image buffer with the specified value. uwValue - The unsigned 16-bit value used to fill the image buffer (default = 0 ). throws std::invalid-argument

◆ formatDLoadString()

const std::string arc::gen3::CArcDevice::formatDLoadString ( const std::uint32_t  uiReply,
const std::uint32_t  uiBoardId,
const std::vector< std::uint32_t > *  pvData 
)
protectedvirtual

Bundle command values into a std::string that can be used to throw a std::runtime_error exception.

Parameters
uiReply- The controller command reply
uiBoardId- The board id
pvData- The controller command data in the format: command, argument 0, argument 1, etc.
Returns
A command and reply string formatted as follows: "[0xheader, 0xcommand, 0xargument, ... -> 0xreply]"
Exceptions
std::runtime_error

◆ getArrayTemperature()

double arc::gen3::CArcDevice::getArrayTemperature ( void  )
virtual

Returns the current array temperature in degrees celcuis. The temperature is read m_gTmpCtrl_SDNumberOfReads times and averaged. Also, for a read to be included in the average, the difference between the target temperature and the actual temperature must be less than the tolerance specified by gTmpCtrl_SDTolerance.

Returns
The current array temperature in celcius.
Exceptions
std::runtime_error

◆ getArrayTemperatureDN()

double arc::gen3::CArcDevice::getArrayTemperatureDN ( void  )
virtual

Returns the digital number associated with the current array temperature value.

Returns
The current array temperature digital number.
Exceptions
std::runtime_error

◆ getCCParams()

std::uint32_t arc::gen3::CArcDevice::getCCParams ( void  )
virtual

Returns the controller configuration parameters enable bits. Each bit or set of bits represents a feature available in the controller. The ArcDefs.h file contains the bit definitions. The bit definitions are as follows:

BIT #'s FUNCTION


2,1,0 Video Processor 000 ARC-41 Dual Readout CCD 001 CCD Gen I 010 ARC-42 Dual Readout IR 011 ARC-44 Four Readout IR Coadder ( obsolete ) 100 ARC-45 Dual Readout CCD 101 ARC-46 8-Channel IR 110 ARC-48 8-Channel CCD 111 ARC-47 4-Channel CCD

4,3 Timing Board 00 Rev. 4, Gen II 01 Gen I 10 Rev. 5, Gen III, 250 MHz

6,5 Utility Board 00 No utility board 01 Utility Rev. 3

7 Shutter 0 No shutter support 1 Yes shutter support

9,8 Temperature readout 00 No temperature readout 01 Polynomial Diode calibration 10 Linear temperature sensor calibration

10 Subarray readout 0 Not supported 1 Yes supported

11 Binning 0 Not supported 1 Yes supported

12 Split-Serial readout 0 Not supported 1 Yes supported

13 Split-Parallel readout 0 Not supported 1 Yes supported

14 MPP = Inverted parallel clocks 0 Not supported 1 Yes supported

16,15 Clock Driver Board 00 Rev. 3 11 No clock driver board (Gen I)

19,18,17 Special implementations 000 Somewhere else 001 Mount Laguna Observatory 010 NGST Aladdin 011 2x FO Transmitter xxx Other

20 Continuous readout 0 Not supported 1 Yes supported

21 Selectable readout speeds

See also
ArcDefs.h
Returns
The controller configuration parameter dword value
Exceptions
std::runtime_error

◆ getCommonBufferProperties()

virtual bool arc::gen3::CArcDevice::getCommonBufferProperties ( void  )
protectedpure virtual

Internally fills the kernel image buffer physical address and size from the device driver.

Returns
true if the properties were successfully read from the driver; false on error.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ getContinuousImageSize()

virtual std::uint32_t arc::gen3::CArcDevice::getContinuousImageSize ( const std::uint32_t  uiImageSize)
protectedpure virtual

Returns the boundary adjusted image size for continuous readout. Some interface cards require the data to be written on the start of a specific byte boundary. See the PCI/PCIe headers for specific information on that device.

Parameters
uiImageSize- The image size, in bytes, that will be adjusted to meet the needs of the specific device.
Returns
The adjusted image size for any device specific boundary conditions.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCIe.

◆ getControllerId()

virtual std::uint32_t arc::gen3::CArcDevice::getControllerId ( void  )
pure virtual

Returns the controller id. The returned value will identify the controller as GenII, GenIII or SmallCam.

Returns
Returns ascii 'SC0' for SmallCam or the controller id or ascii 'ERR' if no id exists.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ getCRPixelCount()

virtual std::uint32_t arc::gen3::CArcDevice::getCRPixelCount ( void  )
pure virtual

Returns the cumulative pixel count across all frames read while in continuous readout mode.

Returns
The cumulative continuous readout pixel count.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ getFrameCount()

virtual std::uint32_t arc::gen3::CArcDevice::getFrameCount ( void  )
pure virtual

Returns the current continuous readout frame count. The controller must be in continuous readout mode Note: this method will log the value if logging is enabled.

Returns
The current frame count.

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ getId()

virtual std::uint32_t arc::gen3::CArcDevice::getId ( void  )
pure virtual

Returns the PCI/PCIe board id.

Returns
Returns a unique identifier for the PCI/PCIe board.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ getImageCols()

std::uint32_t arc::gen3::CArcDevice::getImageCols ( void  )
virtual

Returns the image column dimension in pixels from the controller.

Returns
The image column size in pixels
Exceptions
std::runtime_error

◆ getImageRows()

std::uint32_t arc::gen3::CArcDevice::getImageRows ( void  )
virtual

Returns the image row dimension in pixels from the controller.

Returns
The image row size in pixels
Exceptions
std::runtime_error

◆ getLoggedCmdCount()

std::uint32_t arc::gen3::CArcDevice::getLoggedCmdCount ( void  )
virtual

Returns the number of messages remaining in the command logger.

Returns
The command logger message count.

◆ getNextLoggedCmd()

const std::string arc::gen3::CArcDevice::getNextLoggedCmd ( void  )
virtual

Pops and returns the next logged message from the command logger.

Returns
The next message in the command logger or an empty string if there are no more messages.

◆ getPixelCount()

virtual std::uint32_t arc::gen3::CArcDevice::getPixelCount ( void  )
pure virtual

Returns the current pixel count during image aquisition. Note: this method will log the value if logging is enabled.

Returns
The current pixel count
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ getStatus()

virtual std::uint32_t arc::gen3::CArcDevice::getStatus ( void  )
pure virtual

Returns the PCI/PCIe board status. The content and meaning of the returned value depends upon which board is being used.

Returns
The PCI/PCIe board status
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ isBinningSet()

bool arc::gen3::CArcDevice::isBinningSet ( void  )
virtual

Returns whether or not binning is enalbed on the controller

Returns
true if binning is enabled on the controller; false otherwise.
Exceptions
std::runtime_error

◆ isCCD()

bool arc::gen3::CArcDevice::isCCD ( void  )
virtual

Returns whether or not the controller controller contains a CCD or infrared video processor.

Returns
true if the controller contains a CCD video processor; false for infrared.
Exceptions
std::runtime_error

◆ isCCParamSupported()

bool arc::gen3::CArcDevice::isCCParamSupported ( const std::uint32_t  uiParameter)
virtual

Returns whether or not a specific controller parameter is supported.

Parameters
uiParameter- A valid contoller parameter as defined in the ArcDefs.h file. For example, use SUBARRAY from the ArcDefs.h file to check if the controller supports the sub-array feature.
Returns
true if the specified parameter value is supported by the controller; false otherwise.
Exceptions
std::runtime_error

◆ isControllerConnected()

virtual bool arc::gen3::CArcDevice::isControllerConnected ( void  )
pure virtual

Returns whether or not a controller is connected and powered-on.

Returns
true if a controller is connected; false otherwise.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ isOpen()

bool arc::gen3::CArcDevice::isOpen ( void  )
virtualnoexcept

Returns whether or not an ARC PCI/PCIe device has been opened ( i.e. if the open() method has been called ).

Returns
true if the open() method has been successfully called; false otherwise.

Reimplemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ isReadout()

virtual bool arc::gen3::CArcDevice::isReadout ( void  )
pure virtual

Returns whether or not image readout is in progress.

Returns
true if the controller is currently reading out image pixels; false otherwise.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ isSyntheticImageMode()

bool arc::gen3::CArcDevice::isSyntheticImageMode ( void  )
virtual

Returns whether or not the controller is in synthetic mode. A synthetic image is one that is generated by the timing board DSP, not the video board, and has the following pattern: 0, 1, 2, ..., 65535, 0, 1, 2, ..., 65353, etc.

Returns
true if the controller is in synthetic mode; false otherwise.
Exceptions
std::runtime_error

◆ loadControllerFile()

void arc::gen3::CArcDevice::loadControllerFile ( const std::filesystem::path &  tFilename,
bool  bValidate = true,
bool *  pAbort = nullptr 
)
virtual

Loads the specified timing, utility or smallCam firmware file onto the controller.

Parameters
tFilename- The DSP firmware timing file to load.
bValidate- truw to validate each write by following it with a read and compare; false to not validate ( default = true ).
pAbort- Pointer used to cancel execution ( default = nullptr ).
Exceptions
std::runtime_error

◆ loadDeviceFile()

virtual void arc::gen3::CArcDevice::loadDeviceFile ( const std::filesystem::path &  tFile)
pure virtual

Load a PCI/PCIe DSP firmware file.

Parameters
tFile- A valid PCI/PCIe DSP firmware file.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ loadGen23ControllerFile()

virtual void arc::gen3::CArcDevice::loadGen23ControllerFile ( const std::filesystem::path &  tFilename,
bool  bValidate,
bool *  pAbort = nullptr 
)
protectedpure virtual

Loads a timing or utility file (.lod) into a GenII or GenIII controller.

Parameters
tFilename- The TIM or UTIL lod file to load.
bValidate- true if the download should be read back and checked after every write; false to not check.
pAbort- true to cancel execution; false otherwise (default = nullptr).
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCIe.

◆ loadSmallCamControllerFile()

void arc::gen3::CArcDevice::loadSmallCamControllerFile ( const std::filesystem::path &  tFilename,
bool  bValidate,
bool *  pAbort = nullptr 
)
protectedvirtual

Loads a timing or utility file (.lod) into a SmallCam controller.

Parameters
tFilename- The TIM or UTIL lod file to load.
bValidate- true if the download should be read back and checked after every write; false to not check.
pAbort- true to cancel execution; false otherwise (default = nullptr).
Exceptions
std::runtime_error

◆ loadTemperatureCtrlData()

void arc::gen3::CArcDevice::loadTemperatureCtrlData ( const std::filesystem::path &  tFilename)
virtual

Loads temperature control constants from the specified file. The default constants are stored in TempCtrl.h and cannot be permanently overwritten.

Parameters
tFilename- The file that contains the temperature control constant values.
Exceptions
std::runtime_error
std::invalid_argument

◆ mapCommonBuffer()

virtual void arc::gen3::CArcDevice::mapCommonBuffer ( const std::size_t  uiBytes = 0)
pure virtual

Maps the specified number of bytes from the kernel image buffer into user space. uiBytes - The number of bytes to map from the kernel image buffer. This value must not exceed the actual size of the buffer, which is 4200x4200x2 bytes by default (default = 0).

Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ open() [1/3]

virtual void arc::gen3::CArcDevice::open ( const std::uint32_t  uiDeviceNumber,
const std::uint32_t  uiBytes 
)
pure virtual

Open a connection to the specified ARC PCI/PCIe device. This method maps all or part of the kernel image buffer into user space.

Parameters
uiDeviceNumber- The device driver number 0 to N ( default = 0 ). Use 0 for a single ARC PCI/PCIe board.
uiBytes- The number of bytes to map from the kernel image buffer. This value must not exceed the actual size of the buffer, which is 4200x4200x2 bytes by default.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ open() [2/3]

virtual void arc::gen3::CArcDevice::open ( const std::uint32_t  uiDeviceNumber,
const std::uint32_t  uiRows,
const std::uint32_t  uiCols 
)
pure virtual

Open a connection to the specified ARC PCI/PCIe device. This method maps all or part of the kernel image buffer into user space.

Parameters
uiDeviceNumber- The device driver number 0 to N ( default = 0 ). Use 0 for a single ARC PCI/PCIe board.
uiRows- The number of rows to map from the kernel image buffer. This value must not exceed the default row size of the default kernel buffer row size of 4200 pixels.
uiCols- The number of columns to map from the kernel image buffer. This value must not exceed the default column size of the default kernel buffer column size of 4200 pixels.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ open() [3/3]

virtual void arc::gen3::CArcDevice::open ( const std::uint32_t  uiDeviceNumber = 0)
pure virtual

Open a connection to the specified ARC PCI/PCIe device. This method does not map the kernel image buffer into user space.

Parameters
uiDeviceNumber- The device driver number 0 to N ( default = 0 ). Use 0 for a single ARC PCI/PCIe board.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ reMapCommonBuffer()

void arc::gen3::CArcDevice::reMapCommonBuffer ( const std::uint32_t  uiBytes = 0)
virtual

Re-maps the kernel image buffer into user space by first calling unMapCommonBuffer(), then calling mapCommonBuffer(). This is purely a convenience method to change the user space mapped size of the kernel image buffer. uiBytes - The number of bytes to map from the kernel image buffer. This value must not exceed the actual size of the buffer, which is 4200x4200x2 bytes by default (default = 0).

See also
mapCommonBuffer
unMapCommonBuffer
Exceptions
std::runtime_error

◆ reset()

virtual void arc::gen3::CArcDevice::reset ( void  )
pure virtual

Reset the ARC PCI/PCIe device

Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ resetController()

virtual void arc::gen3::CArcDevice::resetController ( void  )
pure virtual

Resets the controller by disabling power to the boards and reloading the DSP boot code from ROM.

Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ saveTemperatureCtrlData()

void arc::gen3::CArcDevice::saveTemperatureCtrlData ( const std::filesystem::path &  tFilename)
virtual

Saves the current temperature control constants to the specified file. These may be different from the values in TempCtrl.h if another temperature control file has been previously loaded.

Parameters
tFilename- The file in which to write the temperature control data.
Exceptions
std::runtime_error

◆ set2xFOTransmitter()

virtual void arc::gen3::CArcDevice::set2xFOTransmitter ( bool  bOnOff)
pure virtual

Enables or disables the second fiber optic transmitter on supporting timing boards.

Parameters
bOnOff- true to tnable the second transmitter; false otherwise.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ setArrayTemperature()

void arc::gen3::CArcDevice::setArrayTemperature ( double  gTempVal)
virtual

Set the temperature that the array should be regulated around.

Parameters
gTempVal- The temperature, in celcius, that the array should be regulated around.
Exceptions
std::runtime_error

◆ setBinning()

void arc::gen3::CArcDevice::setBinning ( const std::uint32_t  uiRows,
const std::uint32_t  uiCols,
const std::uint32_t  uiRowFactor,
const std::uint32_t  uiColFactor,
std::uint32_t *  pBinRows = nullptr,
std::uint32_t *  pBinCols = nullptr 
)
virtual

Enable binning on the controller by setting the binning factors. Binning causes each axis to combine xxxFactor number of pixels. For example, if rows = 1000, cols = 1000, rowFactor = 2 and colFactor = 4, then binRows = 500 and binCols = 250.

Parameters
uiRows- The pre-binning number of rows.
uiCols- The pre-binning number of columns.
uiRowFactor- The row binning factor. i.e. the number of row pixels to combine.
uiColFactor- The column binning factor. i.e. the number of column pixels to combine.
pBinRows- An optional pointer to receive the new binned image row pixel dimension (default = nullptr).
pBinCols- An optional pointer to receive the new binned image column pixel dimension (default = nullptr).
Exceptions
std::runtime_error

◆ setByteSwapping()

virtual void arc::gen3::CArcDevice::setByteSwapping ( void  )
protectedpure virtual

This is an outdated method purely left in for compatability. This turns the PCI hardware byte-swapping on if system architecture is solaris. Otherwise, does nothing; compiles to empty method and will likely be optimized out by the compiler.

Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCIe.

◆ setDefaultTemperatureValues()

void arc::gen3::CArcDevice::setDefaultTemperatureValues ( void  )
protectedvirtualnoexcept

Initializes the default array temperature settings. Called from class constructor.

◆ setImageSize()

void arc::gen3::CArcDevice::setImageSize ( const std::uint32_t  uiRows,
const std::uint32_t  uiCols 
)
virtual

Set the image dimensions on the controller. This method will auto re-map the image buffer if the new dimensions exceed the exising map size but are less than the maximum buffer size.

Parameters
uiRows- The number of pixel rows in the image.
uiCols- The number of pixel columns in the image.
Exceptions
std::runtime_error

◆ setLogCmds()

void arc::gen3::CArcDevice::setLogCmds ( bool  bOnOff)
virtualnoexcept

Turns command logging on/off. Command logging will slow the execution of any method implementing it. This logging can be used for debugging to see command details in the following form: <header> <cmd> <arg1> ... <arg4> -> <controller reply>

Example: 0x203 TDL 0x112233 -> 0x444E4F

Parameters
bOnOff- true to enable command logging; false to disable.

◆ setOpenShutter()

void arc::gen3::CArcDevice::setOpenShutter ( bool  bShouldOpen)
virtual

Enable or disable the shutter on expose.

Parameters
bShouldOpen- true if the shutter should open during the exposure; false to keep the shutter closed (i.e. dark frame). throws std::runtime_error

◆ setSubArray()

void arc::gen3::CArcDevice::setSubArray ( std::uint32_t &  uiOldRows,
std::uint32_t &  uiOldCols,
const std::uint32_t  uiRow,
const std::uint32_t  uiCol,
const std::uint32_t  uiSubRows,
const std::uint32_t  uiSubCols,
const std::uint32_t  uiBiasOffset,
const std::uint32_t  uiBiasWidth 
)
virtual

Sets the controller to sub-array mode, which allows the user to read a sub-section of the array and bias regions.

+--------------------—+---------—+ | | | | BOX | BIAS | |<-------------—5----—> | | <–4--> | | | | +----—+^ | +----—+ | | | || | | | | |<---—|-->2 |3 | |<–6-->| | | | ^ || | | | |

+— —+v +----—+

| 1 | | | | | | | v | | +--------------------—+---------—+

Parameters
uiOldRows- Returns the original row size currently set on the controller
uiOldCols- Returns the original col size currently set on the controller
uiRow- The row number of the center of the sub-array in pixels (see #1 in the above figure)
uiCol- The col number of the center of the sub-array in pixels (see #2 in the above figure)
uiSubRows- The sub-array row count in pixels (see #3 in the above figure)
uiSubCols- The sub-array col count in pixels (see #4 in the above figure)
uiBiasOffset- The offset of the bias region in pixels (see #5 in the above figure)
uiBiasCols- The col count of the bias region in pixels (see #6 in the above figure)
throwsstd::runtime_error

◆ setSyntheticImageMode()

void arc::gen3::CArcDevice::setSyntheticImageMode ( bool  bMode)
virtual

Enables or disable synthetic image mode on the controller. A synthetic image is one that is generated by the timing board DSP, not the video board, and has the following pattern: 0, 1, 2, ..., 65535, 0, 1, 2, ..., 65353, etc.

Parameters
bMode- true to enable synthetic image mode; false to disable.
Exceptions
std::runtime_error

◆ setupController()

void arc::gen3::CArcDevice::setupController ( bool  bReset,
bool  bTdl,
bool  bPower,
const std::uint32_t  uiRows,
const std::uint32_t  uiCols,
const std::filesystem::path &  tTimFile,
const std::filesystem::path &  tUtilFile = std::filesystem::path(),
const std::filesystem::path &  tPciFile = std::filesystem::path(),
bool *  pAbort = nullptr 
)
virtual

Initializes the controller, which must be attached to an ARC PCI/PCIe and powered on. An optional data link test, which verifies that the communications link between the host computer and the controller is also available. Any test command sent after the file load will be processed by the controller timing board on-board processor. Prior to this, the tests will be processed by the controller timing board hardware itself. With a test data link value of zero this method is identical to calling loadFile.

Parameters
bReset- true to reset the controller; false otherwise.
bTdl- true to test the PCI/PCIe-controller data link; false otherwise. Which board are tested depends on which board DSP files are uploaded. For example, if a timing file is uploaded, then the data link to the timing board is tested.
bPower- true to power-on the controller; false otherwise.
uiRows- The number of image rows to be used by the controller.
uiCold- The number of image columns to be used by the controller.
tTimFile- The DSP firmware timing board file to upload to the controller.
tUtilFile- The DSP firmware utility board file to upload to the controller (optional, not used by default).
tPciFile- The DSP firmware ARC-64 PCI board file to upload (optional, not used by default).
pAbort- A pointer to a boolean that can be used to cancel execution (default = nullptr ).
Exceptions
std::runtime_error

◆ smallCamDLoad()

virtual std::uint32_t arc::gen3::CArcDevice::smallCamDLoad ( const std::uint32_t  uiBoardId,
const std::vector< std::uint32_t > *  pvData 
)
protectedpure virtual

Sends a DSP firmware (.lod) file data stream of up to six values to the SmallCam controller.

Parameters
uiBoardId- Must be SMALLCAM_DLOAD_ID
pvData- Data vector of up to six download values
Returns
The controller reply value. Typically 'DON' or 'ERR'.
Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCIe.

◆ stopContinuous()

void arc::gen3::CArcDevice::stopContinuous ( void  )
virtual

Attempts to stop the current frame aquisition and set the controller back to single image aquisition.

Exceptions
std::runtime_error

◆ stopExposure()

virtual void arc::gen3::CArcDevice::stopExposure ( void  )
pure virtual

Attempts to stop the current exposure

Exceptions
std::runtime_error

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ toString()

virtual constexpr std::string_view arc::gen3::CArcDevice::toString ( void  )
constexprpure virtual

Returns a textual representation of the class.

Returns
A string representation of the class.

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ unMapCommonBuffer()

virtual void arc::gen3::CArcDevice::unMapCommonBuffer ( void  )
pure virtual

Un-maps the kernel image buffer from user space. The buffer should not be accessed once it's un-mapped.

Exceptions
std::invalid_argument

Implemented in arc::gen3::CArcPCI, and arc::gen3::CArcPCIe.

◆ unSetBinning()

void arc::gen3::CArcDevice::unSetBinning ( const std::uint32_t  uiRows,
const std::uint32_t  uiCols 
)
virtual

Disable binning on the controller and set the image dimensions to the specified size, which is typically a previously saved image dimension.

Parameters
uiRows- The new image row size
uiCols- The new image column size
Exceptions
std::runtime_error

◆ unSetSubArray()

void arc::gen3::CArcDevice::unSetSubArray ( const std::uint32_t  uiRows,
const std::uint32_t  uiCols 
)
virtual

Disable sub-array mode on the controller

Parameters
uiRows- The new image row dimension to set on the controller (typically a previously saved value)
uiCols- The new image column dimension to set on the controller (typically a previously saved value)
Exceptions
std::runtimer_error

◆ voltageToADU()

double arc::gen3::CArcDevice::voltageToADU ( const double  gVoltage,
bool  bArc12 = false,
bool  bHighGain = false 
)
protectedvirtualnoexcept

Calculates the digital number (adu) associated with the specified voltage. There is a different calculation for SmallCam, which can be specified via the parameters.

Parameters
gVoltage- The voltage to use for the calculation.
bArc12- true to use the SmallCam calculation (default = false).
bHighGain- true if High Gain is used (default = false).

Member Data Documentation

◆ CTLR_CMD_MAX

constexpr auto arc::gen3::CArcDevice::CTLR_CMD_MAX = static_cast< std::uint32_t >( 6 )
staticconstexpr

Maximum number of command parameters the controller will accept

◆ m_bStoreCmds

bool arc::gen3::CArcDevice::m_bStoreCmds
protected

true to store commanmd strings in logger

◆ m_gTmpCtrl_DT670Coeff1

double arc::gen3::CArcDevice::m_gTmpCtrl_DT670Coeff1
protected

Temperature Coeffient for DT-670 Sensor

◆ m_gTmpCtrl_DT670Coeff2

double arc::gen3::CArcDevice::m_gTmpCtrl_DT670Coeff2
protected

Temperature Coeffient for DT-670 Sensor

◆ m_gTmpCtrl_HGAduOffset

double arc::gen3::CArcDevice::m_gTmpCtrl_HGAduOffset
protected

ADU offset for high gain utility board

◆ m_gTmpCtrl_HGAduPerVolt

double arc::gen3::CArcDevice::m_gTmpCtrl_HGAduPerVolt
protected

ADU per volt for high gain utility board

◆ m_gTmpCtrl_SDAduOffset

double arc::gen3::CArcDevice::m_gTmpCtrl_SDAduOffset
protected

ADU offset for CY7 Sensor

◆ m_gTmpCtrl_SDAduPerVolt

double arc::gen3::CArcDevice::m_gTmpCtrl_SDAduPerVolt
protected

ADU per volt for CY7 Sensor

◆ m_gTmpCtrl_SDDegTolerance

double arc::gen3::CArcDevice::m_gTmpCtrl_SDDegTolerance
protected

Temerature tolerance for non-linear silicone diode

◆ m_gTmpCtrl_SDNumberOfReads

std::uint32_t arc::gen3::CArcDevice::m_gTmpCtrl_SDNumberOfReads
protected

Number of temperature reads to average for non-linear silicone diode

◆ m_gTmpCtrl_SDVoltTolerance

double arc::gen3::CArcDevice::m_gTmpCtrl_SDVoltTolerance
protected

Voltage tolerance for non-linear silicone diode

◆ m_gTmpCtrl_SDVoltToleranceTrials

std::uint32_t arc::gen3::CArcDevice::m_gTmpCtrl_SDVoltToleranceTrials
protected

Number of voltage tolerance trials for non-linear silicone diode

◆ m_hDevice

arc::gen3::arcDevHandle_t arc::gen3::CArcDevice::m_hDevice
protected

Device driver file descriptor

◆ m_pCLog

std::unique_ptr<arc::gen3::CArcLog> arc::gen3::CArcDevice::m_pCLog
protected

Command logger for debug purposes

◆ m_tImgBuffer

arc::gen3::device::ImgBuf_t arc::gen3::CArcDevice::m_tImgBuffer
protected

Kernel image buffer properties

◆ m_tTmpCtrl_SD_100_475K

TmpCtrlCoeff_t arc::gen3::CArcDevice::m_tTmpCtrl_SD_100_475K
protected

Non-linear silicon diode temperature coefficient

◆ m_tTmpCtrl_SD_12_24K

TmpCtrlCoeff_t arc::gen3::CArcDevice::m_tTmpCtrl_SD_12_24K
protected

Non-linear silicon diode temperature coefficient

◆ m_tTmpCtrl_SD_24_100K

TmpCtrlCoeff_t arc::gen3::CArcDevice::m_tTmpCtrl_SD_24_100K
protected

Non-linear silicon diode temperature coefficient

◆ m_tTmpCtrl_SD_2_12K

TmpCtrlCoeff_t arc::gen3::CArcDevice::m_tTmpCtrl_SD_2_12K
protected

Non-linear silicon diode temperature coefficient

◆ m_uiCCParam

std::uint32_t arc::gen3::CArcDevice::m_uiCCParam
protected

Controller configuration parameters value

◆ NOPARAM

constexpr auto arc::gen3::CArcDevice::NOPARAM = static_cast< std::uint32_t >( 0xFF000000 )
staticconstexpr

Invalid parameter value

◆ READ_TIMEOUT

constexpr auto arc::gen3::CArcDevice::READ_TIMEOUT = static_cast< std::uint32_t >( 200 )
staticconstexpr

Timeout loop count for image readout


The documentation for this class was generated from the following files: