Instrument Neutral Distributed Interface INDI  2.0.2
lx200classic.h
Go to the documentation of this file.
1 /*
2  LX200 Classic
3  Copyright (C) 2003-2020 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 
23 #include "lx200generic.h"
24 
25 class LX200Classic : public LX200Generic
26 {
27  public:
28  LX200Classic();
30 
31  bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
32  bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
33 
34  protected:
35 
36  const char *getDefaultName() override;
37  bool initProperties() override;
38  bool updateProperties() override;
39  virtual bool saveConfigItems(FILE *fp) override;
40 
41  // Parking
42  virtual bool SetCurrentPark() override;
43  virtual bool SetDefaultPark() override;
44  virtual bool Park() override;
45  virtual bool UnPark() override;
46  virtual bool ReadScopeStatus() override;
47 
48  private:
49 
50  ITextVectorProperty ObjectInfoTP;
51  IText ObjectInfoT[1] {};
52 
53  ISwitchVectorProperty StarCatalogSP;
54  ISwitch StarCatalogS[3];
55 
56  ISwitchVectorProperty DeepSkyCatalogSP;
57  ISwitch DeepSkyCatalogS[7];
58 
59  ISwitchVectorProperty SolarSP;
60  ISwitch SolarS[10];
61 
62  INumberVectorProperty ObjectNoNP;
63  INumber ObjectNoN[1];
64 
65  INumberVectorProperty MaxSlewRateNP;
66  INumber MaxSlewRateN[1];
67 
68  INumberVectorProperty ElevationLimitNP;
69  INumber ElevationLimitN[2];
70 
71  ISwitchVectorProperty UnparkAlignmentSP;
72  ISwitch UnparkAlignmentS[3];
73 
74  private:
75  int currentCatalog {0};
76  int currentSubCatalog {0};
77 };
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool ReadScopeStatus() override
Read telescope status.
virtual bool Park() override
Park the telescope to its home position.
bool initProperties() override
Called to initialize basic properties required all the time.
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
const char * getDefaultName() override
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
ISState
Switch state.
Definition: indiapi.h:150
One number descriptor.
One switch descriptor.
One text descriptor.
Number vector property descriptor.
Definition: indiapi.h:319
Switch vector property descriptor.
Definition: indiapi.h:367
Text vector property descriptor.
Definition: indiapi.h:246