Instrument Neutral Distributed Interface INDI  1.9.5
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 
30 class Dome : public INDI::DefaultDevice
31 {
32 public:
33  Dome() = default;
34 
35 protected:
36  // General device functions
37  bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
38  bool ISSnoopDevice(XMLEle *root) override;
39  bool Connect() override;
40  bool Disconnect() override;
41  const char *getDefaultName() override;
42  bool initProperties() override;
43  bool updateProperties() override;
44 
45 private:
46  void closeShutter();
47 
48  ISwitch ShutterS[2];
49  ISwitchVectorProperty ShutterSP;
50 
51  ILight RainL[1];
52  ILightVectorProperty RainLP;
53 };
Dome
Definition: dome.h:30
Dome::updateProperties
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition: dome.cpp:85
Dome::initProperties
bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: dome.cpp:63
_ILightVectorProperty
Light vector property descriptor.
Definition: indiapi.h:415
ISwitch
One switch descriptor.
Dome::ISNewSwitch
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Definition: dome.cpp:106
Dome::Disconnect
bool Disconnect() override
Disconnect from device.
Definition: dome.cpp:46
Dome::Dome
Dome()=default
ILight
One light descriptor.
Dome::getDefaultName
const char * getDefaultName() override
Definition: dome.cpp:55
Dome::Connect
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: dome.cpp:37
xml_ele_
Definition: lilxml.c:105
defaultdevice.h
Dome::ISSnoopDevice
bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
Definition: dome.cpp:151
name
const char * name
Definition: indiserver.c:116
ISState
ISState
Switch state.
Definition: indiapi.h:148
INDI::DefaultDevice
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
Definition: defaultdevice.h:118
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365