TwiceAsNice  2019-02-18
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
INDI::DefaultDevice Class Referenceabstract

Class to provide extended functionality for devices in addition to the functionality provided by INDI::BaseDevice. More...

#include <defaultdevice.h>

Inheritance diagram for INDI::DefaultDevice:
Inheritance graph
Collaboration diagram for INDI::DefaultDevice:
Collaboration graph

Public Member Functions

 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 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 ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process the client newNumber 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 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 bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. 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 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 ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process the client newNumber 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 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 bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. 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 ()
 

Protected Member Functions

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 saveConfigItems (FILE *fp)
 saveConfigItems Save specific properties in the provide config file handler. 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 ()
 
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 bool Connect ()
 Connect to the device. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
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 ()
 
virtual const char * getDefaultName ()=0
 
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 saveConfigItems (FILE *fp)
 saveConfigItems Save specific properties in the provide config file handler. 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 ()
 
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 bool Connect ()
 Connect to the device. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
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 ()
 
virtual const char * getDefaultName ()=0
 
- 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...
 

Protected Attributes

uint32_t POLLMS = 1000
 Period in milliseconds to call TimerHit(). Default 1000 ms. More...
 

Private Attributes

bool isInit { false }
 
bool pDebug { false }
 
bool pSimulation { false }
 
uint16_t majorVersion { 1 }
 
uint16_t minorVersion { 0 }
 
uint16_t interfaceDescriptor { 0 }
 
ISwitch DebugS [2]
 
ISwitch SimulationS [2]
 
ISwitch ConfigProcessS [3]
 
ISwitch ConnectionS [2]
 
INumber PollPeriodN [1]
 
ISwitchVectorProperty DebugSP
 
ISwitchVectorProperty SimulationSP
 
ISwitchVectorProperty ConfigProcessSP
 
ISwitchVectorProperty ConnectionSP
 
INumberVectorProperty PollPeriodNP
 
IText DriverInfoT [4] {}
 
ITextVectorProperty DriverInfoTP
 
ISwitchConnectionModeS = nullptr
 
ISwitchVectorProperty ConnectionModeSP
 
std::vector< Connection::Interface * > connections
 
Connection::InterfaceactiveConnection = nullptr
 
bool defineDynamicProperties = true
 
bool deleteDynamicProperties = true
 

Friends

class Connection::Serial
 
class Connection::TCP
 
class FilterInterface
 

Additional Inherited Members

- 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...
 

Detailed Description

Class to provide extended functionality for devices in addition to the functionality provided by INDI::BaseDevice.

This class should only be subclassed by drivers directly as it is linked with main(). Virtual drivers cannot employ INDI::DefaultDevice.

INDI::DefaultDevice provides capability to add Debug, Simulation, and Configuration controls. These controls (switches) are defined to the client. Configuration options permit saving and loading of AS-IS property values.

See also
Tutorial Four
Author
Jasem Mutlaq

Constructor & Destructor Documentation

◆ DefaultDevice() [1/2]

INDI::DefaultDevice::DefaultDevice ( )

◆ ~DefaultDevice() [1/2]

INDI::DefaultDevice::~DefaultDevice ( )
virtual

◆ DefaultDevice() [2/2]

INDI::DefaultDevice::DefaultDevice ( )

◆ ~DefaultDevice() [2/2]

virtual INDI::DefaultDevice::~DefaultDevice ( )
virtual

Member Function Documentation

◆ addAuxControls() [1/2]

void INDI::DefaultDevice::addAuxControls ( )

Add Debug, Simulation, and Configuration options to the driver.

◆ addAuxControls() [2/2]

void INDI::DefaultDevice::addAuxControls ( )

Add Debug, Simulation, and Configuration options to the driver.

◆ addConfigurationControl() [1/2]

void INDI::DefaultDevice::addConfigurationControl ( )

Add Configuration control to the driver.

◆ addConfigurationControl() [2/2]

void INDI::DefaultDevice::addConfigurationControl ( )

Add Configuration control to the driver.

◆ addDebugControl() [1/2]

void INDI::DefaultDevice::addDebugControl ( )

Add Debug control to the driver.

◆ addDebugControl() [2/2]

void INDI::DefaultDevice::addDebugControl ( )

Add Debug control to the driver.

◆ addPollPeriodControl() [1/2]

void INDI::DefaultDevice::addPollPeriodControl ( )

Add Polling period control to the driver.

◆ addPollPeriodControl() [2/2]

void INDI::DefaultDevice::addPollPeriodControl ( )

Add Polling period control to the driver.

◆ addSimulationControl() [1/2]

void INDI::DefaultDevice::addSimulationControl ( )

Add Simulation control to the driver.

◆ addSimulationControl() [2/2]

void INDI::DefaultDevice::addSimulationControl ( )

Add Simulation control to the driver.

◆ Connect() [1/2]

bool INDI::DefaultDevice::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 in MGenAutoguider, SBIGCCD, AstrometryDriver, SpectraCyber, SXCCD, GPhotoCCD, indiduino, FocusLynxF2, indi_webcam, CCDSim, V4L2_Driver, Imager, WatchDog, AAGCloudWatcher, ArmPlat, ShelyakAlpy, QSICCD, SSAGCCD, inditess, ShelyakEshel, SkySafari, LX200AstroPhysicsExperimental, JoyStick, GuideSim, ApogeeCCD, SimpleSkeleton, STAR2000, GPSD, NightscapeCCD, GenericCCD, GPUSB, FocusSim, ScopeSim, QHYCCD, SXWHEEL, FishCampCCD, FLICCD, FLICFW, DomeSim, HitecAstroDCFocuser, LX200Gemini, FLIPDF, GPSSimulator, PerfectStar, ASIWHEEL, GigECCD, MICCD, RadioSim, SQMSimulator, ASICCD, ASIST4, DSICCD, FocusMaster, RTLSDR, DomeScript, Dome, FFMVCCD, RollOff, WeatherMeta, WeatherWatcher, WunderGround, SynscanMount, ScopeScript, WeatherSimulator, FilterSim, FocusLynxF1, SimpleDetector, SimpleCCD, RainDetector, LX200Pulsar2, SimpleDevice, INovaCCD, and ScopeSim.

◆ Connect() [2/2]

virtual bool INDI::DefaultDevice::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 in MGenAutoguider, SBIGCCD, AstrometryDriver, SpectraCyber, SXCCD, GPhotoCCD, indiduino, FocusLynxF2, indi_webcam, CCDSim, V4L2_Driver, Imager, WatchDog, AAGCloudWatcher, ArmPlat, ShelyakAlpy, QSICCD, SSAGCCD, inditess, ShelyakEshel, SkySafari, LX200AstroPhysicsExperimental, JoyStick, GuideSim, ApogeeCCD, SimpleSkeleton, STAR2000, GPSD, NightscapeCCD, GenericCCD, GPUSB, FocusSim, ScopeSim, QHYCCD, SXWHEEL, FishCampCCD, FLICCD, FLICFW, DomeSim, HitecAstroDCFocuser, LX200Gemini, FLIPDF, GPSSimulator, PerfectStar, ASIWHEEL, GigECCD, MICCD, RadioSim, SQMSimulator, ASICCD, ASIST4, DSICCD, FocusMaster, RTLSDR, DomeScript, Dome, FFMVCCD, RollOff, WeatherMeta, WeatherWatcher, WunderGround, SynscanMount, ScopeScript, WeatherSimulator, FilterSim, FocusLynxF1, SimpleDetector, SimpleCCD, RainDetector, LX200Pulsar2, SimpleDevice, INovaCCD, and ScopeSim.

◆ debugTriggered() [1/2]

void INDI::DefaultDevice::debugTriggered ( bool  enable)
protectedvirtual

Inform driver that the debug option was triggered.

