Instrument Neutral Distributed Interface INDI  2.0.2
raindetector.h
Go to the documentation of this file.
1 /*
2  INDI Developers Manual
3  Tutorial #5 - Snooping
4 
5  Rain Detector
6 
7  Refer to README, which contains instruction on how to build this driver, and use it
8  with an INDI-compatible client.
9 
10 */
11 
21 #pragma once
22 
23 #include <defaultdevice.h>
24 #include <indipropertylight.h>
25 #include <indipropertyswitch.h>
26 
28 {
29  public:
30  RainDetector() = default;
31 
32  protected:
33  // General device functions
34  bool Connect() override;
35  bool Disconnect() override;
36  const char *getDefaultName() override;
37  bool initProperties() override;
38  bool updateProperties() override;
39 
40  private:
41  INDI::PropertyLight mRainLight {1};
42  INDI::PropertySwitch mRainSwitch {2};
43 };
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
bool Disconnect() override
Disconnect from device.
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....
const char * getDefaultName() override
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
RainDetector()=default