Instrument Neutral Distributed Interface INDI  1.9.5
Macros | Functions | Variables
lx200driver.cpp File Reference
#include "lx200driver.h"
#include "indicom.h"
#include "indilogger.h"
#include <cstring>
#include <unistd.h>
#include <termios.h>
#include <mutex>

Go to the source code of this file.

Macros

#define LX200_TIMEOUT   5 /* FD timeout in seconds */
 
#define RB_MAX_LEN   64
 

Functions

void setLX200Debug (const char *deviceName, unsigned int debug_level)
 
char ACK (int fd)
 
int check_lx200_connection (int fd)
 
int getCommandSexa (int fd, double *value, const char *cmd)
 
int getCommandString (int fd, char *data, const char *cmd)
 
int getCommandInt (int fd, int *value, const char *cmd)
 
int getTrackFreq (int fd, double *value)
 
int getSiteLatitude (int fd, int *dd, int *mm, double *ssf)
 
int getSiteLongitude (int fd, int *ddd, int *mm, double *ssf)
 
int getCalendarDate (int fd, char *date)
 
int getSiteName (int fd, char *siteName, int siteNum)
 
int getHomeSearchStatus (int fd, int *status)
 
int getOTATemp (int fd, double *value)
 
int getTimeFormat (int fd, int *format)
 
int setCommandInt (int fd, int data, const char *cmd)
 
int setCommandXYZ (int fd, int x, int y, int z, const char *cmd)
 
int setStandardProcedure (int fd, const char *writeData)
 
int setSlewMode (int fd, int slewMode)
 
int setAlignmentMode (int fd, unsigned int alignMode)
 
int setObjectRA (int fd, double ra)
 
int setObjectDEC (int fd, double dec)
 
int setCalenderDate (int fd, int dd, int mm, int yy)
 
int setUTCOffset (int fd, double hours)
 
int setTrackFreq (int fd, double trackF)
 
int setSiteLongitude (int fd, double CartographicLongitude)
 
int setSiteLatitude (int fd, double Lat)
 
int setObjAz (int fd, double az)
 
int setObjAlt (int fd, double alt)
 
int setSiteName (int fd, char *siteName, int siteNum)
 
int setMaxSlewRate (int fd, int slewRate)
 
int setFocuserMotion (int fd, int motionType)
 
int setFocuserSpeedMode (int fd, int speedMode)
 
int setMinElevationLimit (int fd, int min)
 
int setMaxElevationLimit (int fd, int max)
 
int Slew (int fd)
 
int Sync (int fd, char *matchedObject)
 
int abortSlew (int fd)
 
int MoveTo (int fd, int direction)
 
int HaltMovement (int fd, int direction)
 
int selectTrackingMode (int fd, int trackMode)
 
int SendPulseCmd (int fd, int direction, uint32_t duration_msec)
 
int checkLX200EquatorialFormat (int fd)
 
int getLX200EquatorialFormat ()
 
int getLX200GeographicFormat ()
 
int selectSite (int fd, int siteNum)
 
int selectCatalogObject (int fd, int catalog, int NNNN)
 
int selectSubCatalog (int fd, int catalog, int subCatalog)
 
int isSlewComplete (int fd)
 
int getSiteLatitudeAlt (int fd, int *dd, int *mm, double *ssf, const char *cmd)
 
int getSiteLongitudeAlt (int fd, int *ddd, int *mm, double *ssf, const char *cmd)
 
int setGPSFocuserSpeed (int fd, int speed)
 
int setPreciseTrackFreq (int fd, double trackF)
 
int SendPulseCmd (int fd, int direction, int duration_msec)
 

Variables

int eq_format
 
int geo_format = LX200_GEO_SHORT_FORMAT
 
char lx200Name [MAXINDIDEVICE]
 
unsigned int DBG_SCOPE = 8
 
std::mutex lx200CommsLock
 

Macro Definition Documentation

◆ LX200_TIMEOUT

#define LX200_TIMEOUT   5 /* FD timeout in seconds */

Definition at line 45 of file lx200driver.cpp.

◆ RB_MAX_LEN

#define RB_MAX_LEN   64

Definition at line 46 of file lx200driver.cpp.

Function Documentation

◆ abortSlew()

int abortSlew ( int  fd)

Definition at line 1544 of file lx200driver.cpp.

◆ ACK()

char ACK ( int  fd)

