TwiceAsNice  2019-02-18
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
V4L2_Driver Class Reference

#include <v4l2driver.h>

Inheritance diagram for V4L2_Driver:
Inheritance graph
Collaboration diagram for V4L2_Driver:
Collaboration graph

Classes

struct  img_t
 

Public Member Functions

 V4L2_Driver ()
 
virtual ~V4L2_Driver ()
 
virtual void ISGetProperties (const char *dev)
 define the driver's properties to the client. More...
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process the client newNumber command. More...
 
virtual bool initProperties ()
 Initilize properties initial state and value. More...
 
virtual bool updateProperties ()
 updateProperties is called whenever there is a change in the CONNECTION status of the driver. More...
 
virtual void initCamBase ()
 
void stackFrame ()
 
void newFrame ()
 
- Public Member Functions inherited from INDI::CCD
 CCD ()
 
virtual ~CCD ()
 
virtual bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. More...
 
 CCD ()
 
virtual ~CCD ()
 
virtual bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. More...
 
- Public Member Functions inherited from INDI::DefaultDevice
 DefaultDevice ()
 
virtual ~DefaultDevice ()
 
void addAuxControls ()
 Add Debug, Simulation, and Configuration options to the driver. More...
 
void addDebugControl ()
 Add Debug control to the driver. More...
 
void addSimulationControl ()
 Add Simulation control to the driver. More...
 
void addConfigurationControl ()
 Add Configuration control to the driver. More...
 
void addPollPeriodControl ()
 Add Polling period control to the driver. More...
 
void resetProperties ()
 Set all properties to IDLE state. More...
 
void defineNumber (INumberVectorProperty *nvp)
 Define number vector to client & register it. More...
 
void defineText (ITextVectorProperty *tvp)
 Define text vector to client & register it. More...
 
void defineSwitch (ISwitchVectorProperty *svp)
 Define switch vector to client & register it. More...
 
void defineLight (ILightVectorProperty *lvp)
 Define light vector to client & register it. More...
 
void defineBLOB (IBLOBVectorProperty *bvp)
 Define BLOB vector to client & register it. More...
 
virtual bool deleteProperty (const char *propertyName)
 Delete a property and unregister it. More...
 
virtual void setConnected (bool status, IPState state=IPS_OK, const char *msg=nullptr)
 Set connection switch status in the client. More...
 
int SetTimer (uint32_t ms)
 Set a timer to call the function TimerHit after ms milliseconds. More...
 
void RemoveTimer (int id)
 Remove timer added with SetTimer. More...
 
virtual void TimerHit ()
 Callback function to be called once SetTimer duration elapses. More...
 
virtual const char * getDriverExec ()
 
virtual const char * getDriverName ()
 
void setVersion (uint16_t vMajor, uint16_t vMinor)
 Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. More...
 
uint16_t getMajorVersion ()
 
uint16_t getMinorVersion ()
 
virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Process the client newBLOB command. More...
 
virtual uint16_t getDriverInterface ()
 
void setDriverInterface (uint16_t value)
 setInterface Set driver interface. More...
 
 DefaultDevice ()
 
virtual ~DefaultDevice ()
 
void addAuxControls ()
 Add Debug, Simulation, and Configuration options to the driver. More...
 
void addDebugControl ()
 Add Debug control to the driver. More...
 
void addSimulationControl ()
 Add Simulation control to the driver. More...
 
void addConfigurationControl ()
 Add Configuration control to the driver. More...
 
void addPollPeriodControl ()
 Add Polling period control to the driver. More...
 
void resetProperties ()
 Set all properties to IDLE state. More...
 
void defineNumber (INumberVectorProperty *nvp)
 Define number vector to client & register it. More...
 
void defineText (ITextVectorProperty *tvp)
 Define text vector to client & register it. More...
 
void defineSwitch (ISwitchVectorProperty *svp)
 Define switch vector to client & register it. More...
 
void defineLight (ILightVectorProperty *lvp)
 Define light vector to client & register it. More...
 
void defineBLOB (IBLOBVectorProperty *bvp)
 Define BLOB vector to client & register it. More...
 
virtual bool deleteProperty (const char *propertyName)
 Delete a property and unregister it. More...
 
virtual void setConnected (bool status, IPState state=IPS_OK, const char *msg=nullptr)
 Set connection switch status in the client. More...
 
int SetTimer (uint32_t ms)
 Set a timer to call the function TimerHit after ms milliseconds. More...
 
void RemoveTimer (int id)
 Remove timer added with SetTimer. More...
 
virtual void TimerHit ()
 Callback function to be called once SetTimer duration elapses. More...
 
virtual const char * getDriverExec ()
 
virtual const char * getDriverName ()
 
