Instrument Neutral Distributed Interface INDI  2.0.2
dome.h
Go to the documentation of this file.
1 /*
2  INDI Developers Manual
3  Tutorial #5 - Snooping
4 
5  Dome
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 
26 #pragma once
27 
28 #include <defaultdevice.h>
29 #include <indipropertyswitch.h>
30 #include <indipropertylight.h>
31 
32 class Dome : public INDI::DefaultDevice
33 {
34  public:
35  Dome() = default;
36 
37  public:
38  void closeShutter();
39  void openShutter();
40 
41  protected:
42  // General device functions
43  bool Connect() override;
44  bool Disconnect() override;
45  const char *getDefaultName() override;
46  bool initProperties() override;
47  bool updateProperties() override;
48 
49  private:
50  INDI::PropertySwitch mShutterSwitch {2};
51  INDI::PropertyLight mRainLight {1};
52 };
Definition: dome.h:33
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: dome.cpp:38
Dome()=default
bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: dome.cpp:64
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition: dome.cpp:118
void openShutter()
Definition: dome.cpp:152
bool Disconnect() override
Disconnect from device.
Definition: dome.cpp:47
const char * getDefaultName() override
Definition: dome.cpp:56
void closeShutter()
Definition: dome.cpp:135
Class to provide extended functionality for devices in addition to the functionality provided by INDI...