This function is called after setDebug is triggered by the client. Reimplement this function if your driver needs to take specific action after debug is enabled/disabled. Otherwise, you can use isDebug() to check if simulation is enabled or disabled.

Parameters
enableIf true, the debug option is set to ON.

Reimplemented in LX200Telescope, FocusLynxBase, SXCCD, LX200AstroPhysicsExperimental, LX200AstroPhysics, LX200AstroPhysicsGTOCP2, FocusLynxF2, indi_webcam, ApogeeCCD, SteelDrive, IOptronV3, PMC8, IEQPro, FLICCD, QHYCCD, GPUSB, LX200Basic, and QFW.

◆ debugTriggered() [2/2]

virtual void INDI::DefaultDevice::debugTriggered ( bool  enable)
protectedvirtual

Inform driver that the debug option was triggered.

This function is called after setDebug is triggered by the client. Reimplement this function if your driver needs to take specific action after debug is enabled/disabled. Otherwise, you can use isDebug() to check if simulation is enabled or disabled.

Parameters
enableIf true, the debug option is set to ON.

Reimplemented in LX200Telescope, FocusLynxBase, SXCCD, LX200AstroPhysicsExperimental, LX200AstroPhysics, LX200AstroPhysicsGTOCP2, FocusLynxF2, indi_webcam, ApogeeCCD, SteelDrive, IOptronV3, PMC8, IEQPro, FLICCD, QHYCCD, GPUSB, LX200Basic, and QFW.

◆ defineBLOB() [1/2]

void INDI::DefaultDevice::defineBLOB ( IBLOBVectorProperty bvp)

Define BLOB vector to client & register it.

Alternatively, IDDefBLOB can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
bvpThe BLOB vector property to be defined

◆ defineBLOB() [2/2]

void INDI::DefaultDevice::defineBLOB ( IBLOBVectorProperty bvp)

Define BLOB vector to client & register it.

Alternatively, IDDefBLOB can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
bvpThe BLOB vector property to be defined

◆ defineLight() [1/2]

void INDI::DefaultDevice::defineLight ( ILightVectorProperty lvp)

Define light vector to client & register it.

Alternatively, IDDeflight can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
lvpThe light vector property to be defined

◆ defineLight() [2/2]

void INDI::DefaultDevice::defineLight ( ILightVectorProperty lvp)

Define light vector to client & register it.

Alternatively, IDDeflight can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
lvpThe light vector property to be defined

◆ defineNumber() [1/2]

void INDI::DefaultDevice::defineNumber ( INumberVectorProperty nvp)

Define number vector to client & register it.

Alternatively, IDDefNumber can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
nvpThe number vector property to be defined

◆ defineNumber() [2/2]

void INDI::DefaultDevice::defineNumber ( INumberVectorProperty nvp)

Define number vector to client & register it.

Alternatively, IDDefNumber can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
nvpThe number vector property to be defined

◆ defineSwitch() [1/2]

void INDI::DefaultDevice::defineSwitch ( ISwitchVectorProperty svp)

Define switch vector to client & register it.

Alternatively, IDDefswitch can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
svpThe switch vector property to be defined

◆ defineSwitch() [2/2]

void INDI::DefaultDevice::defineSwitch ( ISwitchVectorProperty svp)

Define switch vector to client & register it.

Alternatively, IDDefswitch can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
svpThe switch vector property to be defined

◆ defineText() [1/2]

void INDI::DefaultDevice::defineText ( ITextVectorProperty tvp)

Define text vector to client & register it.

Alternatively, IDDefText can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
tvpThe text vector property to be defined

◆ defineText() [2/2]

void INDI::DefaultDevice::defineText ( ITextVectorProperty tvp)

Define text vector to client & register it.

Alternatively, IDDefText can be used but the property will not get registered and the driver will not be able to save configuration files.

Parameters
tvpThe text vector property to be defined

◆ deleteProperty() [1/2]

bool INDI::DefaultDevice::deleteProperty ( const char *  propertyName)
virtual

Delete a property and unregister it.

It will also be deleted from all clients.

Parameters
propertyNamename of property to be deleted.

◆ deleteProperty() [2/2]

virtual bool INDI::DefaultDevice::deleteProperty ( const char *  propertyName)
virtual

Delete a property and unregister it.

It will also be deleted from all clients.

Parameters
propertyNamename of property to be deleted.

◆ Disconnect() [1/2]

bool INDI::DefaultDevice::Disconnect ( )
protectedvirtual

◆ Disconnect() [2/2]

virtual bool INDI::DefaultDevice::Disconnect ( )
protectedvirtual

◆ getActiveConnection() [1/2]

Connection::Interface* INDI::DefaultDevice::getActiveConnection ( )
inlineprotected
Returns
Return actively selected connection plugin

◆ getActiveConnection() [2/2]

Connection::Interface* INDI::DefaultDevice::getActiveConnection ( )
inlineprotected
Returns
Return actively selected connection plugin

◆ getDefaultName() [1/2]

virtual const char* INDI::DefaultDevice::getDefaultName ( )
protectedpure virtual
Returns
Default name of the device.

Implemented in EQMod, MGenAutoguider, SBIGCCD, LX200_10MICRON, USBFocusV3, FilterIFW, indiduino, AstrometryDriver, USBDewpoint, FocusLynxBase, SpectraCyber, Gemini, SXCCD, V4L2_Driver, GPhotoCCD, indi_webcam, FocusLynxF2, WatchDog, TCFS, XAGYLWheel, Imager, SXAO, SnapCap, ShelyakAlpy, SSAGCCD, inditess, SkySafari, QSICCD, FlipFlat, JoyStick, LX200Telescope, ArduinoST4, STAR2000, LX200_OnStep, Microtouch, SQM, SteelDrive, AAGCloudWatcher, GPSD, NightscapeCCD, LX200AstroPhysics, SimpleSkeleton, ShelyakEshel, GPUSB, CCDSim, SXWHEEL, SkywatcherAPIMount, LX200AstroPhysicsExperimental, ApogeeCCD, Integra, ScopeSim, GPSSimulator, ASIWHEEL, RadioSim, SQMSimulator, DSICCD, GPSNMEA, BaaderDome, DSC, SkywatcherAltAzSimple, RTLSDR, LX200Gemini, Dome, GenericCCD, DomeSim, FocusSim, IOptronV3, PMC8, FFMVCCD, NexDome, QHYCCD, LX200AstroPhysicsGTOCP2, WeatherMeta, WeatherWatcher, FishCampCCD, FLICCD, FLICFW, MaxDomeII, HitecAstroDCFocuser, IEQPro, ioptronHC8406, LX200ZEQ25, TemmaMount, WunderGround, NFocus, PerfectStar, CelestronGPS, LX200GotoNova, MBox, Vantage, WeatherSimulator, FLIPDF, GigECCD, GuideSim, Lakeside, NightCrawler, SimpleDetector, SimpleCCD, FocusMaster, ASICCD, ASIST4, MICCD, TruTech, NSTEP, RainDetector, ArmPlat, INovaCCD, MoonLite, Pyxis, LX200FS2, Paramount, SimpleDevice, QFW, FocusLynxF1, RoboFocus, SestoSenso, SynscanMount, SimpleScope, FilterSim, DMFC, SkyCommander, LX200_16, LX200Autostar, LX200Basic, LX200Classic, LX200GPS, LX200Pulsar2, RollOff, LX200SS2000PC, NexStarEvo, DomeScript, ScopeScript, SmartFocus, and ScopeSim.

◆ getDefaultName() [2/2]

virtual const char* INDI::DefaultDevice::getDefaultName ( )
protectedpure virtual
Returns
Default name of the device.

