74 if (mShutterSwitch[0].getState() ==
ISS_ON)
96 if (mShutterSwitch[0].getState() ==
ISS_ON)
107 oldRainState = newRainState;
108 }, BaseDevice::WATCH_NEW_OR_UPDATE);
138 mShutterSwitch.
apply(
"Shutter is closing...");
145 mShutterSwitch.
apply(
"Shutter is closed.");
154 if (mRainLight[0].getState() ==
IPS_ALERT)
159 mShutterSwitch.
apply(
"It is raining, cannot open Shutter.");
164 mShutterSwitch.
apply(
"Shutter is opening...");
171 mShutterSwitch.
apply(
"Shutter is open.");
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
bool Disconnect() override
Disconnect from device.
const char * getDefaultName() override
Class to provide basic INDI device functionality.
const char * getDeviceName() const
virtual bool updateProperties()
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
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.
void defineProperty(INumberVectorProperty *property)
virtual bool initProperties()
Initilize properties initial state and value. The child class must implement this function.
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
void fill(const char *device, const char *name, const char *label, const char *group, IPState state)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
void onUpdate(const std::function< void()> &callback)
static void singleShot(int msec, const std::function< void()> &callback)
This static function calls a the given function after a given time interval.
const char * MAIN_CONTROL_TAB
MAIN_CONTROL_TAB Where all the primary controls for the device are located.
std::unique_ptr< Dome > dome(new Dome())
Construct a dome device that the user may operate to open or close the dome shutter door....
void IDMessage(const char *dev, const char *fmt,...)