Instrument Neutral Distributed Interface INDI  1.5.0
tutorial_client.h
Go to the documentation of this file.
1 /*
2  Tutorial Client
3  Copyright (C) 2010 Jasem Mutlaq (mutlaqja@ikarustech.com)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 */
20 
21 #pragma once
22 
37 #include "baseclient.h"
38 
39 class MyClient : public INDI::BaseClient
40 {
41  public:
42  MyClient();
43  ~MyClient() = default;
44 
45  void setTemperature();
46  void takeExposure();
47 
48  protected:
49  virtual void newDevice(INDI::BaseDevice *dp);
50  virtual void removeDevice(INDI::BaseDevice */*dp*/) {}
51  virtual void newProperty(INDI::Property *property);
52  virtual void removeProperty(INDI::Property */*property*/) {}
53  virtual void newBLOB(IBLOB *bp);
54  virtual void newSwitch(ISwitchVectorProperty */*svp*/) {}
55  virtual void newNumber(INumberVectorProperty *nvp);
56  virtual void newMessage(INDI::BaseDevice *dp, int messageID);
57  virtual void newText(ITextVectorProperty */*tvp*/) {}
58  virtual void newLight(ILightVectorProperty */*lvp*/) {}
59  virtual void serverConnected() {}
60  virtual void serverDisconnected(int /*exit_code*/) {}
61 
62  private:
63  INDI::BaseDevice *ccd_simulator;
64 };
Light vector property descriptor.
Definition: indiapi.h:387
One Blob (Binary Large Object) descriptor.
Definition: indiapi.h:413
Provides generic container for INDI properties.
Definition: indiproperty.h:33
virtual void newSwitch(ISwitchVectorProperty *)
Emmited when a new switch value arrives from INDI server.
virtual void newProperty(INDI::Property *property)
Emmited when a new property is created for an INDI driver.
Class to provide basic INDI device functionality.
Definition: basedevice.h:41
Switch vector property descriptor.
Definition: indiapi.h:337
virtual void newText(ITextVectorProperty *)
Emmited when a new text value arrives from INDI server.
virtual void newNumber(INumberVectorProperty *nvp)
Emmited when a new number value arrives from INDI server.
virtual void newBLOB(IBLOB *bp)
Emmited when a new BLOB value arrives from INDI server.
void setTemperature()
virtual void removeDevice(INDI::BaseDevice *)
Emmited when a device is deleted from INDI server.
virtual void serverDisconnected(int)
Emmited when the server gets disconnected.
virtual void newDevice(INDI::BaseDevice *dp)
Emmited when a new device is created from INDI server.
void takeExposure()
~MyClient()=default
Number vector property descriptor.
Definition: indiapi.h:289
virtual void newMessage(INDI::BaseDevice *dp, int messageID)
Emmited when a new message arrives from INDI server.
virtual void serverConnected()
Emmited when the server is connected.
virtual void newLight(ILightVectorProperty *)
Emmited when a new light value arrives from INDI server.
Text vector property descriptor.
Definition: indiapi.h:216
Class to provide basic client functionality.
Definition: baseclient.h:54
virtual void removeProperty(INDI::Property *)
Emmited when a property is deleted for an INDI driver.