Implemented in EQMod, MGenAutoguider, SBIGCCD, LX200_10MICRON, USBFocusV3, FilterIFW, indiduino, AstrometryDriver, USBDewpoint, FocusLynxBase, SpectraCyber, Gemini, SXCCD, V4L2_Driver, GPhotoCCD, indi_webcam, FocusLynxF2, WatchDog, TCFS, XAGYLWheel, Imager, SXAO, SnapCap, ShelyakAlpy, SSAGCCD, inditess, SkySafari, QSICCD, FlipFlat, JoyStick, LX200Telescope, ArduinoST4, STAR2000, LX200_OnStep, Microtouch, SQM, SteelDrive, AAGCloudWatcher, GPSD, NightscapeCCD, LX200AstroPhysics, SimpleSkeleton, ShelyakEshel, GPUSB, CCDSim, SXWHEEL, SkywatcherAPIMount, LX200AstroPhysicsExperimental, ApogeeCCD, Integra, ScopeSim, GPSSimulator, ASIWHEEL, RadioSim, SQMSimulator, DSICCD, GPSNMEA, BaaderDome, DSC, SkywatcherAltAzSimple, RTLSDR, LX200Gemini, Dome, GenericCCD, DomeSim, FocusSim, IOptronV3, PMC8, FFMVCCD, NexDome, QHYCCD, LX200AstroPhysicsGTOCP2, WeatherMeta, WeatherWatcher, FishCampCCD, FLICCD, FLICFW, MaxDomeII, HitecAstroDCFocuser, IEQPro, ioptronHC8406, LX200ZEQ25, TemmaMount, WunderGround, NFocus, PerfectStar, CelestronGPS, LX200GotoNova, MBox, Vantage, WeatherSimulator, FLIPDF, GigECCD, GuideSim, Lakeside, NightCrawler, SimpleDetector, SimpleCCD, FocusMaster, ASICCD, ASIST4, MICCD, TruTech, NSTEP, RainDetector, ArmPlat, INovaCCD, MoonLite, Pyxis, LX200FS2, Paramount, SimpleDevice, QFW, FocusLynxF1, RoboFocus, SestoSenso, SynscanMount, SimpleScope, FilterSim, DMFC, SkyCommander, LX200_16, LX200Autostar, LX200Basic, LX200Classic, LX200GPS, LX200Pulsar2, RollOff, LX200SS2000PC, NexStarEvo, DomeScript, ScopeScript, SmartFocus, and ScopeSim.

◆ getDriverExec() [1/2]

virtual const char* INDI::DefaultDevice::getDriverExec ( )
inlinevirtual
Returns
driver executable filename

◆ getDriverExec() [2/2]

virtual const char* INDI::DefaultDevice::getDriverExec ( )
inlinevirtual
Returns
driver executable filename

◆ getDriverInterface() [1/2]

virtual uint16_t INDI::DefaultDevice::getDriverInterface ( )
virtual
Returns
getInterface Return the interface declared by the driver.

Reimplemented from INDI::BaseDevice.

◆ getDriverInterface() [2/2]

uint16_t INDI::DefaultDevice::getDriverInterface ( )
virtual
Returns
getInterface Return the interface declared by the driver.

Reimplemented from INDI::BaseDevice.

◆ getDriverName() [1/2]

virtual const char* INDI::DefaultDevice::getDriverName ( )
inlinevirtual
Returns
driver name

Reimplemented in LX200Telescope.

◆ getDriverName() [2/2]

virtual const char* INDI::DefaultDevice::getDriverName ( )
inlinevirtual
Returns
driver name

Reimplemented in LX200Telescope.

◆ getMajorVersion() [1/2]

uint16_t INDI::DefaultDevice::getMajorVersion ( )
inline
Returns
Major driver version number.

◆ getMajorVersion() [2/2]

uint16_t INDI::DefaultDevice::getMajorVersion ( )
inline
Returns
Major driver version number.

◆ getMinorVersion() [1/2]

uint16_t INDI::DefaultDevice::getMinorVersion ( )
inline
Returns
Minor driver version number.

◆ getMinorVersion() [2/2]

uint16_t INDI::DefaultDevice::getMinorVersion ( )
inline
Returns
Minor driver version number.

◆ getPollingPeriod() [1/2]

uint32_t INDI::DefaultDevice::getPollingPeriod ( )
inlineprotected

◆ getPollingPeriod() [2/2]

uint32_t INDI::DefaultDevice::getPollingPeriod ( )
inlineprotected

◆ initProperties() [1/2]

bool INDI::DefaultDevice::initProperties ( )
protectedvirtual

Initilize properties initial state and value.

The child class must implement this function.

Returns
True if initilization is successful, false otherwise.

Reimplemented in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Telescope, INDI::Telescope, EQMod, MGenAutoguider, INDI::Dome, INDI::Dome, SBIGCCD, LX200_10MICRON, SpectraCyber, USBFocusV3, INDI::Weather, INDI::Weather, USBDewpoint, FocusLynxBase, FilterIFW, Gemini, AstrometryDriver, SXCCD, FocusLynxF2, GPhotoCCD, indi_webcam, indiduino, TCFS, INDI::Rotator, AAGCloudWatcher, INDI::Rotator, INDI::GPS, INDI::GPS, INDI::Focuser, LX200Telescope, INDI::Focuser, ShelyakAlpy, WatchDog, QSICCD, SSAGCCD, inditess, XAGYLWheel, V4L2_Driver, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, Microtouch, SteelDrive, GPSD, NightscapeCCD, ShelyakEshel, CCDSim, LX200AstroPhysics, SimpleSkeleton, SXWHEEL, SkywatcherAPIMount, ScopeSim, ApogeeCCD, SkySafari, SnapCap, LX200AstroPhysicsExperimental, Integra, ASIWHEEL, ArduinoST4, DSC, LX200Gemini, RadioSim, FlipFlat, IOptronV3, PMC8, SkywatcherAltAzSimple, DSICCD, GPSNMEA, SXAO, BaaderDome, CelestronGPS, WeatherMeta, GenericCCD, RTLSDR, FocusSim, IEQPro, Dome, QHYCCD, WeatherWatcher, FFMVCCD, FishCampCCD, FLICCD, FLICFW, JoyStick, LX200AstroPhysicsGTOCP2, WunderGround, MaxDomeII, DomeSim, HitecAstroDCFocuser, MBox, Vantage, WeatherSimulator, FLIPDF, GigECCD, NexDome, GuideSim, NFocus, PerfectStar, LX200Autostar, ASICCD, ASIST4, MICCD, SQMSimulator, STAR2000, FocusLynxF1, Lakeside, NSTEP, NightCrawler, Paramount, SimpleDetector, SimpleCCD, FocusMaster, Imager, GPUSB, TruTech, LX200Pulsar2, SynscanMount, TemmaMount, RainDetector, ArmPlat, INovaCCD, SQM, QFW, MoonLite, Pyxis, LX200Basic, RoboFocus, SestoSenso, SimpleScope, DMFC, ioptronHC8406, LX200_16, LX200Classic, LX200GotoNova, LX200GPS, LX200SS2000PC, LX200ZEQ25, DomeScript, SmartFocus, ScopeScript, RollOff, LX200FS2, NexStarEvo, and ScopeSim.

◆ initProperties() [2/2]

virtual bool INDI::DefaultDevice::initProperties ( )
protectedvirtual

Initilize properties initial state and value.

The child class must implement this function.

Returns
True if initilization is successful, false otherwise.