void setVersion (uint16_t vMajor, uint16_t vMinor)
 Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. More...
 
uint16_t getMajorVersion ()
 
uint16_t getMinorVersion ()
 
virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Process the client newBLOB command. More...
 
virtual uint16_t getDriverInterface ()
 
void setDriverInterface (uint16_t value)
 setInterface Set driver interface. More...
 
- Public Member Functions inherited from INDI::BaseDevice
 BaseDevice ()
 
virtual ~BaseDevice ()
 
INumberVectorPropertygetNumber (const char *name)
 
ITextVectorPropertygetText (const char *name)
 
ISwitchVectorPropertygetSwitch (const char *name)
 
ILightVectorPropertygetLight (const char *name)
 
IBLOBVectorPropertygetBLOB (const char *name)
 
IPState getPropertyState (const char *name)
 
IPerm getPropertyPermission (const char *name)
 
void registerProperty (void *p, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property. More...
 
void * getRawProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
INDI::PropertygetProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
std::vector< INDI::Property * > * getProperties ()
 Return a list of all properties in the device. More...
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file. More...
 
bool isConnected ()
 
void setDeviceName (const char *dev)
 Set the device name. More...
 
const char * getDeviceName ()
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue. More...
 
void checkMessage (XMLEle *root)
 
void doMessage (XMLEle *msg)
 
std::string messageQueue (int index) const
 
std::string lastMessage ()
 
void setMediator (INDI::BaseMediator *med)
 Set the driver's mediator to receive notification of news devices and updated property values. More...
 
INDI::BaseMediatorgetMediator ()
 
const char * getDriverName ()
 
const char * getDriverExec ()
 
const char * getDriverVersion ()
 
 BaseDevice ()
 
virtual ~BaseDevice ()
 
INumberVectorPropertygetNumber (const char *name)
 
ITextVectorPropertygetText (const char *name)
 
ISwitchVectorPropertygetSwitch (const char *name)
 
ILightVectorPropertygetLight (const char *name)
 
IBLOBVectorPropertygetBLOB (const char *name)
 
IPState getPropertyState (const char *name)
 
IPerm getPropertyPermission (const char *name)
 
void registerProperty (void *p, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property. More...
 
void * getRawProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
INDI::PropertygetProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
std::vector< INDI::Property * > * getProperties ()
 Return a list of all properties in the device. More...
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file. More...
 
bool isConnected ()
 
void setDeviceName (const char *dev)
 Set the device name. More...
 
const char * getDeviceName ()
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue. More...
 
void checkMessage (XMLEle *root)
 
void doMessage (XMLEle *msg)
 
std::string messageQueue (int index) const
 
std::string lastMessage ()
 
void setMediator (INDI::BaseMediator *med)
 Set the driver's mediator to receive notification of news devices and updated property values. More...
 
INDI::BaseMediatorgetMediator ()
 
const char * getDriverName ()
 
const char * getDriverExec ()
 
const char * getDriverVersion ()
 

Static Public Member Functions

static void newFrame (void *p)
 

Protected Types

enum  stackmodes {
  STACK_NONE = 0, STACK_MEAN = 1, STACK_ADDITIVE = 2, STACK_TAKE_DARK = 3,
  STACK_RESET_DARK = 4
}
 
enum  { IMAGE_GRAYSCALE, IMAGE_COLOR }
 
- Protected Types inherited from INDI::CCD
enum  { SNOOP_MOUNT, SNOOP_ROTATOR, SNOOP_FILTER_WHEEL, SNOOP_SQM }
 
enum  { UPLOAD_DIR, UPLOAD_PREFIX }
 
enum  { TELESCOPE_PRIMARY, TELESCOPE_GUIDE }
 
enum  { EXPOSURE_LOOP_ON, EXPOSURE_LOOP_OFF }
 
enum  { FITS_OBSERVER, FITS_OBJECT }
 
enum  { SNOOP_MOUNT, SNOOP_ROTATOR, SNOOP_FILTER_WHEEL, SNOOP_SQM }
 
enum  { UPLOAD_DIR, UPLOAD_PREFIX }
 
enum  { TELESCOPE_PRIMARY, TELESCOPE_GUIDE }
 
enum  { EXPOSURE_LOOP_ON, EXPOSURE_LOOP_OFF }
 
enum  { FITS_OBSERVER, FITS_OBJECT }
 

Protected Member Functions

virtual bool Connect ()
 Connect to the device. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
virtual const char * getDefaultName ()
 
virtual bool StartExposure (float duration)
 Start exposing primary CCD chip. More...
 
virtual bool AbortExposure ()
 Abort ongoing exposure. More...
 
virtual bool UpdateCCDFrame (int x, int y, int w, int h)
 CCD calls this function when CCD Frame dimension needs to be updated in the hardware. More...
 
virtual bool UpdateCCDBin (int hor, int ver)
 CCD calls this function when CCD Binning needs to be updated in the hardware. More...
 
virtual bool saveConfigItems (FILE *fp)
 saveConfigItems Save configuration items in XML file. More...
 
virtual bool StartStreaming ()
 StartStreaming Start live video streaming. More...
 
virtual bool StopStreaming ()
 StopStreaming Stop live video streaming. More...
 
virtual void getBasicData ()
 
bool getPixelFormat (uint32_t v4l2format, INDI_PIXEL_FORMAT &pixelFormat, uint8_t &pixelDepth)
 
void allocateBuffers ()
 
void releaseBuffers ()
 
void updateFrameSize ()
 
bool setShutter (double duration)
 
bool setManualExposure (double duration)
 
bool startlongexposure (double timeinsec)
 
bool start_capturing (bool do_stream)
 
bool stop_capturing ()
 
virtual void updateV4L2Controls ()
 
struct timeval getElapsedExposure () const
 
float getRemainingExposure () const
 
- Protected Member Functions inherited from INDI::CCD
uint32_t GetCCDCapability () const
 GetCCDCapability returns the CCD capabilities. More...
 
void SetCCDCapability (uint32_t cap)
 SetCCDCapability Set the CCD capabilities. More...
 
bool CanAbort ()
 
bool CanBin ()
 
bool CanSubFrame ()
 
bool HasGuideHead ()
 
bool HasShutter ()
 
bool HasST4Port ()
 
bool HasCooler ()
 
bool HasBayer ()
 
bool HasStreaming ()
 
virtual int SetTemperature (double temperature)
 Set CCD temperature. More...
 
virtual bool ExposureComplete (CCDChip *targetChip)
 Uploads target Chip exposed buffer as FITS to the client. More...
 
virtual bool StartGuideExposure (float duration)
 Start exposing guide CCD chip. More...
 
virtual bool AbortGuideExposure ()
 Abort ongoing exposure. More...
 
virtual bool UpdateGuiderFrame (int x, int y, int w, int h)
 CCD calls this function when Guide head frame dimension is updated by the client. More...
 
virtual bool UpdateGuiderBin (int hor, int ver)
 CCD calls this function when Guide head binning is updated by the client. More...
 
virtual bool UpdateCCDFrameType (CCDChip::CCD_FRAME fType)
 CCD calls this function when CCD frame type needs to be updated in the hardware. More...
 
virtual bool UpdateCCDUploadMode (CCD_UPLOAD_MODE mode)
 CCD calls this function when client upload mode switch is updated. More...
 
virtual bool UpdateGuiderFrameType (CCDChip::CCD_FRAME fType)
 CCD calls this function when Guide frame type is updated by the client. More...
 
virtual void SetCCDParams (int x, int y, int bpp, float xf, float yf)
 Setup CCD paramters for primary CCD. More...
 
virtual void SetGuiderParams (int x, int y, int bpp, float xf, float yf)
 Setup CCD paramters for guide head CCD. More...
 
virtual IPState GuideNorth (uint32_t ms)
 Guide northward for ms milliseconds. More...
 
virtual IPState GuideSouth (uint32_t ms)
 Guide southward for ms milliseconds. More...
 
virtual IPState GuideEast (uint32_t ms)
 Guide easward for ms milliseconds. More...
 
virtual IPState GuideWest (uint32_t ms)
 Guide westward for ms milliseconds. More...
 
virtual void addFITSKeywords (fitsfile *fptr, CCDChip *targetChip)
 Add FITS keywords to a fits file. More...
 
void fits_update_key_s (fitsfile *fptr, int type, std::string name, void *p, std::string explanation, int *status)
 A function to just remove GCC warnings about deprecated conversion. More...
 
virtual void activeDevicesUpdated ()
 activeDevicesUpdated Inform children that ActiveDevices property was updated so they can snoop on the updated devices if desired. More...
 
void GuideComplete (INDI_EQ_AXIS axis)
 Call GuideComplete once the guiding pulse is complete. More...
 
uint32_t GetCCDCapability () const
 GetCCDCapability returns the CCD capabilities. More...
 
void SetCCDCapability (uint32_t cap)
 SetCCDCapability Set the CCD capabilities. More...
 
bool CanAbort ()
 
bool CanBin ()
 
bool CanSubFrame ()
 
bool HasGuideHead ()
 
bool HasShutter ()
 
bool HasST4Port ()
 
bool HasCooler ()
 
bool HasBayer ()
 
bool HasStreaming ()
 
virtual int SetTemperature (double temperature)
 Set CCD temperature. More...
 
virtual bool ExposureComplete (CCDChip *targetChip)
 Uploads target Chip exposed buffer as FITS to the client. More...
 
virtual bool StartGuideExposure (float duration)
 Start exposing guide CCD chip. More...
 
virtual bool AbortGuideExposure ()
 Abort ongoing exposure. More...
 
virtual bool UpdateGuiderFrame (int x, int y, int w, int h)
 CCD calls this function when Guide head frame dimension is updated by the client. More...
 
virtual bool UpdateGuiderBin (int hor, int ver)
 CCD calls this function when Guide head binning is updated by the client. More...
 
virtual bool UpdateCCDFrameType (CCDChip::CCD_FRAME fType)
 CCD calls this function when CCD frame type needs to be updated in the hardware. More...
 
virtual bool UpdateCCDUploadMode (CCD_UPLOAD_MODE mode)
 CCD calls this function when client upload mode switch is updated. More...
 
virtual bool UpdateGuiderFrameType (CCDChip::CCD_FRAME fType)
 CCD calls this function when Guide frame type is updated by the client. More...
 
virtual void SetCCDParams (int x, int y, int bpp, float xf, float yf)
 Setup CCD paramters for primary CCD. More...
 
virtual void SetGuiderParams (int x, int y, int bpp, float xf, float yf)
 Setup CCD paramters for guide head CCD. More...
 
virtual IPState GuideNorth (uint32_t ms)
 Guide northward for ms milliseconds. More...
 
virtual IPState GuideSouth (uint32_t ms)
 Guide southward for ms milliseconds. More...
 
virtual IPState GuideEast (uint32_t ms)
 Guide easward for ms milliseconds. More...
 
virtual IPState GuideWest (uint32_t ms)
 Guide westward for ms milliseconds. More...
 
virtual void addFITSKeywords (fitsfile *fptr, CCDChip *targetChip)
 Add FITS keywords to a fits file. More...
 
void fits_update_key_s (fitsfile *fptr, int type, std::string name, void *p, std::string explanation, int *status)
 A function to just remove GCC warnings about deprecated conversion. More...
 
virtual void activeDevicesUpdated ()
 activeDevicesUpdated Inform children that ActiveDevices property was updated so they can snoop on the updated devices if desired. More...
 
void GuideComplete (INDI_EQ_AXIS axis)
 Call GuideComplete once the guiding pulse is complete. More...
 
- Protected Member Functions inherited from INDI::DefaultDevice
void setDynamicPropertiesBehavior (bool defineEnabled, bool deleteEnabled)
 setDynamicPropertiesBehavior controls handling of dynamic properties. More...
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file. More...
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file. More...
 
virtual bool saveAllConfigItems (FILE *fp)
 saveAllConfigItems Save all the drivers' properties in the configuration file More...
 
virtual bool loadDefaultConfig ()
 Load the default configuration file. More...
 
void setDebug (bool enable)
 Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client. More...
 
void setSimulation (bool enable)
 Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client. More...
 
virtual void debugTriggered (bool enable)
 Inform driver that the debug option was triggered. More...
 
virtual void simulationTriggered (bool enable)
 Inform driver that the simulation option was triggered. More...
 
bool isDebug ()
 
bool isSimulation ()
 
void registerConnection (Connection::Interface *newConnection)
 registerConnection Add new connection plugin to the existing connection pool. More...
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool More...
 
Connection::InterfacegetActiveConnection ()
 
void setDefaultPollingPeriod (uint32_t period)
 
uint32_t getPollingPeriod ()
 
void setDynamicPropertiesBehavior (bool defineEnabled, bool deleteEnabled)
 setDynamicPropertiesBehavior controls handling of dynamic properties. More...
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file. More...
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file. More...
 
virtual bool saveAllConfigItems (FILE *fp)
 saveAllConfigItems Save all the drivers' properties in the configuration file More...
 
virtual bool loadDefaultConfig ()
 Load the default configuration file. More...
 
void setDebug (bool enable)
 Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client. More...
 
void setSimulation (bool enable)
 Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client. More...
 
virtual void debugTriggered (bool enable)
 Inform driver that the debug option was triggered. More...
 
virtual void simulationTriggered (bool enable)
 Inform driver that the simulation option was triggered. More...
 
bool isDebug ()
 
bool isSimulation ()
 
void registerConnection (Connection::Interface *newConnection)
 registerConnection Add new connection plugin to the existing connection pool. More...
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool More...
 
Connection::InterfacegetActiveConnection ()
 
void setDefaultPollingPeriod (uint32_t period)
 
uint32_t getPollingPeriod ()
 
- Protected Member Functions inherited from INDI::BaseDevice
int buildProp (XMLEle *root, char *errmsg)
 Build a property given the supplied XML element (defXXX) More...
 
int setValue (XMLEle *root, char *errmsg)
 handle SetXXX commands from client More...
 
int setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg)
 Parse and store BLOB in the respective vector. More...
 
int buildProp (XMLEle *root, char *errmsg)
 Build a property given the supplied XML element (defXXX) More...
 
int setValue (XMLEle *root, char *errmsg)
 handle SetXXX commands from client More...
 
int setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg)
 Parse and store BLOB in the respective vector. More...
 