Definition at line 213 of file lx200driver.cpp.

◆ check_lx200_connection()

int check_lx200_connection ( int  fd)

Definition at line 176 of file lx200driver.cpp.

◆ checkLX200EquatorialFormat()

int checkLX200EquatorialFormat ( int  fd)

Definition at line 1698 of file lx200driver.cpp.

◆ getCalendarDate()

int getCalendarDate ( int  fd,
char *  date 
)

Definition at line 398 of file lx200driver.cpp.

◆ getCommandInt()

int getCommandInt ( int  fd,
int *  value,
const char *  cmd 
)

Definition at line 278 of file lx200driver.cpp.

◆ getCommandSexa()

int getCommandSexa ( int  fd,
double *  value,
const char *  cmd 
)

Definition at line 241 of file lx200driver.cpp.

◆ getCommandString()

static int getCommandString ( int  fd,
char *  data,
const char *  cmd 
)

Definition at line 321 of file lx200driver.cpp.

◆ getHomeSearchStatus()

int getHomeSearchStatus ( int  fd,
int *  status 
)

Definition at line 742 of file lx200driver.cpp.

◆ getLX200EquatorialFormat()

int getLX200EquatorialFormat ( )

Definition at line 1688 of file lx200driver.cpp.

◆ getLX200GeographicFormat()

int getLX200GeographicFormat ( )

Definition at line 1693 of file lx200driver.cpp.

◆ getOTATemp()

int getOTATemp ( int  fd,
double *  value 
)

Definition at line 779 of file lx200driver.cpp.

◆ getSiteLatitude()

int getSiteLatitude ( int  fd,
int *  dd,
int *  mm,
double *  ssf 
)

Definition at line 539 of file lx200driver.cpp.

◆ getSiteLatitudeAlt()

int getSiteLatitudeAlt ( int  fd,
int *  dd,
int *  mm,
double *  ssf,
const char *  cmd 
)

Definition at line 555 of file lx200driver.cpp.

◆ getSiteLongitude()

int getSiteLongitude ( int  fd,
int *  ddd,
int *  mm,
double *  ssf 
)

Definition at line 549 of file lx200driver.cpp.

◆ getSiteLongitudeAlt()

int getSiteLongitudeAlt ( int  fd,
int *  ddd,
int *  mm,
double *  ssf,
const char *  cmd 
)

Definition at line 629 of file lx200driver.cpp.

◆ getSiteName()

int getSiteName ( int  fd,
char *  siteName,
int  siteNum 
)

Definition at line 480 of file lx200driver.cpp.

◆ getTimeFormat()

int getTimeFormat ( int  fd,
int *  format 
)

Definition at line 438 of file lx200driver.cpp.

◆ getTrackFreq()

int getTrackFreq ( int  fd,
double *  value 
)

Definition at line 703 of file lx200driver.cpp.

◆ HaltMovement()

int HaltMovement ( int  fd,
int  direction 
)

Definition at line 1500 of file lx200driver.cpp.

◆ isSlewComplete()

int isSlewComplete ( int  fd)

Definition at line 350 of file lx200driver.cpp.

◆ MoveTo()

int MoveTo ( int  fd,
int  direction 
)

Definition at line 1432 of file lx200driver.cpp.

◆ selectCatalogObject()

int selectCatalogObject ( int  fd,
int  catalog,
int  NNNN 
)

Definition at line 1632 of file lx200driver.cpp.

◆ selectSite()

int selectSite ( int  fd,
int  siteNum 
)

Definition at line 1592 of file lx200driver.cpp.

◆ selectSubCatalog()

int selectSubCatalog ( int  fd,
int  catalog,
int  subCatalog 
)

Definition at line 1667 of file lx200driver.cpp.

◆ selectTrackingMode()

int selectTrackingMode ( int  fd,
int  trackMode 
)

Definition at line 1790 of file lx200driver.cpp.

◆ SendPulseCmd() [1/2]

int SendPulseCmd ( int  fd,
int  direction,
int  duration_msec 
)

Definition at line 1466 of file lx200driver.cpp.

◆ SendPulseCmd() [2/2]

int SendPulseCmd ( int  fd,
int  direction,
uint32_t  duration_msec 
)

◆ setAlignmentMode()

int setAlignmentMode ( int  fd,
unsigned int  alignMode 
)

