Instrument Neutral Distributed Interface INDI 2.2.5
watchdogclient.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2015 Jasem Mutlaq. All rights reserved.
3
4 INDI Watchdog Client.
5
6 The clients communicates with INDI server to put devices in a safe state for shutdown
7
8 This program is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your option)
11 any later version.
12
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22
23 The full GNU General Public License is included in this distribution in the
24 file called LICENSE.
25*******************************************************************************/
26
27#pragma once
28
29#include "baseclient.h"
30#include "basedevice.h"
31
32#include <cstring>
33
35{
36 public:
39
40 bool isBusy()
41 {
42 return isRunning;
43 }
45 {
46 return isReady;
47 }
48
49 void setDome(const std::string &value);
50 void setMount(const std::string &value);
51
52 bool parkDome();
53 bool parkMount();
56
57 protected:
58 virtual void newDevice(INDI::BaseDevice dp) override;
59 virtual void newProperty(INDI::Property property) override;
60
61 private:
62 std::string dome, mount;
63 bool isReady, isRunning, domeOnline, mountOnline;
64
65 INDI::PropertyViewSwitch *mountParkSP, *domeParkSP;
66};
Class to provide basic client functionality.
Definition baseclient.h:52
Class to provide basic INDI device functionality.
Definition basedevice.h:52
Provides generic container for INDI properties.
IPState getDomeParkState()
IPState getMountParkState()
virtual void newProperty(INDI::Property property) override
Emmited when a new property is created for an INDI driver.
void setMount(const std::string &value)
void setDome(const std::string &value)
virtual void newDevice(INDI::BaseDevice dp) override
Emmited when a new device is created from INDI server.
IPState
Property state.
Definition indiapi.h:158