Static Protected Member Functions

static void lxtimerCallback (void *userpointer)
 
static void stdtimerCallback (void *userpointer)
 

Protected Attributes

ISwitchCompressS
 
ISwitch ImageColorS [2]
 
ISwitch ImageDepthS [2]
 
ISwitch StackModeS [5]
 
ISwitch ColorProcessingS [3]
 
IText PortT [1] {}
 
IText camNameT [1] {}
 
IText CaptureColorSpaceT [3] {}
 
INumberFrameN
 
INumber FrameRateN [1]
 
ISwitchVectorPropertyCompressSP
 
ISwitchVectorProperty ImageColorSP
 
ISwitchVectorProperty ImageDepthSP
 
ISwitchVectorProperty StackModeSP
 
ISwitchVectorProperty InputsSP
 
ISwitchVectorProperty CaptureFormatsSP
 
ISwitchVectorProperty CaptureSizesSP
 
ISwitchVectorProperty FrameRatesSP
 
ISwitchVectorPropertyOptions
 
ISwitchVectorProperty ColorProcessingSP
 
unsigned int v4loptions
 
unsigned int v4ladjustments
 
bool useExtCtrl
 
INumberVectorProperty CaptureSizesNP
 
INumberVectorProperty FrameRateNP
 
INumberVectorPropertyFrameNP
 
