Instrument Neutral Distributed Interface INDI  1.6.0
Go to the documentation of this file.
1 /*
2  INDI Developers Manual
3  Tutorial #5 - Snooping
5  Dome
7  Refer to README, which contains instruction on how to build this driver, and use it
8  with an INDI-compatible client.
10 */
26 #pragma once
28 #include "defaultdevice.h"
30 class Dome : public INDI::DefaultDevice
31 {
32  public:
33  Dome() = default;
34  bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n);
35  bool ISSnoopDevice(XMLEle *root);
37  protected:
38  // General device functions
39  bool Connect();
40  bool Disconnect();
41  const char *getDefaultName();
42  bool initProperties();
43  bool updateProperties();
45  private:
46  void closeShutter();
48  ISwitch ShutterS[2];
49  ISwitchVectorProperty ShutterSP;
51  ILight RainL[1];
52  ILightVectorProperty RainLP;
53 };
const char * getDefaultName()
Definition: dome.cpp:93
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
Light vector property descriptor.
Definition: indiapi.h:397
One light descriptor.
Definition: indiapi.h:379
const char * name
Definition: indiserver.c:113
Switch vector property descriptor.
Definition: indiapi.h:347
bool updateProperties()
updateProperties is called whenever there is a change in the CONNECTION status of the driver...
Definition: dome.cpp:123
One switch descriptor.
Definition: indiapi.h:329
Definition: dome.h:30
bool initProperties()
Initilize properties initial state and value. The child class must implement this function...
Definition: dome.cpp:101
bool ISSnoopDevice(XMLEle *root)
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
Definition: dome.cpp:189
bool Disconnect()
Disconnect from device.
Definition: dome.cpp:84
Switch state.
Definition: indiapi.h:134
bool Connect()
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: dome.cpp:75
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process the client newSwitch command.
Definition: dome.cpp:144