TwiceAsNice
2019-02-18
|
The DetectorDevice class provides functionality of a Detector Device within a Detector. More...
#include <indidetector.h>
Public Member Functions | |
DetectorDevice () | |
~DetectorDevice () | |
int | getBPS () |
getBPS Get Detector depth (bits per sample). More... | |
int | getContinuumBufferSize () |
getContinuumBufferSize Get allocated continuum buffer size to hold the Detector captured stream. More... | |
int | getSpectrumBufferSize () |
getSpectrumBufferSize Get allocated spectrum buffer size to hold the Detector spectrum. More... | |
double | getCaptureLeft () |
getCaptureLeft Get Capture time left in seconds. More... | |
double | getSampleRate () |
getSampleRate Get requested SampleRate for the Detector device in Hz. More... | |
double | getFrequency () |
getSamplingFrequency Get requested Capture frequency for the Detector device in Hz. More... | |
double | getCaptureDuration () |
getCaptureDuration Get requested Capture duration for the Detector device in seconds. More... | |
const char * | getCaptureStartTime () |
getCaptureStartTime More... | |
uint8_t * | getContinuumBuffer () |
getContinuumBuffer Get raw buffer of the continuum stream of the Detector device. More... | |
double * | getSpectrumBuffer () |
getSpectrumBuffer Get raw buffer of the spectrum of the Detector device. More... | |
void | setContinuumBuffer (uint8_t *buffer) |
setContinuumBuffer Set raw frame buffer pointer. More... | |
void | setSpectrumBuffer (double *buffer) |
setSpectrumBuffer Set raw frame buffer pointer. More... | |
INumberVectorProperty * | getDetectorSettings () |
Return Detector Info Property. More... | |
void | setMinMaxStep (const char *property, const char *element, double min, double max, double step, bool sendToClient=true) |
setMinMaxStep for a number property element More... | |
void | setContinuumBufferSize (int nbuf, bool allocMem=true) |
setContinuumBufferSize Set desired continuum buffer size. More... | |
void | setSpectrumBufferSize (int nbuf, bool allocMem=true) |
setSpectrumBufferSize Set desired spectrum buffer size. More... | |
void | setSampleRate (float sr) |
setSampleRate Set depth of Detector device. More... | |
void | setFrequency (float freq) |
setFrequency Set the frequency observed. More... | |
void | setBPS (int bps) |
setBPP Set depth of Detector device. More... | |
void | setCaptureDuration (double duration) |
setCaptureDuration Set desired Detector frame Capture duration for next Capture. More... | |
void | setCaptureLeft (double duration) |
setCaptureLeft Update Capture time left. More... | |
void | setCaptureFailed () |
setCaptureFailed Alert the client that the Capture failed. More... | |
int | getNAxis () const |
void | setNAxis (int value) |
setNAxis Set FITS number of axis More... | |
void | setCaptureExtension (const char *ext) |
setCaptureExtension Set capture exntension More... | |
char * | getCaptureExtension () |
bool | isCapturing () |
DetectorDevice () | |
~DetectorDevice () | |
int | getBPS () |
getBPS Get Detector depth (bits per sample). More... | |
int | getContinuumBufferSize () |
getContinuumBufferSize Get allocated continuum buffer size to hold the Detector captured stream. More... | |
int | getSpectrumBufferSize () |
getSpectrumBufferSize Get allocated spectrum buffer size to hold the Detector spectrum. More... | |
double | getCaptureLeft () |
getCaptureLeft Get Capture time left in seconds. More... | |
double | getSampleRate () |
getSampleRate Get requested SampleRate for the Detector device in Hz. More... | |
double | getFrequency () |
getSamplingFrequency Get requested Capture frequency for the Detector device in Hz. More... | |
double | getCaptureDuration () |
getCaptureDuration Get requested Capture duration for the Detector device in seconds. More... | |
const char * | getCaptureStartTime () |
getCaptureStartTime More... | |
uint8_t * | getContinuumBuffer () |
getContinuumBuffer Get raw buffer of the continuum stream of the Detector device. More... | |
double * | getSpectrumBuffer () |
getSpectrumBuffer Get raw buffer of the spectrum of the Detector device. More... | |
void | setContinuumBuffer (uint8_t *buffer) |
setContinuumBuffer Set raw frame buffer pointer. More... | |
void | setSpectrumBuffer (double *buffer) |
setSpectrumBuffer Set raw frame buffer pointer. More... | |
INumberVectorProperty * | getDetectorSettings () |
Return Detector Info Property. More... | |
void | setMinMaxStep (const char *property, const char *element, double min, double max, double step, bool sendToClient=true) |
setMinMaxStep for a number property element More... | |
void | setContinuumBufferSize (int nbuf, bool allocMem=true) |
setContinuumBufferSize Set desired continuum buffer size. More... | |
void | setSpectrumBufferSize (int nbuf, bool allocMem=true) |
setSpectrumBufferSize Set desired spectrum buffer size. More... | |
void | setSampleRate (float sr) |
setSampleRate Set depth of Detector device. More... | |
void | setFrequency (float freq) |
setFrequency Set the frequency observed. More... | |
void | setBPS (int bps) |
setBPP Set depth of Detector device. More... | |
void | setCaptureDuration (double duration) |
setCaptureDuration Set desired Detector frame Capture duration for next Capture. More... | |
void | setCaptureLeft (double duration) |
setCaptureLeft Update Capture time left. More... | |
void | setCaptureFailed () |
setCaptureFailed Alert the client that the Capture failed. More... | |
int | getNAxis () const |
void | setNAxis (int value) |
setNAxis Set FITS number of axis More... | |
void | setCaptureExtension (const char *ext) |
setCaptureExtension Set capture exntension More... | |
char * | getCaptureExtension () |
bool | isCapturing () |
Private Attributes | |
int | NAxis |
of AxisMore... | |
int | BPS |
Bytes per Sample. More... | |
double | samplerate |
double | Frequency |
uint8_t * | ContinuumBuffer |
int | ContinuumBufferSize |
double * | SpectrumBuffer |
int | SpectrumBufferSize |
double | captureDuration |
timeval | startCaptureTime |
char | captureExtention [MAXINDIBLOBFMT] |
INumberVectorProperty | FramedCaptureNP |
INumber | FramedCaptureN [1] |
INumberVectorProperty | DetectorSettingsNP |
INumber | DetectorSettingsN [4] |
ISwitchVectorProperty | AbortCaptureSP |
ISwitch | AbortCaptureS [1] |
IBLOB | FitsB [2] |
IBLOBVectorProperty | FitsBP |
Friends | |
class | INDI::Detector |
The DetectorDevice class provides functionality of a Detector Device within a Detector.
DetectorDevice::DetectorDevice | ( | ) |
DetectorDevice::~DetectorDevice | ( | ) |
DetectorDevice::DetectorDevice | ( | ) |
DetectorDevice::~DetectorDevice | ( | ) |
|
inline |
getBPS Get Detector depth (bits per sample).
|
inline |
getBPS Get Detector depth (bits per sample).
|
inline |
getCaptureDuration Get requested Capture duration for the Detector device in seconds.
|
inline |
getCaptureDuration Get requested Capture duration for the Detector device in seconds.
|
inline |
|
inline |
|
inline |
getCaptureLeft Get Capture time left in seconds.
|
inline |
getCaptureLeft Get Capture time left in seconds.
const char * DetectorDevice::getCaptureStartTime | ( | ) |
getCaptureStartTime
const char* DetectorDevice::getCaptureStartTime | ( | ) |
getCaptureStartTime
|
inline |
getContinuumBuffer Get raw buffer of the continuum stream of the Detector device.
|
inline |
getContinuumBuffer Get raw buffer of the continuum stream of the Detector device.
|
inline |
getContinuumBufferSize Get allocated continuum buffer size to hold the Detector captured stream.
|
inline |
getContinuumBufferSize Get allocated continuum buffer size to hold the Detector captured stream.
|
inline |
Return Detector Info Property.
|
inline |
Return Detector Info Property.
|
inline |
getSamplingFrequency Get requested Capture frequency for the Detector device in Hz.
|
inline |
getSamplingFrequency Get requested Capture frequency for the Detector device in Hz.
int DetectorDevice::getNAxis | ( | ) | const |
int DetectorDevice::getNAxis | ( | ) | const |
|
inline |
getSampleRate Get requested SampleRate for the Detector device in Hz.
|
inline |
getSampleRate Get requested SampleRate for the Detector device in Hz.
|
inline |
getSpectrumBuffer Get raw buffer of the spectrum of the Detector device.
|
inline |
getSpectrumBuffer Get raw buffer of the spectrum of the Detector device.
|
inline |
getSpectrumBufferSize Get allocated spectrum buffer size to hold the Detector spectrum.
|
inline |
getSpectrumBufferSize Get allocated spectrum buffer size to hold the Detector spectrum.
|
inline |
|
inline |
void DetectorDevice::setBPS | ( | int | bps | ) |
setBPP Set depth of Detector device.
bpp | bits per pixel |
void DetectorDevice::setBPS | ( | int | bps | ) |
setBPP Set depth of Detector device.
bpp | bits per pixel |
void DetectorDevice::setCaptureDuration | ( | double | duration | ) |
setCaptureDuration Set desired Detector frame Capture duration for next Capture.
You must call this function immediately before starting the actual Capture as it is used to calculate the timestamp used for the FITS header.
duration | Capture duration in seconds. |
void DetectorDevice::setCaptureDuration | ( | double | duration | ) |
setCaptureDuration Set desired Detector frame Capture duration for next Capture.
You must call this function immediately before starting the actual Capture as it is used to calculate the timestamp used for the FITS header.
duration | Capture duration in seconds. |
void DetectorDevice::setCaptureExtension | ( | const char * | ext | ) |
setCaptureExtension Set capture exntension
ext | extension (fits, jpeg, raw..etc) |
void DetectorDevice::setCaptureExtension | ( | const char * | ext | ) |
setCaptureExtension Set capture exntension
ext | extension (fits, jpeg, raw..etc) |
void DetectorDevice::setCaptureFailed | ( | ) |
setCaptureFailed Alert the client that the Capture failed.
void DetectorDevice::setCaptureFailed | ( | ) |
setCaptureFailed Alert the client that the Capture failed.
void DetectorDevice::setCaptureLeft | ( | double | duration | ) |
setCaptureLeft Update Capture time left.
Inform the client of the new Capture time left value.
duration | Capture duration left in seconds. |
void DetectorDevice::setCaptureLeft | ( | double | duration | ) |
setCaptureLeft Update Capture time left.
Inform the client of the new Capture time left value.
duration | Capture duration left in seconds. |
|
inline |
setContinuumBuffer Set raw frame buffer pointer.
buffer | pointer to continuum buffer /note Detector Device allocates the frame buffer internally once SetContinuumBufferSize is called with allocMem set to true which is the default behavior. If you allocated the memory yourself (i.e. allocMem is false), then you must call this function to set the pointer to the raw frame buffer. |
|
inline |
setContinuumBuffer Set raw frame buffer pointer.
buffer | pointer to continuum buffer /note Detector Device allocates the frame buffer internally once SetContinuumBufferSize is called with allocMem set to true which is the default behavior. If you allocated the memory yourself (i.e. allocMem is false), then you must call this function to set the pointer to the raw frame buffer. |
setContinuumBufferSize Set desired continuum buffer size.
The function will allocate memory accordingly. The frame size depends on the desired capture time, sampling frequency, and sample depth of the Detector device (bps). You must set the frame size any time any of the prior parameters gets updated.
nbuf | size of buffer in bytes. |
allocMem | if True, it will allocate memory of nbut size bytes. |
setContinuumBufferSize Set desired continuum buffer size.
The function will allocate memory accordingly. The frame size depends on the desired capture time, sampling frequency, and sample depth of the Detector device (bps). You must set the frame size any time any of the prior parameters gets updated.
nbuf | size of buffer in bytes. |
allocMem | if True, it will allocate memory of nbut size bytes. |
void DetectorDevice::setFrequency | ( | float | freq | ) |
setFrequency Set the frequency observed.
capfreq | Capture frequency |
void DetectorDevice::setFrequency | ( | float | freq | ) |
setFrequency Set the frequency observed.
capfreq | Capture frequency |
void DetectorDevice::setMinMaxStep | ( | const char * | property, |
const char * | element, | ||
double | min, | ||
double | max, | ||
double | step, | ||
bool | sendToClient = true |
||
) |
setMinMaxStep for a number property element
property | Property name |
element | Element name |
min | Minimum element value |
max | Maximum element value |
step | Element step value |
sendToClient | If true (default), the element limits are updated and is sent to the client. If false, the element limits are updated without getting sent to the client. |
void DetectorDevice::setMinMaxStep | ( | const char * | property, |
const char * | element, | ||
double | min, | ||
double | max, | ||
double | step, | ||
bool | sendToClient = true |
||
) |
setMinMaxStep for a number property element
property | Property name |
element | Element name |
min | Minimum element value |
max | Maximum element value |
step | Element step value |
sendToClient | If true (default), the element limits are updated and is sent to the client. If false, the element limits are updated without getting sent to the client. |
void DetectorDevice::setNAxis | ( | int | value | ) |
setNAxis Set FITS number of axis
value | number of axis |
void DetectorDevice::setNAxis | ( | int | value | ) |
setNAxis Set FITS number of axis
value | number of axis |
void DetectorDevice::setSampleRate | ( | float | sr | ) |
setSampleRate Set depth of Detector device.
bpp | bits per pixel |
void DetectorDevice::setSampleRate | ( | float | sr | ) |
setSampleRate Set depth of Detector device.
bpp | bits per pixel |
|
inline |
setSpectrumBuffer Set raw frame buffer pointer.
buffer | pointer to spectrum buffer /note Detector Device allocates the frame buffer internally once SetSpectrumBufferSize is called with allocMem set to true which is the default behavior. If you allocated the memory yourself (i.e. allocMem is false), then you must call this function to set the pointer to the raw frame buffer. |
|
inline |
setSpectrumBuffer Set raw frame buffer pointer.
buffer | pointer to spectrum buffer /note Detector Device allocates the frame buffer internally once SetSpectrumBufferSize is called with allocMem set to true which is the default behavior. If you allocated the memory yourself (i.e. allocMem is false), then you must call this function to set the pointer to the raw frame buffer. |
setSpectrumBufferSize Set desired spectrum buffer size.
The function will allocate memory accordingly. The frame size depends on the size of the spectrum. You must set the frame size any time the spectrum size changes.
nbuf | size of buffer in doubles. |
allocMem | if True, it will allocate memory of nbut size doubles. |
setSpectrumBufferSize Set desired spectrum buffer size.
The function will allocate memory accordingly. The frame size depends on the size of the spectrum. You must set the frame size any time the spectrum size changes.
nbuf | size of buffer in doubles. |
allocMem | if True, it will allocate memory of nbut size doubles. |
|
friend |
|
private |
|
private |
|
private |
Bytes per Sample.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |