kstars
lx200generic.cpp File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <math.h>
#include <unistd.h>
#include <time.h>
#include "indicom.h"
#include "lx200driver.h"
#include "lx200gps.h"
#include "lx200classic.h"

Go to the source code of this file.
Defines | |
#define | BASIC_GROUP "Main Control" |
#define | COMM_GROUP "Communication" |
#define | DATETIME_GROUP "Date/Time" |
#define | DEC_THRESHOLD 0.05 |
#define | FOCUS_GROUP "Focus Control" |
#define | LX200_PARK 3 |
#define | LX200_SLEW 0 |
#define | LX200_SYNC 2 |
#define | LX200_TRACK 1 |
#define | MOVE_GROUP "Movement Control" |
#define | RA_THRESHOLD 0.01 |
#define | SITE_GROUP "Site Management" |
Functions | |
void | changeAllDeviceNames (const char *newName) |
void | changeLX200GenericDeviceName (const char *newName) |
void | ISGetProperties (const char *dev) |
void | ISInit () |
void | ISNewBLOB (const char *, const char *, int *, char **, char **, char **, int) |
void | ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) |
void | ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
void | ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) |
static void | ISPoll (void *) |
static void | retryConnection (void *) |
static double | timezoneOffset () |
Variables | |
static ISwitch | abortSlewS [] = {{"ABORT", "Abort", ISS_OFF, 0, 0 }} |
static ISwitchVectorProperty | abortSlewSw = { mydev, "ABORT_MOTION", "Abort Slew/Track", BASIC_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, abortSlewS, NARRAY(abortSlewS), "", 0} |
static ISwitch | AlignmentS [] = {{"Polar", "", ISS_ON, 0, 0}, {"AltAz", "", ISS_OFF, 0, 0}, {"Land", "", ISS_OFF, 0, 0}} |
static ISwitchVectorProperty | AlignmentSw = { mydev, "Alignment", "", COMM_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, AlignmentS, NARRAY(AlignmentS), "", 0} |
static int | daylight = 0 |
INumber | eq [] |
INumberVectorProperty | eqNum |
static ISwitch | FocusMotionS [] = { {"IN", "Focus in", ISS_OFF, 0, 0}, {"OUT", "Focus out", ISS_OFF, 0, 0}} |
static ISwitchVectorProperty | FocusMotionSw = {mydev, "FOCUS_MOTION", "Motion", FOCUS_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, FocusMotionS, NARRAY(FocusMotionS), "", 0} |
static INumber | FocusSpeedN [] = {{"SPEED", "Speed", "%0.f", 0., 3., 1., 0.}} |
static INumberVectorProperty | FocusSpeedNP = {mydev, "FOCUS_SPEED", "Speed", FOCUS_GROUP, IP_RW, 0, IPS_IDLE, FocusSpeedN, NARRAY(FocusSpeedN), "", 0} |
static INumber | FocusTimerN [] = { {"TIMER", "Timer (s)", "%10.6m", 0., 120., 1., 0., 0, 0, 0 }} |
static INumberVectorProperty | FocusTimerNP = { mydev, "FOCUS_TIMER", "Focus Timer", FOCUS_GROUP, IP_RW, 0, IPS_IDLE, FocusTimerN, NARRAY(FocusTimerN), "", 0} |
static INumber | geo [] |
static INumberVectorProperty | geoNum |
int | MaxReticleFlashRate = 3 |
char * | me |
static ISwitch | MovementS [] = {{"N", "North", ISS_OFF, 0, 0}, {"W", "West", ISS_OFF, 0, 0}, {"E", "East", ISS_OFF, 0, 0}, {"S", "South", ISS_OFF, 0, 0}} |
static ISwitchVectorProperty | MovementSw = { mydev, "MOVEMENT", "Move toward", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, MovementS, NARRAY(MovementS), "", 0} |
static ISwitch | OnCoordSetS [] = {{"SLEW", "Slew", ISS_ON, 0, 0 }, {"TRACK", "Track", ISS_OFF, 0, 0}, {"SYNC", "Sync", ISS_OFF, 0 , 0}} |
static ISwitchVectorProperty | OnCoordSetSw = { mydev, "ON_COORD_SET", "On Set", BASIC_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, OnCoordSetS, NARRAY(OnCoordSetS), "", 0} |
static ISwitch | ParkS [] = { {"PARK", "Park", ISS_OFF, 0, 0} } |
ISwitchVectorProperty | ParkSP = {mydev, "PARK", "Park Scope", BASIC_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, ParkS, NARRAY(ParkS), "", 0 } |
static ITextVectorProperty | Port = { mydev, "DEVICE_PORT", "Ports", COMM_GROUP, IP_RW, 0, IPS_IDLE, PortT, NARRAY(PortT), "", 0} |
static IText | PortT [] = {{"PORT", "Port", 0, 0, 0, 0}} |
static ISwitch | PowerS [] = {{"CONNECT" , "Connect" , ISS_OFF, 0, 0},{"DISCONNECT", "Disconnect", ISS_ON, 0, 0}} |
ISwitchVectorProperty | PowerSP = { mydev, "CONNECTION" , "Connection", COMM_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, PowerS, NARRAY(PowerS), "", 0} |
INumberVectorProperty | SDTime = { mydev, "SDTIME", "Sidereal Time", DATETIME_GROUP, IP_RW, 0, IPS_IDLE, STime, NARRAY(STime), "", 0} |
static ITextVectorProperty | SiteName = { mydev, "Site Name", "", SITE_GROUP, IP_RW, 0 , IPS_IDLE, SiteNameT, NARRAY(SiteNameT), "", 0} |
static IText | SiteNameT [] = {{"SiteName", "", 0, 0, 0, 0}} |
static ISwitch | SitesS [] = {{"Site 1", "", ISS_ON, 0, 0}, {"Site 2", "", ISS_OFF, 0, 0}, {"Site 3", "", ISS_OFF, 0, 0}, {"Site 4", "", ISS_OFF, 0 ,0}} |
static ISwitchVectorProperty | SitesSw = { mydev, "Sites", "", SITE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, SitesS, NARRAY(SitesS), "", 0} |
static ISwitch | SlewModeS [] = {{"Max", "", ISS_ON, 0, 0}, {"Find", "", ISS_OFF, 0, 0}, {"Centering", "", ISS_OFF, 0, 0}, {"Guide", "", ISS_OFF, 0 , 0}} |
static ISwitchVectorProperty | SlewModeSw = { mydev, "Slew rate", "", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, SlewModeS, NARRAY(SlewModeS), "", 0} |
static INumber | STime [] = {{"LST", "Sidereal time", "%10.6m" , 0.,24.,0.,0., 0, 0, 0}} |
LX200Generic * | telescope = NULL |
ITextVectorProperty | Time = { mydev, "TIME", "UTC Time", DATETIME_GROUP, IP_RW, 0, IPS_IDLE, UTC, NARRAY(UTC), "", 0} |
static INumber | TrackFreq [] = {{ "trackFreq", "Freq", "%g", 56.4, 60.1, 0.1, 60.1, 0, 0, 0}} |
static INumberVectorProperty | TrackingFreq = { mydev, "Tracking Frequency", "", MOVE_GROUP, IP_RW, 0, IPS_IDLE, TrackFreq, NARRAY(TrackFreq), "", 0} |
static ISwitch | TrackModeS [] = {{ "Default", "", ISS_ON, 0, 0} , { "Lunar", "", ISS_OFF, 0, 0}, {"Manual", "", ISS_OFF, 0, 0}} |
static ISwitchVectorProperty | TrackModeSw = { mydev, "Tracking Mode", "", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, TrackModeS, NARRAY(TrackModeS), "", 0} |
static IText | UTC [] = {{"UTC", "UTC", 0, 0, 0, 0}} |
Define Documentation
#define BASIC_GROUP "Main Control" |
Definition at line 78 of file lx200generic.cpp.
#define COMM_GROUP "Communication" |
Definition at line 77 of file lx200generic.cpp.
#define DATETIME_GROUP "Date/Time" |
Definition at line 80 of file lx200generic.cpp.
#define DEC_THRESHOLD 0.05 |
Definition at line 85 of file lx200generic.cpp.
#define FOCUS_GROUP "Focus Control" |
Definition at line 82 of file lx200generic.cpp.
#define LX200_PARK 3 |
Definition at line 89 of file lx200generic.cpp.
#define LX200_SLEW 0 |
Definition at line 86 of file lx200generic.cpp.
#define LX200_SYNC 2 |
Definition at line 88 of file lx200generic.cpp.
#define LX200_TRACK 1 |
Definition at line 87 of file lx200generic.cpp.
#define MOVE_GROUP "Movement Control" |
Definition at line 79 of file lx200generic.cpp.
#define RA_THRESHOLD 0.01 |
Definition at line 84 of file lx200generic.cpp.
#define SITE_GROUP "Site Management" |
Definition at line 81 of file lx200generic.cpp.
Function Documentation
void changeAllDeviceNames | ( | const char * | newName | ) |
Definition at line 207 of file lx200generic.cpp.
void changeLX200GenericDeviceName | ( | const char * | newName | ) |
Definition at line 173 of file lx200generic.cpp.
void ISGetProperties | ( | const char * | dev | ) |
Function defined by Drivers that is called when a Client asks for the definitions of all Properties this Driver supports for the given device.
- Parameters:
-
dev the name of the device.
Definition at line 286 of file lx200generic.cpp.
void ISInit | ( | ) |
Definition at line 218 of file lx200generic.cpp.
void ISNewBLOB | ( | const char * | , | |
const char * | , | |||
int * | , | |||
char ** | , | |||
char ** | , | |||
char ** | , | |||
int | ||||
) |
Definition at line 295 of file lx200generic.cpp.
void ISNewNumber | ( | const char * | dev, | |
const char * | name, | |||
double | values[], | |||
char * | names[], | |||
int | n | |||
) |
Definition at line 292 of file lx200generic.cpp.
void ISPoll | ( | void * | p | ) | [static] |
Definition at line 294 of file lx200generic.cpp.
static void retryConnection | ( | void * | p | ) | [static] |
Definition at line 1254 of file lx200generic.cpp.
static double timezoneOffset | ( | ) | [inline, static] |
Definition at line 47 of file lx200generic.cpp.
Variable Documentation
ISwitch abortSlewS[] = {{"ABORT", "Abort", ISS_OFF, 0, 0 }} [static] |
Definition at line 101 of file lx200generic.cpp.
ISwitchVectorProperty abortSlewSw = { mydev, "ABORT_MOTION", "Abort Slew/Track", BASIC_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, abortSlewS, NARRAY(abortSlewS), "", 0} [static] |
Definition at line 134 of file lx200generic.cpp.
ISwitch AlignmentS[] = {{"Polar", "", ISS_ON, 0, 0}, {"AltAz", "", ISS_OFF, 0, 0}, {"Land", "", ISS_OFF, 0, 0}} [static] |
Definition at line 96 of file lx200generic.cpp.
ISwitchVectorProperty AlignmentSw = { mydev, "Alignment", "", COMM_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, AlignmentS, NARRAY(AlignmentS), "", 0} [static] |
Definition at line 129 of file lx200generic.cpp.
int daylight = 0 [static] |
Definition at line 44 of file lx200generic.cpp.
Initial value:
{ {"RA", "RA H:M:S", "%10.6m", 0., 24., 0., 0., 0, 0, 0}, {"DEC", "Dec D:M:S", "%10.6m", -90., 90., 0., 0., 0, 0, 0}, }
Definition at line 113 of file lx200generic.cpp.
Initial value:
{ mydev, "EQUATORIAL_EOD_COORD", "Equatorial JNow", BASIC_GROUP, IP_RW, 0, IPS_IDLE, eq, NARRAY(eq), "", 0}
Definition at line 119 of file lx200generic.cpp.
ISwitch FocusMotionS[] = { {"IN", "Focus in", ISS_OFF, 0, 0}, {"OUT", "Focus out", ISS_OFF, 0, 0}} [static] |
Definition at line 107 of file lx200generic.cpp.
ISwitchVectorProperty FocusMotionSw = {mydev, "FOCUS_MOTION", "Motion", FOCUS_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, FocusMotionS, NARRAY(FocusMotionS), "", 0} [static] |
Definition at line 151 of file lx200generic.cpp.
INumber FocusSpeedN[] = {{"SPEED", "Speed", "%0.f", 0., 3., 1., 0.}} [static] |
Definition at line 106 of file lx200generic.cpp.
INumberVectorProperty FocusSpeedNP = {mydev, "FOCUS_SPEED", "Speed", FOCUS_GROUP, IP_RW, 0, IPS_IDLE, FocusSpeedN, NARRAY(FocusSpeedN), "", 0} [static] |
Definition at line 149 of file lx200generic.cpp.
INumber FocusTimerN[] = { {"TIMER", "Timer (s)", "%10.6m", 0., 120., 1., 0., 0, 0, 0 }} [static] |
Definition at line 108 of file lx200generic.cpp.
INumberVectorProperty FocusTimerNP = { mydev, "FOCUS_TIMER", "Focus Timer", FOCUS_GROUP, IP_RW, 0, IPS_IDLE, FocusTimerN, NARRAY(FocusTimerN), "", 0} [static] |
Definition at line 110 of file lx200generic.cpp.
Initial value:
{ {"LAT", "Lat. D:M:S +N", "%10.6m", -90., 90., 0., 0., 0, 0, 0}, {"LONG", "Long. D:M:S +E", "%10.6m", 0., 360., 0., 0., 0, 0, 0}, }
Definition at line 163 of file lx200generic.cpp.
INumberVectorProperty geoNum [static] |
Initial value:
{ mydev, "GEOGRAPHIC_COORD", "Geographic Location", SITE_GROUP, IP_RW, 0., IPS_IDLE, geo, NARRAY(geo), "", 0}
Definition at line 167 of file lx200generic.cpp.
int MaxReticleFlashRate = 3 |
Definition at line 67 of file lx200generic.cpp.
char* me |
ISwitch MovementS[] = {{"N", "North", ISS_OFF, 0, 0}, {"W", "West", ISS_OFF, 0, 0}, {"E", "East", ISS_OFF, 0, 0}, {"S", "South", ISS_OFF, 0, 0}} [static] |
Definition at line 104 of file lx200generic.cpp.
ISwitchVectorProperty MovementSw = { mydev, "MOVEMENT", "Move toward", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, MovementS, NARRAY(MovementS), "", 0} [static] |
Definition at line 146 of file lx200generic.cpp.
ISwitch OnCoordSetS[] = {{"SLEW", "Slew", ISS_ON, 0, 0 }, {"TRACK", "Track", ISS_OFF, 0, 0}, {"SYNC", "Sync", ISS_OFF, 0 , 0}} [static] |
Definition at line 99 of file lx200generic.cpp.
ISwitchVectorProperty OnCoordSetSw = { mydev, "ON_COORD_SET", "On Set", BASIC_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, OnCoordSetS, NARRAY(OnCoordSetS), "", 0} [static] |
Definition at line 132 of file lx200generic.cpp.
Definition at line 102 of file lx200generic.cpp.
ISwitchVectorProperty ParkSP = {mydev, "PARK", "Park Scope", BASIC_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, ParkS, NARRAY(ParkS), "", 0 } |
Definition at line 136 of file lx200generic.cpp.
ITextVectorProperty Port = { mydev, "DEVICE_PORT", "Ports", COMM_GROUP, IP_RW, 0, IPS_IDLE, PortT, NARRAY(PortT), "", 0} [static] |
Definition at line 126 of file lx200generic.cpp.
Definition at line 125 of file lx200generic.cpp.
ISwitch PowerS[] = {{"CONNECT" , "Connect" , ISS_OFF, 0, 0},{"DISCONNECT", "Disconnect", ISS_ON, 0, 0}} [static] |
Definition at line 95 of file lx200generic.cpp.
ISwitchVectorProperty PowerSP = { mydev, "CONNECTION" , "Connection", COMM_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, PowerS, NARRAY(PowerS), "", 0} |
Definition at line 124 of file lx200generic.cpp.
INumberVectorProperty SDTime = { mydev, "SDTIME", "Sidereal Time", DATETIME_GROUP, IP_RW, 0, IPS_IDLE, STime, NARRAY(STime), "", 0} |
Definition at line 157 of file lx200generic.cpp.
ITextVectorProperty SiteName = { mydev, "Site Name", "", SITE_GROUP, IP_RW, 0 , IPS_IDLE, SiteNameT, NARRAY(SiteNameT), "", 0} [static] |
Definition at line 171 of file lx200generic.cpp.
Definition at line 170 of file lx200generic.cpp.
ISwitch SitesS[] = {{"Site 1", "", ISS_ON, 0, 0}, {"Site 2", "", ISS_OFF, 0, 0}, {"Site 3", "", ISS_OFF, 0, 0}, {"Site 4", "", ISS_OFF, 0 ,0}} [static] |
Definition at line 97 of file lx200generic.cpp.
ISwitchVectorProperty SitesSw = { mydev, "Sites", "", SITE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, SitesS, NARRAY(SitesS), "", 0} [static] |
Definition at line 161 of file lx200generic.cpp.
ISwitch SlewModeS[] = {{"Max", "", ISS_ON, 0, 0}, {"Find", "", ISS_OFF, 0, 0}, {"Centering", "", ISS_OFF, 0, 0}, {"Guide", "", ISS_OFF, 0 , 0}} [static] |
Definition at line 98 of file lx200generic.cpp.
ISwitchVectorProperty SlewModeSw = { mydev, "Slew rate", "", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, SlewModeS, NARRAY(SlewModeS), "", 0} [static] |
Definition at line 138 of file lx200generic.cpp.
Definition at line 156 of file lx200generic.cpp.
LX200Generic* telescope = NULL |
Definition at line 66 of file lx200generic.cpp.
ITextVectorProperty Time = { mydev, "TIME", "UTC Time", DATETIME_GROUP, IP_RW, 0, IPS_IDLE, UTC, NARRAY(UTC), "", 0} |
Definition at line 155 of file lx200generic.cpp.
Definition at line 142 of file lx200generic.cpp.
INumberVectorProperty TrackingFreq = { mydev, "Tracking Frequency", "", MOVE_GROUP, IP_RW, 0, IPS_IDLE, TrackFreq, NARRAY(TrackFreq), "", 0} [static] |
Definition at line 144 of file lx200generic.cpp.
ISwitch TrackModeS[] = {{ "Default", "", ISS_ON, 0, 0} , { "Lunar", "", ISS_OFF, 0, 0}, {"Manual", "", ISS_OFF, 0, 0}} [static] |
Definition at line 100 of file lx200generic.cpp.
ISwitchVectorProperty TrackModeSw = { mydev, "Tracking Mode", "", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, TrackModeS, NARRAY(TrackModeS), "", 0} [static] |
Definition at line 140 of file lx200generic.cpp.
Definition at line 154 of file lx200generic.cpp.