Instrument Neutral Distributed Interface INDI 2.2.5
magellan1.h
Go to the documentation of this file.
1/*
2 MAGELLAN Generic
3 Copyright (C) 2011 Onno Hommes ([email protected])
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 "indicom.h"
24#include "indidevapi.h"
25
26/*
27 The device name below even though we have a Magellan I
28 should remain set to a KStars registered telescope so
29 It allows the service to be stopped
30*/
31#define mydev "Magellan I" /* The device name */
32
34{
35 public:
36 Magellan1();
37 virtual ~Magellan1();
38
39 virtual void ISGetProperties(const char *dev);
40 virtual void ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n);
41 virtual void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n);
42 virtual void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n);
43 virtual void ISSnoopDevice(XMLEle *root);
44 virtual void ISPoll();
45 virtual void getBasicData();
46
47 void handleError(ISwitchVectorProperty *svp, int err, const char *msg);
48 void handleError(INumberVectorProperty *nvp, int err, const char *msg);
49 void handleError(ITextVectorProperty *tvp, int err, const char *msg);
50 bool isTelescopeOn();
51 void connectTelescope();
52 void setCurrentDeviceName(const char *devName);
53 void correctFault();
54
55 int fd;
56
57 protected:
61
62 double JD;
63 double lastRA;
64 double lastDEC;
65 bool fault;
67 char thisDevice[64];
71};
bool simulation
Definition magellan1.h:66
void connectTelescope()
int currentSiteNum
Definition magellan1.h:59
char thisDevice[64]
Definition magellan1.h:67
virtual ~Magellan1()
virtual void ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
virtual void ISGetProperties(const char *dev)
bool fault
Definition magellan1.h:65
double lastDEC
Definition magellan1.h:64
double targetDEC
Definition magellan1.h:70
int trackingMode
Definition magellan1.h:60
double lastRA
Definition magellan1.h:63
bool isTelescopeOn()
double JD
Definition magellan1.h:62
int currentSet
Definition magellan1.h:68
virtual void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
virtual void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
virtual void ISPoll()
virtual void getBasicData()
int timeFormat
Definition magellan1.h:58
void correctFault()
void handleError(ISwitchVectorProperty *svp, int err, const char *msg)
double targetRA
Definition magellan1.h:70
virtual void ISSnoopDevice(XMLEle *root)
int lastSet
Definition magellan1.h:69
void setCurrentDeviceName(const char *devName)
ISState
Switch state.
Definition indiapi.h:148
Implementations for common driver routines.
Interface to the reference INDI C API device implementation on the Device Driver side.
Number vector property descriptor.
Definition indiapi.h:317
Switch vector property descriptor.
Definition indiapi.h:365
Text vector property descriptor.
Definition indiapi.h:244