Instrument Neutral Distributed Interface INDI  1.9.2
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  void newDevice(INDI::BaseDevice *dp) override;
50  void removeDevice(INDI::BaseDevice */*dp*/) override {}
51  void newProperty(INDI::Property *property) override;
52  void removeProperty(INDI::Property */*property*/) override {}
53  void newBLOB(IBLOB *bp) override;
54  void newSwitch(ISwitchVectorProperty */*svp*/) override {}
55  void newNumber(INumberVectorProperty *nvp) override;
56  void newMessage(INDI::BaseDevice *dp, int messageID) override;
57  void newText(ITextVectorProperty */*tvp*/) override {}
58  void newLight(ILightVectorProperty */*lvp*/) override {}
59  void serverConnected() override {}
60  void serverDisconnected(int /*exit_code*/) override {}
61 
62 private:
63  INDI::BaseDevice *ccd_simulator;
64 };
MyClient::newNumber
void newNumber(INumberVectorProperty *nvp) override
Emmited when a new number value arrives from INDI server.
Definition: tutorial_client.cpp:152
_ILightVectorProperty
Light vector property descriptor.
Definition: indiapi.h:415
MyClient::serverConnected
void serverConnected() override
Emmited when the server is connected.
Definition: tutorial_client.h:59
MyClient::newSwitch
void newSwitch(ISwitchVectorProperty *) override
Emmited when a new switch value arrives from INDI server.
Definition: tutorial_client.h:54
MyClient::newProperty
void newProperty(INDI::Property *property) override
Emmited when a new property is created for an INDI driver.
Definition: tutorial_client.cpp:130
MyClient::removeDevice
void removeDevice(INDI::BaseDevice *) override
Emmited when a device is deleted from INDI server.
Definition: tutorial_client.h:50
INDI::Property
Provides generic container for INDI properties.
Definition: indiproperty.h:43
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
_INumberVectorProperty
Number vector property descriptor.
Definition: indiapi.h:317
MyClient::~MyClient
~MyClient()=default
MyClient
Definition: tutorial_client.h:39
MyClient::newBLOB
void newBLOB(IBLOB *bp) override
Emmited when a new BLOB value arrives from INDI server.
Definition: tutorial_client.cpp:182
MyClient::takeExposure
void takeExposure()
Definition: tutorial_client.cpp:98
MyClient::newText
void newText(ITextVectorProperty *) override
Emmited when a new text value arrives from INDI server.
Definition: tutorial_client.h:57
INDI::BaseClient
Class to provide basic client functionality.
Definition: baseclient.h:54
MyClient::setTemperature
void setTemperature()
Definition: tutorial_client.cpp:79
MyClient::serverDisconnected
void serverDisconnected(int) override
Emmited when the server gets disconnected.
Definition: tutorial_client.h:60
baseclient.h
MyClient::MyClient
MyClient()
Definition: tutorial_client.cpp:71
MyClient::newDevice
void newDevice(INDI::BaseDevice *dp) override
Emmited when a new device is created from INDI server.
Definition: tutorial_client.cpp:119
MyClient::newLight
void newLight(ILightVectorProperty *) override
Emmited when a new light value arrives from INDI server.
Definition: tutorial_client.h:58
MyClient::removeProperty
void removeProperty(INDI::Property *) override
Emmited when a property is deleted for an INDI driver.
Definition: tutorial_client.h:52
MyClient::newMessage
void newMessage(INDI::BaseDevice *dp, int messageID) override
Emmited when a new message arrives from INDI server.
Definition: tutorial_client.cpp:170
INDI::BaseDevice
Class to provide basic INDI device functionality.
Definition: basedevice.h:45
IBLOB
One Blob (Binary Large Object) descriptor.
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365