INumberVectorProperty ImageAdjustNP
 
ITextVectorProperty PortTP
 
ITextVectorProperty camNameTP
 
ITextVectorProperty CaptureColorSpaceTP
 
INumberAbsExposureN
 
ISwitchVectorPropertyManualExposureSP
 
INDI::V4L2_Basev4l_base
 
char device_name [MAXINDIDEVICE]
 
int subframeCount
 
int frameCount
 
double divider
 
img_tV4LFrame
 
struct timeval capture_start
 
struct timeval exposure_duration
 
unsigned int stackMode
 
ulong frameBytes
 
bool is_capturing
 
bool is_exposing
 
Lxlx
 
int lxtimer
 
int stdtimer
 
short lxstate
 
- Protected Attributes inherited from INDI::CCD
double RA
 
double Dec
 
double J2000RA
 
double J2000DE
 
double primaryFocalLength
 
double primaryAperture
 
double guiderFocalLength
 
double guiderAperture
 
bool InExposure
 
bool InGuideExposure
 
bool RapidGuideEnabled
 
bool GuiderRapidGuideEnabled
 
bool AutoLoop
 
bool GuiderAutoLoop
 
bool SendImage
 
bool GuiderSendImage
 
bool ShowMarker
 
bool GuiderShowMarker
 
