Instrument Neutral Distributed Interface INDI  1.9.2
tutorial_client.h

Construct a basic INDI client that demonstrates INDI::Client capabilities. This client must be used with tutorial_three device "Simple CCD". To run the example, you must first run tutorial_three:

indiserver tutorial_three

Then in another terminal, run the client:

tutorial_client

The client will connect to the CCD driver and attempts to change the CCD temperature.

/*
Tutorial Client
Copyright (C) 2010 Jasem Mutlaq (mutlaqja@ikarustech.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#pragma once
#include "baseclient.h"
class MyClient : public INDI::BaseClient
{
public:
~MyClient() = default;
void takeExposure();
protected:
void newDevice(INDI::BaseDevice *dp) override;
void removeDevice(INDI::BaseDevice */*dp*/) override {}
void newProperty(INDI::Property *property) override;
void removeProperty(INDI::Property */*property*/) override {}
void newBLOB(IBLOB *bp) override;
void newSwitch(ISwitchVectorProperty */*svp*/) override {}
void newNumber(INumberVectorProperty *nvp) override;
void newMessage(INDI::BaseDevice *dp, int messageID) override;
void newText(ITextVectorProperty */*tvp*/) override {}
void newLight(ILightVectorProperty */*lvp*/) override {}
void serverConnected() override {}
void serverDisconnected(int /*exit_code*/) override {}
private:
INDI::BaseDevice *ccd_simulator;
};
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