Instrument Neutral Distributed Interface INDI 2.2.5
skysafariclient.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2017 Jasem Mutlaq. All rights reserved.
3
4 INDI SkySafari Client for INDI Mounts.
5
6 The clients communicates with INDI server to control the mount from SkySafari
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
33{
34 public:
35 typedef enum { SLEW, TRACK, SYNC } GotoMode;
36
39
41 {
42 return isReady;
43 }
44
45 void setMount(const std::string &value);
46
48 {
49 return eqCoordsNP;
50 }
52
54 {
55 return geoCoordsNP;
56 }
58
60 {
61 return gotoModeSP;
62 }
63 bool sendGotoMode();
64
66 {
67 return motionNSSP;
68 }
69 bool setMotionNS();
70
72 {
73 return motionWESP;
74 }
75 bool setMotionWE();
76
77 bool parkMount();
79
80 bool setSlewRate(int slewRate);
81
82 bool abort();
83
85 {
86 return timeUTC;
87 }
88 bool setTimeUTC();
89
90 protected:
91 virtual void newDevice(INDI::BaseDevice dp) override;
92 virtual void newProperty(INDI::Property property) override;
93
94 private:
95 std::string mount;
96 bool isReady, mountOnline;
97
98 INDI::PropertyViewSwitch *mountParkSP = nullptr;
99 INDI::PropertyViewSwitch *gotoModeSP = nullptr;
100 INDI::PropertyViewNumber *eqCoordsNP = nullptr;
101 INDI::PropertyViewNumber *geoCoordsNP = nullptr;
102 INDI::PropertyViewSwitch *abortSP = nullptr;
103 INDI::PropertyViewSwitch *slewRateSP = nullptr;
104 INDI::PropertyViewSwitch *motionNSSP = nullptr;
105 INDI::PropertyViewSwitch *motionWESP = nullptr;
106 INDI::PropertyViewText *timeUTC = nullptr;
107};
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.
INDI::PropertyViewSwitch * getMotionNS()
bool setSlewRate(int slewRate)
INDI::PropertyViewSwitch * getMotionWE()
virtual void newProperty(INDI::Property property) override
Emmited when a new property is created for an INDI driver.
INDI::PropertyViewText * getTimeUTC()
INDI::PropertyViewNumber * getGeographiCoords()
IPState getMountParkState()
INDI::PropertyViewNumber * getEquatorialCoords()
virtual void newDevice(INDI::BaseDevice dp) override
Emmited when a new device is created from INDI server.
void setMount(const std::string &value)
INDI::PropertyViewSwitch * getGotoMode()
IPState
Property state.
Definition indiapi.h:158