117 class DefaultDevicePrivate;
247 void setVersion(uint16_t vMajor, uint16_t vMinor);
277 virtual
bool ISNewSwitch(const
char *dev, const
char *name,
ISState *states,
char *names[],
int n);
284 virtual
bool ISNewNumber(const
char *dev, const
char *name,
double values[],
char *names[],
int n);
291 virtual
bool ISNewText(const
char *dev, const
char *name,
char *texts[],
char *names[],
int n);
298 virtual
bool ISNewBLOB(const
char *dev, const
char *name,
int sizes[],
int blobsizes[],
char *blobs[],
299 char *formats[],
char *names[],
int n);
356 virtual
bool loadConfig(
bool silent = false, const
char *property =
nullptr);
374 virtual
bool saveConfig(
bool silent = false, const
char *property =
nullptr);
543 #define POLLMS refCurrentPollingPeriod()
__attribute__((__format__(__printf__, 2, 0))) void CelestronDriver
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
The TCP class manages connection with devices over the network via TCP/IP. Upon successfull connectio...
Class to provide basic INDI device functionality.
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
void defineSwitch(ISwitchVectorProperty *svp)
Define switch vector to client & register it. Alternatively, IDDefswitch can be used but the property...
void addPollPeriodControl()
Add Polling period control to the driver.
virtual bool purgeConfig()
purgeConfig Remove config file from disk.
virtual bool updateProperties()
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
void setSimulation(bool enable)
Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled b...
void defineBLOB(IBLOBVectorProperty *bvp)
Define BLOB vector to client & register it. Alternatively, IDDefBLOB can be used but the property wil...
void setDynamicPropertiesBehavior(bool defineEnabled, bool deleteEnabled)
setDynamicPropertiesBehavior controls handling of dynamic properties. Dyanmic properties are those ge...
bool isInitializationComplete() const
isInitializationComplete Check if driver initialization is complete.
virtual bool saveConfig(bool silent=false, const char *property=nullptr)
Save the current properties in a configuration file.
virtual const char * getDefaultName()=0
void setCurrentPollingPeriod(uint32_t msec)
setCurrentPollingPeriod Change the current polling period to call TimerHit() function in the driver.
void addConfigurationControl()
Add Configuration control to the driver.
virtual ~DefaultDevice() override=default
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process the client newSwitch command.
uint16_t getMajorVersion() const
void addSimulationControl()
Add Simulation control to the driver.
virtual bool Disconnect()
Disconnect from device.
void setPollingPeriodRange(uint32_t minimum, uint32_t maximum)
setPollingPeriodRange Set the range permitted by the polling range in milliseconds
void registerConnection(Connection::Interface *newConnection)
registerConnection Add new connection plugin to the existing connection pool. The connection type sha...
void setDefaultPollingPeriod(uint32_t msec)
setDefaultPollingPeriod Change the default polling period to call TimerHit() function in the driver.
void defineNumber(INumberVectorProperty *nvp)
Define number vector to client & register it. Alternatively, IDDefNumber can be used but the property...
virtual void ISGetProperties(const char *dev)
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
void setActiveConnection(Connection::Interface *existingConnection)
setActiveConnection Switch the active connection to the passed connection plugin
bool isConfigLoading() const
isConfigLoading Check if driver configuration is currently in the process of getting loaded.
virtual void setConnected(bool status, IPState state=IPS_OK, const char *msg=nullptr)
Set connection switch status in the client.
uint32_t & refCurrentPollingPeriod() __attribute__((deprecated))
virtual bool ISSnoopDevice(XMLEle *root)
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
void setVersion(uint16_t vMajor, uint16_t vMinor)
Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.
virtual bool loadConfig(bool silent=false, const char *property=nullptr)
Load the last saved configuration file.
bool unRegisterConnection(Connection::Interface *existingConnection)
unRegisterConnection Remove connection from existing pool
void watchDevice(const char *deviceName, const std::function< void(INDI::BaseDevice)> &callback)
Add a device to the watch list.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
uint32_t getPollingPeriod() const
getPollingPeriod Return the polling period.
virtual void simulationTriggered(bool enable)
Inform driver that the simulation option was triggered. This function is called after setSimulation i...
void defineProperty(INumberVectorProperty *property)
virtual bool saveConfigItems(FILE *fp)
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual void TimerHit()
Callback function to be called once SetTimer duration elapses.
uint32_t getCurrentPollingPeriod() const
getCurrentPollingPeriod Return the current polling period.
void defineText(ITextVectorProperty *tvp)
Define text vector to client & register it. Alternatively, IDDefText can be used but the property wil...
void setDebug(bool enable)
Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client.
virtual bool initProperties()
Initilize properties initial state and value. The child class must implement this function.
bool isSimulation() const
void syncDriverInfo()
syncDriverInfo sends the current driver information to the client.
void addAuxControls()
Add Debug, Simulation, and Configuration options to the driver.
virtual bool saveAllConfigItems(FILE *fp)
saveAllConfigItems Save all the drivers' properties in the configuration file
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.
virtual const char * getDriverName()
virtual bool loadDefaultConfig()
Load the default configuration file.
void defineLight(ILightVectorProperty *lvp)
Define light vector to client & register it. Alternatively, IDDeflight can be used but the property w...
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process the client newNumber command.
void setDriverInterface(uint16_t value)
setInterface Set driver interface. By default the driver interface is set to GENERAL_DEVICE....
void resetProperties()
Set all properties to IDLE state.
virtual void debugTriggered(bool enable)
Inform driver that the debug option was triggered. This function is called after setDebug is triggere...
void RemoveTimer(int id)
Remove timer added with SetTimer.
Connection::Interface * getActiveConnection()
int SetTimer(uint32_t ms)
Set a timer to call the function TimerHit after ms milliseconds.
DefaultDevice(const std::shared_ptr< DefaultDevicePrivate > &dd)
virtual const char * getDriverExec()
uint16_t getMinorVersion() const
virtual bool Connect()
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
uint16_t getDriverInterface() const
void addDebugControl()
Add Debug control to the driver.
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Process the client newSwitch command.
Provides interface to implement focuser functionality.
The class is used to create device instances. Class copying is not allowed. When an object is destroy...
Provides generic container for INDI properties.
const char * GUIDE_TAB
GUIDE_TAB Where all the properties for guiding are located.
const char * CONNECTION_TAB
CONNECTION_TAB Where all device connection settings (serial, usb, ethernet) are defined and controlle...
const char * FILTER_TAB
FILTER_TAB Where all the properties for filter wheels are located.
const char * MAIN_CONTROL_TAB
MAIN_CONTROL_TAB Where all the primary controls for the device are located.
const char * DATETIME_TAB
DATETIME_TAB Where all date and time setting properties are located.
const char * SATELLITE_TAB
SATELLITE_TAB.
const char * COMMUNICATION_TAB
COMMUNICATION_TAB Where all the properties required to connect/disconnect from a device are located....
const char * INFO_TAB
INFO_TAB Where all the properties for general information are located.
const char * MOTION_TAB
MOTION_TAB Where all the motion control properties of the device are located.
const char * ALIGNMENT_TAB
ALIGNMENT_TAB Where all the properties for guiding are located.
const char * SITE_TAB
SITE_TAB Where all site information setting are located.
const char * FOCUS_TAB
FOCUS_TAB Where all the properties for focuser are located.
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
#define INDI_DEPRECATED(message)
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...
Namespace to encapsulate INDI client, drivers, and mediator classes.
BLOB (Binary Large Object) vector property descriptor.
Light vector property descriptor.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.