float ExposureTime
 
float GuiderExposureTime
 
double MPSAS
 
double RotatorAngle
 
double Airmass
 
double Latitude
 
double Longitude
 
std::vector< std::string > FilterNames
 
int CurrentFilterSlot
 
std::unique_ptr< StreamManagerStreamer
 
CCDChip PrimaryCCD
 
CCDChip GuideCCD
 
INumberVectorProperty EqNP
 
INumber EqN [2]
 
ITextVectorProperty ActiveDeviceTP
 
IText ActiveDeviceT [4] {}
 
INumber TemperatureN [1]
 
INumberVectorProperty TemperatureNP
 
IText BayerT [3] {}
 
ITextVectorProperty BayerTP
 
IText FileNameT [1] {}
 
ITextVectorProperty FileNameTP
 
ISwitch UploadS [3]
 
ISwitchVectorProperty UploadSP
 
IText UploadSettingsT [2] {}
 
ITextVectorProperty UploadSettingsTP
 
ISwitch TelescopeTypeS [2]
 
ISwitchVectorProperty TelescopeTypeSP
 
ISwitch WorldCoordS [2]
 
ISwitchVectorProperty WorldCoordSP
 
INumber CCDRotationN [1]
 
INumberVectorProperty CCDRotationNP
 
ISwitch ExposureLoopS [2]
 
ISwitchVectorProperty ExposureLoopSP
 
INumber ExposureLoopCountN [1]
 
INumberVectorProperty ExposureLoopCountNP
 
double uploadTime = { 0 }
 
std::chrono::system_clock::time_point exposureLoopStartup
 
IText FITSHeaderT [2] {}
 