Reimplemented in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Telescope, INDI::Telescope, EQMod, MGenAutoguider, INDI::Dome, INDI::Dome, SBIGCCD, LX200_10MICRON, SpectraCyber, USBFocusV3, INDI::Weather, INDI::Weather, USBDewpoint, FocusLynxBase, FilterIFW, Gemini, AstrometryDriver, SXCCD, FocusLynxF2, GPhotoCCD, indi_webcam, indiduino, TCFS, INDI::Rotator, AAGCloudWatcher, INDI::Rotator, INDI::GPS, INDI::GPS, INDI::Focuser, LX200Telescope, INDI::Focuser, ShelyakAlpy, WatchDog, QSICCD, SSAGCCD, inditess, XAGYLWheel, V4L2_Driver, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, Microtouch, SteelDrive, GPSD, NightscapeCCD, ShelyakEshel, CCDSim, LX200AstroPhysics, SimpleSkeleton, SXWHEEL, SkywatcherAPIMount, ScopeSim, ApogeeCCD, SkySafari, SnapCap, LX200AstroPhysicsExperimental, Integra, ASIWHEEL, ArduinoST4, DSC, LX200Gemini, RadioSim, FlipFlat, IOptronV3, PMC8, SkywatcherAltAzSimple, DSICCD, GPSNMEA, SXAO, BaaderDome, CelestronGPS, WeatherMeta, GenericCCD, RTLSDR, FocusSim, IEQPro, Dome, QHYCCD, WeatherWatcher, FFMVCCD, FishCampCCD, FLICCD, FLICFW, JoyStick, LX200AstroPhysicsGTOCP2, WunderGround, MaxDomeII, DomeSim, HitecAstroDCFocuser, MBox, Vantage, WeatherSimulator, FLIPDF, GigECCD, NexDome, GuideSim, NFocus, PerfectStar, LX200Autostar, ASICCD, ASIST4, MICCD, SQMSimulator, STAR2000, FocusLynxF1, Lakeside, NSTEP, NightCrawler, Paramount, SimpleDetector, SimpleCCD, FocusMaster, Imager, GPUSB, TruTech, LX200Pulsar2, SynscanMount, TemmaMount, RainDetector, ArmPlat, INovaCCD, SQM, QFW, MoonLite, Pyxis, LX200Basic, RoboFocus, SestoSenso, SimpleScope, DMFC, ioptronHC8406, LX200_16, LX200Classic, LX200GotoNova, LX200GPS, LX200SS2000PC, LX200ZEQ25, DomeScript, SmartFocus, ScopeScript, RollOff, LX200FS2, NexStarEvo, and ScopeSim.

◆ isDebug() [1/2]

bool INDI::DefaultDevice::isDebug ( )
protected
Returns
True if Debug is on, False otherwise.

◆ isDebug() [2/2]

bool INDI::DefaultDevice::isDebug ( )
protected
Returns
True if Debug is on, False otherwise.

◆ ISGetProperties() [1/2]

void INDI::DefaultDevice::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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, EQMod, INDI::Telescope, INDI::Telescope, INDI::Dome, INDI::Dome, SBIGCCD, SXCCD, FocusLynxBase, indiduino, SpectraCyber, AstrometryDriver, GPhotoCCD, INDI::Rotator, INDI::Rotator, INDI::Focuser, INDI::Focuser, indi_webcam, LX200Telescope, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, CCDSim, ShelyakAlpy, V4L2_Driver, WatchDog, SkywatcherAPIMount, ScopeSim, SnapCap, ApogeeCCD, LX200AstroPhysics, AAGCloudWatcher, FlipFlat, SkywatcherAltAzSimple, WeatherMeta, GenericCCD, ShelyakEshel, inditess, FocusSim, QHYCCD, JoyStick, LX200AstroPhysicsExperimental, WeatherWatcher, FishCampCCD, FLICCD, FLICFW, GuideSim, WunderGround, SimpleSkeleton, SkySafari, CelestronGPS, FLIPDF, STAR2000, MICCD, Imager, GPUSB, RadioSim, QFW, LX200AstroPhysicsGTOCP2, LX200Gemini, LX200Pulsar2, LX200_16, LX200Basic, LX200GPS, DomeScript, LX200Classic, ScopeScript, LX200Autostar, SynscanMount, TruTech, INovaCCD, and NexStarEvo.

◆ ISGetProperties() [2/2]

virtual void INDI::DefaultDevice::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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, EQMod, INDI::Telescope, INDI::Telescope, INDI::Dome, INDI::Dome, SBIGCCD, SXCCD, FocusLynxBase, indiduino, SpectraCyber, AstrometryDriver, GPhotoCCD, INDI::Rotator, INDI::Rotator, INDI::Focuser, INDI::Focuser, indi_webcam, LX200Telescope, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, CCDSim, ShelyakAlpy, V4L2_Driver, WatchDog, SkywatcherAPIMount, ScopeSim, SnapCap, ApogeeCCD, LX200AstroPhysics, AAGCloudWatcher, FlipFlat, SkywatcherAltAzSimple, WeatherMeta, GenericCCD, ShelyakEshel, inditess, FocusSim, QHYCCD, JoyStick, LX200AstroPhysicsExperimental, WeatherWatcher, FishCampCCD, FLICCD, FLICFW, GuideSim, WunderGround, SimpleSkeleton, SkySafari, CelestronGPS, FLIPDF, STAR2000, MICCD, Imager, GPUSB, RadioSim, QFW, LX200AstroPhysicsGTOCP2, LX200Gemini, LX200Pulsar2, LX200_16, LX200Basic, LX200GPS, DomeScript, LX200Classic, ScopeScript, LX200Autostar, SynscanMount, TruTech, INovaCCD, and NexStarEvo.

◆ ISNewBLOB() [1/2]

virtual bool INDI::DefaultDevice::ISNewBLOB ( const char *  dev,
const char *  name,
int  sizes[],
int  blobsizes[],
char *  blobs[],
char *  formats[],
char *  names[],
int  n 
)
virtual

Process the client newBLOB 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 in AstrometryDriver, indiduino, TemmaMount, SynscanMount, SkywatcherAPIMount, inditess, SkywatcherAltAzSimple, SimpleSkeleton, Imager, ScopeSim, and NexStarEvo.

◆ ISNewBLOB() [2/2]

bool INDI::DefaultDevice::ISNewBLOB ( const char *  dev,
const char *  name,
int  sizes[],
int  blobsizes[],
char *  blobs[],
char *  formats[],
char *  names[],
int  n 
)
virtual

Process the client newBLOB 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 in AstrometryDriver, indiduino, TemmaMount, SynscanMount, SkywatcherAPIMount, inditess, SkywatcherAltAzSimple, SimpleSkeleton, Imager, ScopeSim, and NexStarEvo.

◆ ISNewNumber() [1/2]

virtual bool INDI::DefaultDevice::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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, EQMod, INDI::Dome, INDI::Telescope, INDI::Dome, INDI::Telescope, SBIGCCD, MGenAutoguider, USBFocusV3, LX200_10MICRON, INDI::Weather, INDI::Weather, FocusLynxBase, USBDewpoint, GPhotoCCD, AstrometryDriver, GigECCD, indiduino, SpectraCyber, Gemini, INDI::Rotator, INDI::Rotator, INDI::GPS, ApogeeCCD, SSAGCCD, INDI::GPS, INDI::Focuser, INDI::Focuser, LX200Telescope, indi_webcam, XAGYLWheel, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, TemmaMount, CCDSim, SteelDrive, QHYCCD, SnapCap, WatchDog, Microtouch, SynscanMount, V4L2_Driver, MICCD, SkywatcherAPIMount, ScopeSim, FishCampCCD, FLICCD, FlipFlat, FocusSim, ASICCD, MaxDomeII, QSICCD, ArduinoST4, Integra, SkywatcherAltAzSimple, AAGCloudWatcher, LX200AstroPhysics, ASIST4, inditess, SkySafari, NightscapeCCD, GuideSim, SimpleSkeleton, NSTEP, CelestronGPS, MBox, WeatherSimulator, SXAO, STAR2000, NFocus, LX200AstroPhysicsExperimental, Paramount, Imager, GPUSB, Lakeside, NightCrawler, Pyxis, DSC, LX200Gemini, ArmPlat, NexDome, MoonLite, SestoSenso, LX200Basic, RadioSim, RoboFocus, IOptronV3, PMC8, DSICCD, SQMSimulator, DMFC, HitecAstroDCFocuser, PerfectStar, SmartFocus, LX200_16, LX200Classic, LX200ZEQ25, IEQPro, LX200SS2000PC, LX200Autostar, FocusMaster, TruTech, LX200FS2, ScopeSim, INovaCCD, and NexStarEvo.

