Instrument Neutral Distributed Interface INDI
2.0.2
drivers
telescope
magellan1.h
Go to the documentation of this file.
1
/*
2
MAGELLAN Generic
3
Copyright (C) 2011 Onno Hommes (ohommes@alumni.cmu.edu)
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 eventhough 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
33
class
Magellan1
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
:
58
int
timeFormat
;
59
int
currentSiteNum
;
60
int
trackingMode
;
61
62
double
JD
;
63
double
lastRA
;
64
double
lastDEC
;
65
bool
fault
;
66
bool
simulation
;
67
char
thisDevice
[64];
68
int
currentSet
;
69
int
lastSet
;
70
double
targetRA
,
targetDEC
;
71
};
Magellan1
Definition:
magellan1.h:34
Magellan1::simulation
bool simulation
Definition:
magellan1.h:66
Magellan1::connectTelescope
void connectTelescope()
Definition:
magellan1.cpp:393
Magellan1::currentSiteNum
int currentSiteNum
Definition:
magellan1.h:59
Magellan1::thisDevice
char thisDevice[64]
Definition:
magellan1.h:67
Magellan1::~Magellan1
virtual ~Magellan1()
Definition:
magellan1.cpp:123
Magellan1::Magellan1
Magellan1()
Definition:
magellan1.cpp:108
Magellan1::ISNewNumber
virtual void ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
Definition:
magellan1.cpp:176
Magellan1::ISGetProperties
virtual void ISGetProperties(const char *dev)
Definition:
magellan1.cpp:132
Magellan1::fault
bool fault
Definition:
magellan1.h:65
Magellan1::lastDEC
double lastDEC
Definition:
magellan1.h:64
Magellan1::targetDEC
double targetDEC
Definition:
magellan1.h:70
Magellan1::trackingMode
int trackingMode
Definition:
magellan1.h:60
Magellan1::lastRA
double lastRA
Definition:
magellan1.h:63
Magellan1::isTelescopeOn
bool isTelescopeOn()
Definition:
magellan1.cpp:312
Magellan1::JD
double JD
Definition:
magellan1.h:62
Magellan1::currentSet
int currentSet
Definition:
magellan1.h:68
Magellan1::ISNewSwitch
virtual void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Definition:
magellan1.cpp:185
Magellan1::fd
int fd
Definition:
magellan1.h:55
Magellan1::ISNewText
virtual void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Definition:
magellan1.cpp:154
Magellan1::ISPoll
virtual void ISPoll()
Definition:
magellan1.cpp:335
Magellan1::getBasicData
virtual void getBasicData()
Definition:
magellan1.cpp:360
Magellan1::timeFormat
int timeFormat
Definition:
magellan1.h:58
Magellan1::correctFault
void correctFault()
Definition:
magellan1.cpp:306
Magellan1::handleError
void handleError(ISwitchVectorProperty *svp, int err, const char *msg)
Definition:
magellan1.cpp:210
Magellan1::targetRA
double targetRA
Definition:
magellan1.h:70
Magellan1::ISSnoopDevice
virtual void ISSnoopDevice(XMLEle *root)
Definition:
magellan1.cpp:149
Magellan1::lastSet
int lastSet
Definition:
magellan1.h:69
Magellan1::setCurrentDeviceName
void setCurrentDeviceName(const char *devName)
Definition:
magellan1.cpp:127
ISState
ISState
Switch state.
Definition:
indiapi.h:150
indicom.h
Implementations for common driver routines.
indidevapi.h
Interface to the reference INDI C API device implementation on the Device Driver side.
_INumberVectorProperty
Number vector property descriptor.
Definition:
indiapi.h:319
_ISwitchVectorProperty
Switch vector property descriptor.
Definition:
indiapi.h:367
_ITextVectorProperty
Text vector property descriptor.
Definition:
indiapi.h:246
xml_ele_
Definition:
lilxml.cpp:108
Generated on Sat May 13 2023 14:24:23 for Instrument Neutral Distributed Interface INDI by
1.9.1