ITextVectorProperty FITSHeaderTP
 
- Protected Attributes inherited from INDI::DefaultDevice
uint32_t POLLMS = 1000
 Period in milliseconds to call TimerHit(). Default 1000 ms. More...
 

Additional Inherited Members

- Public Types inherited from INDI::CCD
enum  {
  CCD_CAN_BIN = 1 << 0, CCD_CAN_SUBFRAME = 1 << 1, CCD_CAN_ABORT = 1 << 2, CCD_HAS_GUIDE_HEAD = 1 << 3,
  CCD_HAS_ST4_PORT = 1 << 4, CCD_HAS_SHUTTER = 1 << 5, CCD_HAS_COOLER = 1 << 6, CCD_HAS_BAYER = 1 << 7,
  CCD_HAS_STREAMING = 1 << 8
}
 
enum  CCD_UPLOAD_MODE {
  UPLOAD_CLIENT, UPLOAD_LOCAL, UPLOAD_BOTH, UPLOAD_CLIENT,
  UPLOAD_LOCAL, UPLOAD_BOTH
}
 
enum  {
  CCD_CAN_BIN = 1 << 0, CCD_CAN_SUBFRAME = 1 << 1, CCD_CAN_ABORT = 1 << 2, CCD_HAS_GUIDE_HEAD = 1 << 3,
  CCD_HAS_ST4_PORT = 1 << 4, CCD_HAS_SHUTTER = 1 << 5, CCD_HAS_COOLER = 1 << 6, CCD_HAS_BAYER = 1 << 7,
  CCD_HAS_STREAMING = 1 << 8
}
 
enum  CCD_UPLOAD_MODE {
  UPLOAD_CLIENT, UPLOAD_LOCAL, UPLOAD_BOTH, UPLOAD_CLIENT,
  UPLOAD_LOCAL, UPLOAD_BOTH
}
 
- Public Types inherited from INDI::BaseDevice
enum  INDI_ERROR {
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4,
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4
}
 
enum  DRIVER_INTERFACE {
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15),
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15)
}
 The DRIVER_INTERFACE enum defines the class of devices the driver implements. More...
 
enum  INDI_ERROR {
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4,
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4
}
 
enum  DRIVER_INTERFACE {
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15),
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15)
}
 The DRIVER_INTERFACE enum defines the class of devices the driver implements. More...
 
- Public Attributes inherited from INDI::CCD
enum INDI::CCD:: { ... }  CCDCapability
 
enum INDI::CCD:: { ... }  CCDCapability
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
IMAGE_GRAYSCALE 
IMAGE_COLOR 

◆ stackmodes

enum V4L2_Driver::stackmodes
protected
Enumerator
STACK_NONE 
STACK_MEAN 
STACK_ADDITIVE 
STACK_TAKE_DARK 
STACK_RESET_DARK 

Constructor & Destructor Documentation

◆ V4L2_Driver()

V4L2_Driver::V4L2_Driver ( )

◆ ~V4L2_Driver()

V4L2_Driver::~V4L2_Driver ( )
virtual

Member Function Documentation

◆ AbortExposure()

bool V4L2_Driver::AbortExposure ( )
protectedvirtual

Abort ongoing exposure.

Returns
true is abort is successful, false otherwise.
Note
This function is not implemented in CCD, it must be implemented in the child class

Reimplemented from INDI::CCD.

◆ allocateBuffers()

void V4L2_Driver::allocateBuffers ( )
protected

◆ Connect()

bool V4L2_Driver::Connect ( )
protectedvirtual

Connect to the device.

INDI::DefaultDevice implementation connects to appropriate connection interface (Serial or TCP) governed by connectionMode. If connection is successful, it proceed to call Handshake() function to ensure communication with device is successful. For other communication interface, override the method in the child class implementation

Returns
True if connection is successful, false otherwise

Reimplemented from INDI::DefaultDevice.

◆ Disconnect()

bool V4L2_Driver::Disconnect ( )
protectedvirtual

Disconnect from device.

Returns
True if successful, false otherwise

Reimplemented from INDI::DefaultDevice.

◆ getBasicData()

void V4L2_Driver::getBasicData ( )
protectedvirtual

◆ getDefaultName()

const char * V4L2_Driver::getDefaultName ( )
protectedvirtual
Returns
Default name of the device.

Implements INDI::DefaultDevice.

◆ getElapsedExposure()

struct timeval V4L2_Driver::getElapsedExposure ( ) const
protected

◆ getPixelFormat()

bool V4L2_Driver::getPixelFormat ( uint32_t  v4l2format,
INDI_PIXEL_FORMAT pixelFormat,
uint8_t pixelDepth 
)
protected

◆ getRemainingExposure()