◆ ISNewNumber() [2/2]

bool INDI::DefaultDevice::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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, EQMod, INDI::Dome, INDI::Telescope, INDI::Dome, INDI::Telescope, SBIGCCD, MGenAutoguider, USBFocusV3, LX200_10MICRON, INDI::Weather, INDI::Weather, FocusLynxBase, USBDewpoint, GPhotoCCD, AstrometryDriver, GigECCD, indiduino, SpectraCyber, Gemini, INDI::Rotator, INDI::Rotator, INDI::GPS, ApogeeCCD, SSAGCCD, INDI::GPS, INDI::Focuser, INDI::Focuser, LX200Telescope, indi_webcam, XAGYLWheel, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, TemmaMount, CCDSim, SteelDrive, QHYCCD, SnapCap, WatchDog, Microtouch, SynscanMount, V4L2_Driver, MICCD, SkywatcherAPIMount, ScopeSim, FishCampCCD, FLICCD, FlipFlat, FocusSim, ASICCD, MaxDomeII, QSICCD, ArduinoST4, Integra, SkywatcherAltAzSimple, AAGCloudWatcher, LX200AstroPhysics, ASIST4, inditess, SkySafari, NightscapeCCD, GuideSim, SimpleSkeleton, NSTEP, CelestronGPS, MBox, WeatherSimulator, SXAO, STAR2000, NFocus, LX200AstroPhysicsExperimental, Paramount, Imager, GPUSB, Lakeside, NightCrawler, Pyxis, DSC, LX200Gemini, ArmPlat, NexDome, MoonLite, SestoSenso, LX200Basic, RadioSim, RoboFocus, IOptronV3, PMC8, DSICCD, SQMSimulator, DMFC, HitecAstroDCFocuser, PerfectStar, SmartFocus, LX200_16, LX200Classic, LX200ZEQ25, IEQPro, LX200SS2000PC, LX200Autostar, FocusMaster, TruTech, LX200FS2, ScopeSim, INovaCCD, and NexStarEvo.

◆ ISNewSwitch() [1/2]

bool INDI::DefaultDevice::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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, EQMod, INDI::Telescope, INDI::Telescope, INDI::Dome, INDI::Dome, SBIGCCD, MGenAutoguider, SXCCD, USBFocusV3, LX200_10MICRON, INDI::Weather, INDI::Weather, FocusLynxBase, USBDewpoint, FilterIFW, GPhotoCCD, indiduino, AstrometryDriver, SpectraCyber, TCFS, Gemini, INDI::Rotator, INDI::Rotator, ApogeeCCD, INDI::Focuser, INDI::Focuser, INDI::GPS, LX200Telescope, INDI::GPS, indi_webcam, XAGYLWheel, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, TemmaMount, QHYCCD, CCDSim, SteelDrive, MICCD, WatchDog, Microtouch, SynscanMount, SkywatcherAPIMount, ScopeSim, SnapCap, ShelyakAlpy, V4L2_Driver, FLICCD, BaaderDome, FocusSim, ASICCD, MaxDomeII, QSICCD, FlipFlat, Integra, SkywatcherAltAzSimple, AAGCloudWatcher, FLICFW, inditess, FLIPDF, SkySafari, ShelyakEshel, GuideSim, LX200AstroPhysics, SimpleSkeleton, NightscapeCCD, CelestronGPS, MBox, SXAO, STAR2000, LX200AstroPhysicsExperimental, Paramount, Imager, GPUSB, Lakeside, NSTEP, NightCrawler, Pyxis, DSC, ArmPlat, MoonLite, LX200Pulsar2, RoboFocus, IOptronV3, LX200Gemini, PMC8, DSICCD, NexDome, DMFC, HitecAstroDCFocuser, LX200_16, LX200Classic, IEQPro, ioptronHC8406, LX200AstroPhysicsGTOCP2, LX200GPS, LX200Autostar, LX200GotoNova, LX200ZEQ25, Dome, FocusMaster, FFMVCCD, RollOff, TruTech, RainDetector, ScopeSim, and NexStarEvo.

◆ ISNewSwitch() [2/2]

virtual bool INDI::DefaultDevice::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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, EQMod, INDI::Telescope, INDI::Telescope, INDI::Dome, INDI::Dome, SBIGCCD, MGenAutoguider, SXCCD, USBFocusV3, LX200_10MICRON, INDI::Weather, INDI::Weather, FocusLynxBase, USBDewpoint, FilterIFW, GPhotoCCD, indiduino, AstrometryDriver, SpectraCyber, TCFS, Gemini, INDI::Rotator, INDI::Rotator, ApogeeCCD, INDI::Focuser, INDI::Focuser, INDI::GPS, LX200Telescope, INDI::GPS, indi_webcam, XAGYLWheel, INDI::FilterWheel, INDI::FilterWheel, LX200_OnStep, TemmaMount, QHYCCD, CCDSim, SteelDrive, MICCD, WatchDog, Microtouch, SynscanMount, SkywatcherAPIMount, ScopeSim, SnapCap, ShelyakAlpy, V4L2_Driver, FLICCD, BaaderDome, FocusSim, ASICCD, MaxDomeII, QSICCD, FlipFlat, Integra, SkywatcherAltAzSimple, AAGCloudWatcher, FLICFW, inditess, FLIPDF, SkySafari, ShelyakEshel, GuideSim, LX200AstroPhysics, SimpleSkeleton, NightscapeCCD, CelestronGPS, MBox, SXAO, STAR2000, LX200AstroPhysicsExperimental, Paramount, Imager, GPUSB, Lakeside, NSTEP, NightCrawler, Pyxis, DSC, ArmPlat, MoonLite, LX200Pulsar2, RoboFocus, IOptronV3, LX200Gemini, PMC8, DSICCD, NexDome, DMFC, HitecAstroDCFocuser, LX200_16, LX200Classic, IEQPro, ioptronHC8406, LX200AstroPhysicsGTOCP2, LX200GPS, LX200Autostar, LX200GotoNova, LX200ZEQ25, Dome, FocusMaster, FFMVCCD, RollOff, TruTech, RainDetector, ScopeSim, and NexStarEvo.

◆ ISNewText() [1/2]

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

◆ ISNewText() [2/2]

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

◆ isSimulation() [1/2]

bool INDI::DefaultDevice::isSimulation ( )
protected
Returns
True if Simulation is on, False otherwise.

◆ isSimulation() [2/2]

bool INDI::DefaultDevice::isSimulation ( )
protected
Returns
True if Simulation is on, False otherwise.

◆ ISSnoopDevice() [1/2]

bool INDI::DefaultDevice::ISSnoopDevice ( XMLEle root)
virtual

Process a snoop event from INDI server.

This function is called when a snooped property is updated in a snooped driver.

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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Telescope, INDI::Telescope, INDI::Dome, INDI::Dome, INDI::Weather, INDI::Weather, AstrometryDriver, SpectraCyber, indiduino, INDI::Focuser, INDI::Focuser, CCDSim, INDI::FilterWheel, INDI::FilterWheel, SnapCap, FlipFlat, GuideSim, Imager, JoyStick, STAR2000, GPUSB, WeatherMeta, Dome, and RollOff.

◆ ISSnoopDevice() [2/2]

virtual bool INDI::DefaultDevice::ISSnoopDevice ( XMLEle root)
virtual

Process a snoop event from INDI server.

