Instrument Neutral Distributed Interface INDI 2.2.5
indigps.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2015 Jasem Mutlaq. All rights reserved.
3
4 INDI GPS Device Class
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2 of the License, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20
21 The full GNU General Public License is included in this distribution in the
22 file called LICENSE.
23*******************************************************************************/
24
25#pragma once
26
27#include "defaultdevice.h"
28#include "indigpsinterface.h"
29
45namespace INDI
46{
47
48class GPS : public DefaultDevice, public GPSInterface
49{
50 public:
51 GPS();
52 virtual ~GPS() = default;
53
54 virtual bool initProperties() override;
55 virtual bool updateProperties() override;
56 virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
57 virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
58
59 protected:
60
66 virtual bool saveConfigItems(FILE *fp) override;
67};
68}
GPSInterface(DefaultDevice *defaultDevice)
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition indigps.cpp:60
virtual ~GPS()=default
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
Definition indigps.cpp:88
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Definition indigps.cpp:70
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
Definition indigps.cpp:43
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save refresh period
Definition indigps.cpp:102
ISState
Switch state.
Definition indiapi.h:148
*brief user defined string literal for JSON values *sa std::size_t n
Namespace to encapsulate INDI client, drivers, and mediator classes.