float V4L2_Driver::getRemainingExposure ( ) const
protected

◆ initCamBase()

void V4L2_Driver::initCamBase ( )
virtual

◆ initProperties()

bool V4L2_Driver::initProperties ( )
virtual

Initilize properties initial state and value.

The child class must implement this function.

Returns
True if initilization is successful, false otherwise.

Reimplemented from INDI::CCD.

◆ ISGetProperties()

void V4L2_Driver::ISGetProperties ( const char *  dev)
virtual

define the driver's properties to the client.

Usually, only a minimum set of properties are defined to the client in this function if the device is in disconnected state. Those properties should be enough to enable the client to establish a connection to the device. In addition to CONNECT/DISCONNECT, such properties may include port name, IP address, etc. You should check if the device is already connected, and if this is true, then you must define the remainder of the the properties to the client in this function. Otherwise, the remainder of the driver's properties are defined to the client in updateProperties() function which is called when a client connects/disconnects from a device.

Parameters
devname of the device
Note
This function is called by the INDI framework, do not call it directly. See LX200 Generic driver for an example implementation

Reimplemented from INDI::CCD.

◆ ISNewNumber()

bool V4L2_Driver::ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
virtual

Process the client newNumber command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::CCD.

◆ ISNewSwitch()

bool V4L2_Driver::ISNewSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::CCD.

◆ ISNewText()

bool V4L2_Driver::ISNewText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::CCD.

◆ lxtimerCallback()

void V4L2_Driver::lxtimerCallback ( void *  userpointer)
staticprotected

◆ newFrame() [1/2]

void V4L2_Driver::newFrame ( void *  p)
static

◆ newFrame() [2/2]

void V4L2_Driver::newFrame ( )

◆ releaseBuffers()

void V4L2_Driver::releaseBuffers ( )
protected

◆ saveConfigItems()

bool V4L2_Driver::saveConfigItems ( FILE *  fp)
protectedvirtual

saveConfigItems Save configuration items in XML file.

Parameters
fppointer to file to write to
Returns
True if successful, false otherwise

Reimplemented from INDI::CCD.

◆ setManualExposure()

bool V4L2_Driver::setManualExposure ( double  duration)
protected

◆ setShutter()

bool V4L2_Driver::setShutter ( double  duration)
protected

◆ stackFrame()

void V4L2_Driver::stackFrame ( )

◆ start_capturing()

bool V4L2_Driver::start_capturing ( bool  do_stream)
protected

◆ StartExposure()

bool V4L2_Driver::StartExposure ( float  duration)
protectedvirtual

Start exposing primary CCD chip.

Parameters
durationDuration in seconds
Returns
true if OK and exposure will take some time to complete, false on error.
Note
This function is not implemented in CCD, it must be implemented in the child class

Reimplemented from INDI::CCD.

◆ startlongexposure()

bool V4L2_Driver::startlongexposure ( double  timeinsec)
protected

◆ StartStreaming()

bool V4L2_Driver::StartStreaming ( )
protectedvirtual

StartStreaming Start live video streaming.

Returns
True if successful, false otherwise.

Reimplemented from INDI::CCD.

◆ stdtimerCallback()

void V4L2_Driver::stdtimerCallback ( void *  userpointer)
staticprotected

◆ stop_capturing()

bool V4L2_Driver::stop_capturing ( )
protected

◆ StopStreaming()

bool V4L2_Driver::StopStreaming ( )
protectedvirtual

StopStreaming Stop live video streaming.

Returns
True if successful, false otherwise.

Reimplemented from INDI::CCD.

◆ UpdateCCDBin()

bool V4L2_Driver::UpdateCCDBin ( int  hor,
int  ver 
)
protectedvirtual

CCD calls this function when CCD Binning needs to be updated in the hardware.

Derived classes should implement this function

Parameters
horHorizontal binning.
verVertical binning.
Returns
true is CCD chip update is successful, false otherwise.
Note
This function is not implemented in CCD, it must be implemented in the child class

Reimplemented from INDI::CCD.

◆ UpdateCCDFrame()

bool V4L2_Driver::UpdateCCDFrame ( int  x,
int  y,
int  w,
int  h 
)
protectedvirtual

CCD calls this function when CCD Frame dimension needs to be updated in the hardware.

Derived classes should implement this function

Parameters
xSubframe X coordinate in pixels.
ySubframe Y coordinate in pixels.
wSubframe width in pixels.
hSubframe height in pixels.
Note
(0,0) is defined as most left, top pixel in the subframe.
Returns
true is CCD chip update is successful, false otherwise.
Note
This function is not implemented in CCD, it must be implemented in the child class

Reimplemented from INDI::CCD.

◆ updateFrameSize()

void V4L2_Driver::updateFrameSize ( )
protected