This function is called when a snooped property is updated in a snooped driver.

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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Telescope, INDI::Telescope, INDI::Dome, INDI::Dome, INDI::Weather, INDI::Weather, AstrometryDriver, SpectraCyber, indiduino, INDI::Focuser, INDI::Focuser, CCDSim, INDI::FilterWheel, INDI::FilterWheel, SnapCap, FlipFlat, GuideSim, Imager, JoyStick, STAR2000, GPUSB, WeatherMeta, Dome, and RollOff.

◆ loadConfig() [1/2]

virtual bool INDI::DefaultDevice::loadConfig ( bool  silent = false,
const char *  property = nullptr 
)
protectedvirtual

Load the last saved configuration file.

Parameters
silentif true, don't report any error or notification messages.
propertyName of property to load configuration for. If nullptr, all properties in the configuration file are loaded which is the default behavior.
Returns
True if successful, false otherwise.

Reimplemented in FilterIFW.

◆ loadConfig() [2/2]

bool INDI::DefaultDevice::loadConfig ( bool  silent = false,
const char *  property = nullptr 
)
protectedvirtual

Load the last saved configuration file.

Parameters
silentif true, don't report any error or notification messages.
propertyName of property to load configuration for. If nullptr, all properties in the configuration file are loaded which is the default behavior.
Returns
True if successful, false otherwise.

Reimplemented in FilterIFW.

◆ loadDefaultConfig() [1/2]

bool INDI::DefaultDevice::loadDefaultConfig ( )
protectedvirtual

Load the default configuration file.

Returns
True if successful, false otherwise.

◆ loadDefaultConfig() [2/2]

virtual bool INDI::DefaultDevice::loadDefaultConfig ( )
protectedvirtual

Load the default configuration file.

Returns
True if successful, false otherwise.

◆ registerConnection() [1/2]

void INDI::DefaultDevice::registerConnection ( Connection::Interface newConnection)
protected

registerConnection Add new connection plugin to the existing connection pool.

The connection type shall be defined to the client in ISGetProperties()

Parameters
newConnectionPointer to new connection plugin

◆ registerConnection() [2/2]

void INDI::DefaultDevice::registerConnection ( Connection::Interface newConnection)
protected

registerConnection Add new connection plugin to the existing connection pool.

The connection type shall be defined to the client in ISGetProperties()

Parameters
newConnectionPointer to new connection plugin

◆ RemoveTimer() [1/2]

void INDI::DefaultDevice::RemoveTimer ( int  id)

Remove timer added with SetTimer.

Parameters
idID of the timer as returned from SetTimer

◆ RemoveTimer() [2/2]

void INDI::DefaultDevice::RemoveTimer ( int  id)

Remove timer added with SetTimer.

Parameters
idID of the timer as returned from SetTimer

◆ resetProperties() [1/2]

void INDI::DefaultDevice::resetProperties ( )

Set all properties to IDLE state.

◆ resetProperties() [2/2]

void INDI::DefaultDevice::resetProperties ( )

Set all properties to IDLE state.

◆ saveAllConfigItems() [1/2]

bool INDI::DefaultDevice::saveAllConfigItems ( FILE *  fp)
protectedvirtual

saveAllConfigItems Save all the drivers' properties in the configuration file

Parameters
fppointer to config file handler
Returns
True if successful, false otherwise.

◆ saveAllConfigItems() [2/2]

virtual bool INDI::DefaultDevice::saveAllConfigItems ( FILE *  fp)
protectedvirtual

saveAllConfigItems Save all the drivers' properties in the configuration file

Parameters
fppointer to config file handler
Returns
True if successful, false otherwise.

◆ saveConfig() [1/2]

bool INDI::DefaultDevice::saveConfig ( bool  silent = false,
const char *  property = nullptr 
)
protectedvirtual

Save the current properties in a configuration file.

Parameters
silentif true, don't report any error or notification messages.
propertyName of specific property to save while leaving all others properties in the file as is.
Returns
True if successful, false otherwise.

◆ saveConfig() [2/2]

virtual bool INDI::DefaultDevice::saveConfig ( bool  silent = false,
const char *  property = nullptr 
)
protectedvirtual

Save the current properties in a configuration file.

Parameters
silentif true, don't report any error or notification messages.
propertyName of specific property to save while leaving all others properties in the file as is.
Returns
True if successful, false otherwise.

◆ saveConfigItems() [1/2]

bool INDI::DefaultDevice::saveConfigItems ( FILE *  fp)
protectedvirtual

saveConfigItems Save specific properties in the provide config file handler.

Child class usually override this function to save their own properties and the base class saveConfigItems(fp) must be explicitly called by each child class. The Default Device saveConfigItems(fp) only save Debug properties options in the config file.

Parameters
fpPointer to config file handler
Returns
True if successful, false otherwise.

Reimplemented in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Dome, INDI::Dome, INDI::Telescope, INDI::Telescope, EQMod, INDI::Weather, INDI::Weather, SBIGCCD, LX200Telescope, FilterIFW, GPhotoCCD, AstrometryDriver, indi_webcam, FocusLynxBase, INDI::Focuser, LX200AstroPhysicsExperimental, INDI::Focuser, CCDSim, INDI::Rotator, INDI::Rotator, CelestronGPS, INDI::GPS, INDI::GPS, INDI::FilterWheel, LX200AstroPhysics, INDI::FilterWheel, Gemini, V4L2_Driver, LX200AstroPhysicsGTOCP2, GuideSim, SSAGCCD, ApogeeCCD, ASICCD, XAGYLWheel, QSICCD, WatchDog, QHYCCD, Integra, SkywatcherAPIMount, FLICCD, MICCD, SnapCap, LX200Gemini, NightscapeCCD, SkywatcherAltAzSimple, SkySafari, FlipFlat, JoyStick, NightCrawler, ioptronHC8406, DSICCD, SteelDrive, IOptronV3, LX200GotoNova, PMC8, IEQPro, WeatherMeta, NSTEP, DSC, WeatherWatcher, WunderGround, STAR2000, ArmPlat, BaaderDome, NFocus, SmartFocus, WeatherSimulator, RoboFocus, DMFC, MaxDomeII, HitecAstroDCFocuser, PerfectStar, LX200SS2000PC, LX200FS2, RollOff, DomeScript, ScopeScript, and NexStarEvo.

◆ saveConfigItems() [2/2]

virtual bool INDI::DefaultDevice::saveConfigItems ( FILE *  fp)
protectedvirtual

saveConfigItems Save specific properties in the provide config file handler.

Child class usually override this function to save their own properties and the base class saveConfigItems(fp) must be explicitly called by each child class. The Default Device saveConfigItems(fp) only save Debug properties options in the config file.

Parameters
fpPointer to config file handler
Returns
True if successful, false otherwise.

Reimplemented in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Dome, INDI::Dome, INDI::Telescope, INDI::Telescope, EQMod, INDI::Weather, INDI::Weather, SBIGCCD, LX200Telescope, FilterIFW, GPhotoCCD, AstrometryDriver, indi_webcam, FocusLynxBase, INDI::Focuser, LX200AstroPhysicsExperimental, INDI::Focuser, CCDSim, INDI::Rotator, INDI::Rotator, CelestronGPS, INDI::GPS, INDI::GPS, INDI::FilterWheel, LX200AstroPhysics, INDI::FilterWheel, Gemini, V4L2_Driver, LX200AstroPhysicsGTOCP2, GuideSim, SSAGCCD, ApogeeCCD, ASICCD, XAGYLWheel, QSICCD, WatchDog, QHYCCD, Integra, SkywatcherAPIMount, FLICCD, MICCD, SnapCap, LX200Gemini, NightscapeCCD, SkywatcherAltAzSimple, SkySafari, FlipFlat, JoyStick, NightCrawler, ioptronHC8406, DSICCD, SteelDrive, IOptronV3, LX200GotoNova, PMC8, IEQPro, WeatherMeta, NSTEP, DSC, WeatherWatcher, WunderGround, STAR2000, ArmPlat, BaaderDome, NFocus, SmartFocus, WeatherSimulator, RoboFocus, DMFC, MaxDomeII, HitecAstroDCFocuser, PerfectStar, LX200SS2000PC, LX200FS2, RollOff, DomeScript, ScopeScript, and NexStarEvo.

