kstars
celestrongps.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <math.h>
#include <unistd.h>
#include <time.h>
#include "celestronprotocol.h"
#include "celestrongps.h"

Go to the source code of this file.
Defines | |
#define | BASIC_GROUP "Main Control" |
#define | COMM_GROUP "Communication" |
#define | DEC_THRESHOLD 0.05 |
#define | MOVE_GROUP "Movement Control" |
#define | mydev "Celestron GPS" |
#define | RA_THRESHOLD 0.01 |
Functions | |
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 *) |
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 INumber | eq [] |
static INumberVectorProperty | eqNum |
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 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}} |
static ISwitchVectorProperty | PowerSw = { mydev, "CONNECTION" , "Connection", COMM_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, PowerS, NARRAY(PowerS), "", 0} |
static ISwitch | SlewModeS [] = {{"Slew", "", 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} |
CelestronGPS * | telescope = NULL |
Define Documentation
#define BASIC_GROUP "Main Control" |
Definition at line 48 of file celestrongps.cpp.
#define COMM_GROUP "Communication" |
Definition at line 47 of file celestrongps.cpp.
#define DEC_THRESHOLD 0.05 |
Definition at line 33 of file celestrongps.cpp.
#define MOVE_GROUP "Movement Control" |
Definition at line 49 of file celestrongps.cpp.
#define mydev "Celestron GPS" |
Definition at line 34 of file celestrongps.cpp.
#define RA_THRESHOLD 0.01 |
Definition at line 32 of file celestrongps.cpp.
Function Documentation
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 101 of file celestrongps.cpp.
void ISInit | ( | ) |
Definition at line 85 of file celestrongps.cpp.
void ISNewBLOB | ( | const char * | , | |
const char * | , | |||
int * | , | |||
char ** | , | |||
char ** | , | |||
char ** | , | |||
int | ||||
) |
Definition at line 110 of file celestrongps.cpp.
void ISNewNumber | ( | const char * | dev, | |
const char * | name, | |||
double | values[], | |||
char * | names[], | |||
int | n | |||
) |
Definition at line 107 of file celestrongps.cpp.
void ISPoll | ( | void * | p | ) | [static] |
Definition at line 109 of file celestrongps.cpp.
Variable Documentation
ISwitch abortSlewS[] = {{"ABORT", "Abort", ISS_OFF, 0, 0}} [static] |
Definition at line 57 of file celestrongps.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 78 of file celestrongps.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 62 of file celestrongps.cpp.
INumberVectorProperty eqNum [static] |
Initial value:
{ mydev, "EQUATORIAL_EOD_COORD", "Equatorial JNow", BASIC_GROUP, IP_RW, 0, IPS_IDLE, eq, NARRAY(eq), "", 0}
Definition at line 67 of file celestrongps.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 59 of file celestrongps.cpp.
ISwitchVectorProperty MovementSw = { mydev, "MOVEMENT", "Move toward", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, MovementS, NARRAY(MovementS), "", 0} [static] |
Definition at line 81 of file celestrongps.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 56 of file celestrongps.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 77 of file celestrongps.cpp.
ITextVectorProperty Port = { mydev, "DEVICE_PORT", "Ports", COMM_GROUP, IP_RW, 0, IPS_IDLE, PortT, NARRAY(PortT), "", 0} [static] |
Definition at line 74 of file celestrongps.cpp.
Definition at line 73 of file celestrongps.cpp.
ISwitch PowerS[] = {{"CONNECT" , "Connect" , ISS_OFF, 0, 0},{"DISCONNECT", "Disconnect", ISS_ON, 0, 0}} [static] |
Definition at line 54 of file celestrongps.cpp.
ISwitchVectorProperty PowerSw = { mydev, "CONNECTION" , "Connection", COMM_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, PowerS, NARRAY(PowerS), "", 0} [static] |
Definition at line 72 of file celestrongps.cpp.
ISwitch SlewModeS[] = {{"Slew", "", ISS_ON, 0, 0}, {"Find", "", ISS_OFF, 0, 0}, {"Centering", "", ISS_OFF, 0, 0}, {"Guide", "", ISS_OFF, 0, 0}} [static] |
Definition at line 55 of file celestrongps.cpp.
ISwitchVectorProperty SlewModeSw = { mydev, "Slew rate", "", MOVE_GROUP, IP_RW, ISR_1OFMANY, 0, IPS_IDLE, SlewModeS, NARRAY(SlewModeS), "", 0} [static] |
Definition at line 79 of file celestrongps.cpp.
CelestronGPS* telescope = NULL |
Definition at line 36 of file celestrongps.cpp.