◆ updateProperties()

bool V4L2_Driver::updateProperties ( )
virtual

updateProperties is called whenever there is a change in the CONNECTION status of the driver.

This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before.

Returns
True if update is successful, false otherwise.

Reimplemented from INDI::CCD.

◆ updateV4L2Controls()

void V4L2_Driver::updateV4L2Controls ( )
protectedvirtual

Member Data Documentation

◆ AbsExposureN

INumber* V4L2_Driver::AbsExposureN
protected

◆ camNameT

IText V4L2_Driver::camNameT[1] {}
protected

◆ camNameTP

ITextVectorProperty V4L2_Driver::camNameTP
protected

◆ capture_start

struct timeval V4L2_Driver::capture_start
protected

◆ CaptureColorSpaceT

IText V4L2_Driver::CaptureColorSpaceT[3] {}
protected

◆ CaptureColorSpaceTP

ITextVectorProperty V4L2_Driver::CaptureColorSpaceTP
protected

◆ CaptureFormatsSP

ISwitchVectorProperty V4L2_Driver::CaptureFormatsSP
protected

◆ CaptureSizesNP

INumberVectorProperty V4L2_Driver::CaptureSizesNP
protected

◆ CaptureSizesSP

ISwitchVectorProperty V4L2_Driver::CaptureSizesSP
protected

◆ ColorProcessingS

ISwitch V4L2_Driver::ColorProcessingS[3]
protected

◆ ColorProcessingSP

ISwitchVectorProperty V4L2_Driver::ColorProcessingSP
protected

◆ CompressS

ISwitch* V4L2_Driver::CompressS
protected

◆ CompressSP

ISwitchVectorProperty* V4L2_Driver::CompressSP
protected

◆ device_name

char V4L2_Driver::device_name[MAXINDIDEVICE]
protected

◆ divider

double V4L2_Driver::divider
protected

◆ exposure_duration

struct timeval V4L2_Driver::exposure_duration
protected

◆ frameBytes

ulong V4L2_Driver::frameBytes
protected

◆ frameCount

int V4L2_Driver::frameCount
protected

◆ FrameN

INumber* V4L2_Driver::FrameN
protected

◆ FrameNP

INumberVectorProperty* V4L2_Driver::FrameNP
protected

◆ FrameRateN

INumber V4L2_Driver::FrameRateN[1]
protected

◆ FrameRateNP

INumberVectorProperty V4L2_Driver::FrameRateNP
protected

◆ FrameRatesSP

ISwitchVectorProperty V4L2_Driver::FrameRatesSP
protected

◆ ImageAdjustNP

INumberVectorProperty V4L2_Driver::ImageAdjustNP
protected

◆ ImageColorS

ISwitch V4L2_Driver::ImageColorS[2]
protected

◆ ImageColorSP

ISwitchVectorProperty V4L2_Driver::ImageColorSP
protected

◆ ImageDepthS

ISwitch V4L2_Driver::ImageDepthS[2]
protected

◆ ImageDepthSP

ISwitchVectorProperty V4L2_Driver::ImageDepthSP
protected

◆ InputsSP

ISwitchVectorProperty V4L2_Driver::InputsSP
protected

◆ is_capturing

bool V4L2_Driver::is_capturing
protected

◆ is_exposing

bool V4L2_Driver::is_exposing
protected

◆ lx

Lx* V4L2_Driver::lx
protected

◆ lxstate

short V4L2_Driver::lxstate
protected

◆ lxtimer

int V4L2_Driver::lxtimer
protected

◆ ManualExposureSP

ISwitchVectorProperty* V4L2_Driver::ManualExposureSP
protected

◆ Options

ISwitchVectorProperty* V4L2_Driver::Options
protected

◆ PortT

IText V4L2_Driver::PortT[1] {}
protected

◆ PortTP

ITextVectorProperty V4L2_Driver::PortTP
protected

◆ stackMode

unsigned int V4L2_Driver::stackMode
protected

◆ StackModeS

ISwitch V4L2_Driver::StackModeS[5]
protected

◆ StackModeSP

ISwitchVectorProperty V4L2_Driver::StackModeSP
protected

◆ stdtimer

int V4L2_Driver::stdtimer
protected

◆ subframeCount

int V4L2_Driver::subframeCount
protected

◆ useExtCtrl

bool V4L2_Driver::useExtCtrl
protected

◆ v4l_base

INDI::V4L2_Base* V4L2_Driver::v4l_base
protected

◆ v4ladjustments

unsigned int V4L2_Driver::v4ladjustments
protected

◆ V4LFrame

img_t* V4L2_Driver::V4LFrame
protected

◆ v4loptions

unsigned int V4L2_Driver::v4loptions
protected

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