◆ setConnected() [1/2]

virtual void INDI::DefaultDevice::setConnected ( bool  status,
IPState  state = IPS_OK,
const char *  msg = nullptr 
)
virtual

Set connection switch status in the client.

Parameters
statusIf true, the driver will attempt to connect to the device (CONNECT=ON). If false, it will attempt to disconnect the device.
statusTrue to set CONNECT on, false to set DISCONNECT on.
stateState of CONNECTION properti, by default IPS_OK.
msgA message to be sent along with connect/disconnect command, by default nullptr.

◆ setConnected() [2/2]

void INDI::DefaultDevice::setConnected ( bool  status,
IPState  state = IPS_OK,
const char *  msg = nullptr 
)
virtual

Set connection switch status in the client.

Parameters
statusIf true, the driver will attempt to connect to the device (CONNECT=ON). If false, it will attempt to disconnect the device.
statusTrue to set CONNECT on, false to set DISCONNECT on.
stateState of CONNECTION properti, by default IPS_OK.
msgA message to be sent along with connect/disconnect command, by default nullptr.

◆ setDebug() [1/2]

void INDI::DefaultDevice::setDebug ( bool  enable)
protected

Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client.

Parameters
enableIf true, the Debug option is set to ON.

◆ setDebug() [2/2]

void INDI::DefaultDevice::setDebug ( bool  enable)
protected

Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client.

Parameters
enableIf true, the Debug option is set to ON.

◆ setDefaultPollingPeriod() [1/2]

void INDI::DefaultDevice::setDefaultPollingPeriod ( uint32_t  period)
protected

◆ setDefaultPollingPeriod() [2/2]

void INDI::DefaultDevice::setDefaultPollingPeriod ( uint32_t  period)
protected

◆ setDriverInterface() [1/2]

void INDI::DefaultDevice::setDriverInterface ( uint16_t  value)

setInterface Set driver interface.

By default the driver interface is set to GENERAL_DEVICE. You may send an ORed list of DeviceInterface values.

Parameters
valueORed list of DeviceInterface values.

◆ setDriverInterface() [2/2]

void INDI::DefaultDevice::setDriverInterface ( uint16_t  value)

setInterface Set driver interface.

By default the driver interface is set to GENERAL_DEVICE. You may send an ORed list of DeviceInterface values.

Parameters
valueORed list of DeviceInterface values.

◆ setDynamicPropertiesBehavior() [1/2]

void INDI::DefaultDevice::setDynamicPropertiesBehavior ( bool  defineEnabled,
bool  deleteEnabled 
)
inlineprotected

setDynamicPropertiesBehavior controls handling of dynamic properties.

Dyanmic properties are those generated from an external skeleton XML file. By default all properties, including dynamic properties, are defined to the client in ISGetProperties(). Furthermore, when űdeleteProperty(properyName) is called, the dynamic property is deleted by default, and can only be restored by calling buildSkeleton(filename) again. However, it is sometimes desirable to skip the definition of the dynamic properties on startup and delegate this task to the child class. To control this behavior, set enabled to false.

Parameters
defineEnabledTrue to define all dynamic properties in INDI::DefaultDevice own ISGetProperties() on startup. False to skip defining dynamic properties.
deleteEnabledTrue to delete dynamic properties from memory in deleteProperty(name). False to keep dynamic property in the properties list, but delete it from the client.
Note
This function has no effect on regular properties initialized directly by the driver.

◆ setDynamicPropertiesBehavior() [2/2]

void INDI::DefaultDevice::setDynamicPropertiesBehavior ( bool  defineEnabled,
bool  deleteEnabled 
)
inlineprotected

setDynamicPropertiesBehavior controls handling of dynamic properties.

Dyanmic properties are those generated from an external skeleton XML file. By default all properties, including dynamic properties, are defined to the client in ISGetProperties(). Furthermore, when űdeleteProperty(properyName) is called, the dynamic property is deleted by default, and can only be restored by calling buildSkeleton(filename) again. However, it is sometimes desirable to skip the definition of the dynamic properties on startup and delegate this task to the child class. To control this behavior, set enabled to false.

Parameters
defineEnabledTrue to define all dynamic properties in INDI::DefaultDevice own ISGetProperties() on startup. False to skip defining dynamic properties.
deleteEnabledTrue to delete dynamic properties from memory in deleteProperty(name). False to keep dynamic property in the properties list, but delete it from the client.
Note
This function has no effect on regular properties initialized directly by the driver.

◆ setSimulation() [1/2]

void INDI::DefaultDevice::setSimulation ( bool  enable)
protected

Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client.

Parameters
enableIf true, the Simulation option is set to ON.

◆ setSimulation() [2/2]

void INDI::DefaultDevice::setSimulation ( bool  enable)
protected

Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client.

Parameters
enableIf true, the Simulation option is set to ON.

◆ SetTimer() [1/2]

int INDI::DefaultDevice::SetTimer ( uint32_t  ms)

Set a timer to call the function TimerHit after ms milliseconds.

Parameters
mstimer duration in milliseconds.
Returns
id of the timer to be used with RemoveTimer

◆ SetTimer() [2/2]

int INDI::DefaultDevice::SetTimer ( uint32_t  ms)

Set a timer to call the function TimerHit after ms milliseconds.

Parameters
mstimer duration in milliseconds.
Returns
id of the timer to be used with RemoveTimer

◆ setVersion() [1/2]

void INDI::DefaultDevice::setVersion ( uint16_t  vMajor,
uint16_t  vMinor 
)
inline

Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.

Parameters
vMajormajor revision number
vMinorminor revision number

◆ setVersion() [2/2]

void INDI::DefaultDevice::setVersion ( uint16_t  vMajor,
uint16_t  vMinor 
)
inline

Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.

Parameters
vMajormajor revision number
vMinorminor revision number

◆ simulationTriggered() [1/2]

virtual void INDI::DefaultDevice::simulationTriggered ( bool  enable)
protectedvirtual

Inform driver that the simulation option was triggered.

This function is called after setSimulation is triggered by the client. Reimplement this function if your driver needs to take specific action after simulation is enabled/disabled. Otherwise, you can use isSimulation() to check if simulation is enabled or disabled.

Parameters
enableIf true, the simulation option is set to ON.

Reimplemented in SXCCD, FilterIFW, CelestronGPS, FocusLynxF2, IOptronV3, PMC8, IEQPro, FishCampCCD, DSC, and QFW.

◆ simulationTriggered() [2/2]

void INDI::DefaultDevice::simulationTriggered ( bool  enable)
protectedvirtual

Inform driver that the simulation option was triggered.

This function is called after setSimulation is triggered by the client. Reimplement this function if your driver needs to take specific action after simulation is enabled/disabled. Otherwise, you can use isSimulation() to check if simulation is enabled or disabled.

Parameters
enableIf true, the simulation option is set to ON.

Reimplemented in SXCCD, FilterIFW, CelestronGPS, FocusLynxF2, IOptronV3, PMC8, IEQPro, FishCampCCD, DSC, and QFW.

◆ TimerHit() [1/2]

void INDI::DefaultDevice::TimerHit ( )
virtual

◆ TimerHit() [2/2]

virtual void INDI::DefaultDevice::TimerHit ( )
virtual

◆ unRegisterConnection() [1/2]

bool INDI::DefaultDevice::unRegisterConnection ( Connection::Interface existingConnection)
protected

unRegisterConnection Remove connection from existing pool

Parameters
existingConnectionpointer to connection interface
Returns
True if connection is removed, false otherwise.

◆ unRegisterConnection() [2/2]

bool INDI::DefaultDevice::unRegisterConnection ( Connection::Interface existingConnection)
protected