Definition at line 1016 of file lx200driver.cpp.

◆ setCalenderDate()

int setCalenderDate ( int  fd,
int  dd,
int  mm,
int  yy 
)

Definition at line 1047 of file lx200driver.cpp.

◆ setCommandInt()

int setCommandInt ( int  fd,
int  data,
const char *  cmd 
)

Definition at line 855 of file lx200driver.cpp.

◆ setCommandXYZ()

int setCommandXYZ ( int  fd,
int  x,
int  y,
int  z,
const char *  cmd 
)

Definition at line 1004 of file lx200driver.cpp.

◆ setFocuserMotion()

int setFocuserMotion ( int  fd,
int  motionType 
)

Definition at line 1276 of file lx200driver.cpp.

◆ setFocuserSpeedMode()

int setFocuserSpeedMode ( int  fd,
int  speedMode 
)

Definition at line 1303 of file lx200driver.cpp.

◆ setGPSFocuserSpeed()

int setGPSFocuserSpeed ( int  fd,
int  speed 
)

Definition at line 1335 of file lx200driver.cpp.

◆ setLX200Debug()

void setLX200Debug ( const char *  deviceName,
unsigned int  debug_level 
)

Definition at line 58 of file lx200driver.cpp.

◆ setMaxElevationLimit()

int setMaxElevationLimit ( int  fd,
int  max 
)

Definition at line 893 of file lx200driver.cpp.

◆ setMaxSlewRate()

int setMaxSlewRate ( int  fd,
int  slewRate 
)

Definition at line 907 of file lx200driver.cpp.

◆ setMinElevationLimit()

int setMinElevationLimit ( int  fd,
int  min 
)

Definition at line 883 of file lx200driver.cpp.

◆ setObjAlt()

int setObjAlt ( int  fd,
double  alt 
)

Definition at line 1192 of file lx200driver.cpp.

◆ setObjAz()

int setObjAz ( int  fd,
double  az 
)

Definition at line 1176 of file lx200driver.cpp.

◆ setObjectDEC()

int setObjectDEC ( int  fd,
double  dec 
)

Definition at line 959 of file lx200driver.cpp.

◆ setObjectRA()

int setObjectRA ( int  fd,
double  ra 
)

Definition at line 924 of file lx200driver.cpp.

◆ setPreciseTrackFreq()

int setPreciseTrackFreq ( int  fd,
double  trackF 
)

Definition at line 1379 of file lx200driver.cpp.

◆ setSiteLatitude()

int setSiteLatitude ( int  fd,
double  Lat 
)

Definition at line 1145 of file lx200driver.cpp.

◆ setSiteLongitude()

int setSiteLongitude ( int  fd,
double  CartographicLongitude 
)

Definition at line 1114 of file lx200driver.cpp.

◆ setSiteName()

int setSiteName ( int  fd,
char *  siteName,
int  siteNum 
)

Definition at line 1208 of file lx200driver.cpp.

◆ setSlewMode()

int setSlewMode ( int  fd,
int  slewMode 
)

Definition at line 1237 of file lx200driver.cpp.

◆ setStandardProcedure()

int setStandardProcedure ( int  fd,
const char *  writeData 
)

Definition at line 821 of file lx200driver.cpp.

◆ setTrackFreq()

int setTrackFreq ( int  fd,
double  trackF 
)

Definition at line 1366 of file lx200driver.cpp.

◆ setUTCOffset()

int setUTCOffset ( int  fd,
double  hours 
)

Definition at line 1096 of file lx200driver.cpp.

◆ Slew()

int Slew ( int  fd)

Definition at line 1396 of file lx200driver.cpp.

◆ Sync()

int Sync ( int  fd,
char *  matchedObject 
)

Definition at line 1561 of file lx200driver.cpp.

Variable Documentation

◆ DBG_SCOPE

unsigned int DBG_SCOPE = 8

Definition at line 53 of file lx200driver.cpp.

◆ eq_format

int eq_format

Definition at line 49 of file lx200driver.cpp.

◆ geo_format

int geo_format = LX200_GEO_SHORT_FORMAT

Definition at line 50 of file lx200driver.cpp.

◆ lx200CommsLock

std::mutex lx200CommsLock

Definition at line 56 of file lx200driver.cpp.

◆ lx200Name

char lx200Name[MAXINDIDEVICE]

Definition at line 51 of file lx200driver.cpp.