unRegisterConnection Remove connection from existing pool

Parameters
existingConnectionpointer to connection interface
Returns
True if connection is removed, false otherwise.

◆ updateProperties() [1/2]

bool INDI::DefaultDevice::updateProperties ( )
protectedvirtual

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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Telescope, INDI::Telescope, EQMod, MGenAutoguider, INDI::Dome, INDI::Dome, SBIGCCD, LX200_10MICRON, USBFocusV3, INDI::Weather, INDI::Weather, FilterIFW, USBDewpoint, FocusLynxBase, Gemini, AstrometryDriver, SXCCD, indiduino, GPhotoCCD, indi_webcam, SkywatcherAPIMount, TCFS, INDI::Rotator, INDI::Rotator, INDI::Focuser, INDI::GPS, SkywatcherAltAzSimple, INDI::Focuser, INDI::GPS, LX200Telescope, ShelyakAlpy, QSICCD, SSAGCCD, XAGYLWheel, V4L2_Driver, INDI::FilterWheel, LX200_OnStep, INDI::FilterWheel, Microtouch, SteelDrive, GPSD, NightscapeCCD, ShelyakEshel, CCDSim, LX200AstroPhysics, ScopeSim, SnapCap, ApogeeCCD, LX200AstroPhysicsExperimental, Integra, ArduinoST4, FlipFlat, DSC, LX200Gemini, RadioSim, IOptronV3, PMC8, GenericCCD, DSICCD, GPSNMEA, SXAO, BaaderDome, FocusSim, CelestronGPS, WeatherMeta, QHYCCD, RTLSDR, IEQPro, Dome, FishCampCCD, FLICCD, FLICFW, FFMVCCD, JoyStick, DomeSim, LX200AstroPhysicsGTOCP2, FLIPDF, MaxDomeII, NexDome, HitecAstroDCFocuser, MBox, WeatherSimulator, GigECCD, MICCD, GuideSim, NFocus, PerfectStar, LX200Autostar, ASICCD, ASIST4, SQMSimulator, STAR2000, Lakeside, NSTEP, NightCrawler, Paramount, SimpleDetector, SimpleCCD, FocusMaster, Imager, GPUSB, TruTech, LX200Pulsar2, TemmaMount, RainDetector, ArmPlat, INovaCCD, SQM, FocusLynxF1, MoonLite, Pyxis, LX200Basic, DomeScript, RoboFocus, SestoSenso, DMFC, LX200Classic, LX200_16, LX200GPS, LX200SS2000PC, ioptronHC8406, SynscanMount, RollOff, SmartFocus, LX200GotoNova, LX200ZEQ25, and LX200FS2.

◆ updateProperties() [2/2]

virtual bool INDI::DefaultDevice::updateProperties ( )
protectedvirtual

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 in INDI::CCD, INDI::CCD, INDI::Detector, INDI::Detector, INDI::Telescope, INDI::Telescope, EQMod, MGenAutoguider, INDI::Dome, INDI::Dome, SBIGCCD, LX200_10MICRON, USBFocusV3, INDI::Weather, INDI::Weather, FilterIFW, USBDewpoint, FocusLynxBase, Gemini, AstrometryDriver, SXCCD, indiduino, GPhotoCCD, indi_webcam, SkywatcherAPIMount, TCFS, INDI::Rotator, INDI::Rotator, INDI::Focuser, INDI::GPS, SkywatcherAltAzSimple, INDI::Focuser, INDI::GPS, LX200Telescope, ShelyakAlpy, QSICCD, SSAGCCD, XAGYLWheel, V4L2_Driver, INDI::FilterWheel, LX200_OnStep, INDI::FilterWheel, Microtouch, SteelDrive, GPSD, NightscapeCCD, ShelyakEshel, CCDSim, LX200AstroPhysics, ScopeSim, SnapCap, ApogeeCCD, LX200AstroPhysicsExperimental, Integra, ArduinoST4, FlipFlat, DSC, LX200Gemini, RadioSim, IOptronV3, PMC8, GenericCCD, DSICCD, GPSNMEA, SXAO, BaaderDome, FocusSim, CelestronGPS, WeatherMeta, QHYCCD, RTLSDR, IEQPro, Dome, FishCampCCD, FLICCD, FLICFW, FFMVCCD, JoyStick, DomeSim, LX200AstroPhysicsGTOCP2, FLIPDF, MaxDomeII, NexDome, HitecAstroDCFocuser, MBox, WeatherSimulator, GigECCD, MICCD, GuideSim, NFocus, PerfectStar, LX200Autostar, ASICCD, ASIST4, SQMSimulator, STAR2000, Lakeside, NSTEP, NightCrawler, Paramount, SimpleDetector, SimpleCCD, FocusMaster, Imager, GPUSB, TruTech, LX200Pulsar2, TemmaMount, RainDetector, ArmPlat, INovaCCD, SQM, FocusLynxF1, MoonLite, Pyxis, LX200Basic, DomeScript, RoboFocus, SestoSenso, DMFC, LX200Classic, LX200_16, LX200GPS, LX200SS2000PC, ioptronHC8406, SynscanMount, RollOff, SmartFocus, LX200GotoNova, LX200ZEQ25, and LX200FS2.

Friends And Related Function Documentation

◆ Connection::Serial

◆ Connection::TCP

◆ FilterInterface

Member Data Documentation

◆ activeConnection

Connection::Interface * INDI::DefaultDevice::activeConnection = nullptr
private

◆ ConfigProcessS

ISwitch INDI::DefaultDevice::ConfigProcessS
private

◆ ConfigProcessSP

ISwitchVectorProperty INDI::DefaultDevice::ConfigProcessSP
private

◆ ConnectionModeS

ISwitch * INDI::DefaultDevice::ConnectionModeS = nullptr
private

◆ ConnectionModeSP

ISwitchVectorProperty INDI::DefaultDevice::ConnectionModeSP
private

◆ ConnectionS

ISwitch INDI::DefaultDevice::ConnectionS
private

◆ connections

std::vector< Connection::Interface * > INDI::DefaultDevice::connections
private

◆ ConnectionSP

ISwitchVectorProperty INDI::DefaultDevice::ConnectionSP
private

◆ DebugS

ISwitch INDI::DefaultDevice::DebugS
private

◆ DebugSP

ISwitchVectorProperty INDI::DefaultDevice::DebugSP
private

◆ defineDynamicProperties

bool INDI::DefaultDevice::defineDynamicProperties = true
private

◆ deleteDynamicProperties

bool INDI::DefaultDevice::deleteDynamicProperties = true
private

◆ DriverInfoT

IText INDI::DefaultDevice::DriverInfoT {}
private

◆ DriverInfoTP

ITextVectorProperty INDI::DefaultDevice::DriverInfoTP
private

◆ interfaceDescriptor

uint16_t INDI::DefaultDevice::interfaceDescriptor { 0 }
private

◆ isInit

bool INDI::DefaultDevice::isInit { false }
private

◆ majorVersion

uint16_t INDI::DefaultDevice::majorVersion { 1 }
private

◆ minorVersion

uint16_t INDI::DefaultDevice::minorVersion { 0 }
private

◆ pDebug

bool INDI::DefaultDevice::pDebug { false }
private

◆ POLLMS

uint32_t INDI::DefaultDevice::POLLMS = 1000
protected

Period in milliseconds to call TimerHit(). Default 1000 ms.

◆ PollPeriodN

INumber INDI::DefaultDevice::PollPeriodN
private

◆ PollPeriodNP

INumberVectorProperty INDI::DefaultDevice::PollPeriodNP
private

◆ pSimulation

bool INDI::DefaultDevice::pSimulation { false }
private

◆ SimulationS

ISwitch INDI::DefaultDevice::SimulationS
private

◆ SimulationSP

ISwitchVectorProperty INDI::DefaultDevice::SimulationSP
private

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