Instrument Neutral Distributed Interface INDI
2.0.2
|
#include <celestrondriver.h>
Public Member Functions | |
CelestronDriver () | |
virtual | ~CelestronDriver ()=default |
const char * | getDeviceName () |
void | set_port_fd (int port_fd) |
void | set_simulation (bool enable) |
void | set_device (const char *name) |
void | set_sim_slew_rate (CELESTRON_SLEW_RATE val) |
void | set_sim_track_mode (CELESTRON_TRACK_MODE val) |
void | set_sim_gps_status (CELESTRON_GPS_STATUS val) |
void | set_sim_slewing (bool isSlewing) |
void | set_sim_ra (double ra) |
void | set_sim_dec (double dec) |
void | set_sim_az (double az) |
void | set_sim_alt (double alt) |
double | get_sim_ra () |
double | get_sim_dec () |
int | get_sim_foc_offset () |
void | move_sim_foc (int offset) |
bool | echo () |
bool | check_connection () |
bool | get_firmware (FirmwareInfo *info) |
bool | get_version (char *version, size_t size) |
bool | get_variant (char *variant) |
int | model () |
bool | get_model (char *model, size_t size, bool *isGem, bool *canPec, bool *hasHomeIndex) |
bool | get_dev_firmware (int dev, char *version, size_t size) |
bool | get_radec (double *ra, double *dec, bool precise) |
bool | get_azalt (double *az, double *alt, bool precise) |
bool | get_utc_date_time (double *utc_hours, int *yy, int *mm, int *dd, int *hh, int *minute, int *ss, bool *dst, bool precise) |
bool | start_motion (CELESTRON_DIRECTION dir, CELESTRON_SLEW_RATE rate) |
bool | stop_motion (CELESTRON_DIRECTION dir) |
bool | abort () |
bool | slew_radec (double ra, double dec, bool precise) |
bool | slew_azalt (double az, double alt, bool precise) |
bool | sync (double ra, double dec, bool precise) |
bool | unsync () |
bool | set_location (double longitude, double latitude) |
bool | get_location (double *longitude, double *latitude) |
bool | set_datetime (struct ln_date *utc, double utc_offset, bool dst=false, bool precise=false) |
bool | get_track_mode (CELESTRON_TRACK_MODE *mode) |
bool | set_track_mode (CELESTRON_TRACK_MODE mode) |
bool | is_slewing (bool *slewing) |
bool | hibernate () |
bool | wakeup () |
bool | lastalign () |
bool | startmovetoindex () |
bool | indexreached (bool *atIndex) |
size_t | send_pulse (CELESTRON_DIRECTION direction, unsigned char rate, unsigned char duration_msec) |
bool | get_pulse_status (CELESTRON_DIRECTION direction) |
bool | get_guide_rate (CELESTRON_AXIS axis, uint8_t *rate) |
bool | set_guide_rate (CELESTRON_AXIS axis, uint8_t rate) |
bool | get_pier_side (char *sop) |
bool | check_aligned (bool *isAligned) |
bool | set_track_rate (CELESTRON_TRACK_RATE rate, CELESTRON_TRACK_MODE mode) |
bool | foc_exists () |
int | foc_position () |
bool | foc_move (uint32_t steps) |
bool | foc_moving () |
bool | foc_limits (int *low, int *high) |
bool | foc_abort () |
PEC_STATE | updatePecState () |
bool | PecSeekIndex () |
bool | isPecAtIndex (bool force=false) |
size_t | pecIndex () |
int | getPecValue (size_t index) |
bool | setPecValue (size_t index, int data) |
bool | PecPlayback (bool start) |
bool | PecRecord (bool start) |
bool | isPecRecordDone () |
size_t | getPecNumBins () |
const char * | PecStateStr (PEC_STATE) |
const char * | PecStateStr () |
Public Attributes | |
PEC_STATE | pecState { PEC_STATE::NotKnown } |
int | simIndex |
int | simRecordStart |
bool | simSeekIndex = false |
Protected Member Functions | |
void | set_sim_response (const char *fmt,...) |
virtual int | serial_write (const char *cmd, int nbytes, int *nbytes_written) |
virtual int | serial_read (int nbytes, int *nbytes_read) |
virtual int | serial_read_section (char stop_char, int *nbytes_read) |
size_t | send_command (const char *cmd, size_t cmd_len, char *resp, size_t resp_len, bool ascii_cmd, bool ascii_resp) |
size_t | send_passthrough (int dest, int cmd_id, const char *payload, size_t payload_len, char *resp, size_t response_len) |
Protected Attributes | |
char | response [MAX_RESP_SIZE] |
bool | simulation = false |
SimData | sim_data |
int | fd = 0 |
char | sim_ra_guide_rate = 50 |
char | sim_dec_guide_rate = 50 |
Definition at line 196 of file celestrondriver.h.
|
inline |
Definition at line 199 of file celestrondriver.h.
|
virtualdefault |
bool CelestronDriver::abort | ( | ) |
Definition at line 641 of file celestrondriver.cpp.
bool CelestronDriver::check_aligned | ( | bool * | isAligned | ) |
Definition at line 1039 of file celestrondriver.cpp.
bool CelestronDriver::check_connection | ( | ) |
Definition at line 251 of file celestrondriver.cpp.
bool CelestronDriver::echo | ( | ) |
Definition at line 340 of file celestrondriver.cpp.
bool CelestronDriver::foc_abort | ( | ) |
Definition at line 1171 of file celestrondriver.cpp.
bool CelestronDriver::foc_exists | ( | ) |
Definition at line 1071 of file celestrondriver.cpp.
bool CelestronDriver::foc_limits | ( | int * | low, |
int * | high | ||
) |
Definition at line 1147 of file celestrondriver.cpp.
bool CelestronDriver::foc_move | ( | uint32_t | steps | ) |
Definition at line 1128 of file celestrondriver.cpp.
bool CelestronDriver::foc_moving | ( | ) |
Definition at line 1138 of file celestrondriver.cpp.
int CelestronDriver::foc_position | ( | ) |
Definition at line 1101 of file celestrondriver.cpp.
bool CelestronDriver::get_azalt | ( | double * | az, |
double * | alt, | ||
bool | precise | ||
) |
Definition at line 763 of file celestrondriver.cpp.
bool CelestronDriver::get_dev_firmware | ( | int | dev, |
char * | version, | ||
size_t | size | ||
) |
Definition at line 479 of file celestrondriver.cpp.
bool CelestronDriver::get_firmware | ( | FirmwareInfo * | info | ) |
Definition at line 266 of file celestrondriver.cpp.
bool CelestronDriver::get_guide_rate | ( | CELESTRON_AXIS | axis, |
uint8_t * | rate | ||
) |
Definition at line 575 of file celestrondriver.cpp.
bool CelestronDriver::get_location | ( | double * | longitude, |
double * | latitude | ||
) |
Definition at line 818 of file celestrondriver.cpp.
bool CelestronDriver::get_model | ( | char * | model, |
size_t | size, | ||
bool * | isGem, | ||
bool * | canPec, | ||
bool * | hasHomeIndex | ||
) |
Definition at line 384 of file celestrondriver.cpp.
bool CelestronDriver::get_pier_side | ( | char * | sop | ) |
Definition at line 1027 of file celestrondriver.cpp.
bool CelestronDriver::get_pulse_status | ( | CELESTRON_DIRECTION | direction | ) |
Definition at line 547 of file celestrondriver.cpp.
bool CelestronDriver::get_radec | ( | double * | ra, |
double * | dec, | ||
bool | precise | ||
) |
Definition at line 734 of file celestrondriver.cpp.
|
inline |
Definition at line 251 of file celestrondriver.h.
|
inline |
Definition at line 255 of file celestrondriver.h.
|
inline |
Definition at line 247 of file celestrondriver.h.
bool CelestronDriver::get_track_mode | ( | CELESTRON_TRACK_MODE * | mode | ) |
Definition at line 967 of file celestrondriver.cpp.
bool CelestronDriver::get_utc_date_time | ( | double * | utc_hours, |
int * | yy, | ||
int * | mm, | ||
int * | dd, | ||
int * | hh, | ||
int * | minute, | ||
int * | ss, | ||
bool * | dst, | ||
bool | precise | ||
) |
Definition at line 880 of file celestrondriver.cpp.
bool CelestronDriver::get_variant | ( | char * | variant | ) |
Definition at line 364 of file celestrondriver.cpp.
bool CelestronDriver::get_version | ( | char * | version, |
size_t | size | ||
) |
Definition at line 350 of file celestrondriver.cpp.
const char * CelestronDriver::getDeviceName | ( | ) |
Definition at line 101 of file celestrondriver.cpp.
size_t CelestronDriver::getPecNumBins | ( | ) |
Definition at line 1241 of file celestrondriver.cpp.
int CelestronDriver::getPecValue | ( | size_t | index | ) |
Definition at line 1344 of file celestrondriver.cpp.
bool CelestronDriver::hibernate | ( | ) |
Definition at line 987 of file celestrondriver.cpp.
bool CelestronDriver::indexreached | ( | bool * | atIndex | ) |
Definition at line 1014 of file celestrondriver.cpp.
bool CelestronDriver::is_slewing | ( | bool * | slewing | ) |
Definition at line 956 of file celestrondriver.cpp.
bool CelestronDriver::isPecAtIndex | ( | bool | force = false | ) |
Definition at line 1214 of file celestrondriver.cpp.
bool CelestronDriver::isPecRecordDone | ( | ) |
Definition at line 1324 of file celestrondriver.cpp.
bool CelestronDriver::lastalign | ( | ) |
Definition at line 1001 of file celestrondriver.cpp.
int CelestronDriver::model | ( | ) |
Definition at line 375 of file celestrondriver.cpp.
|
inline |
Definition at line 259 of file celestrondriver.h.
size_t CelestronDriver::pecIndex | ( | ) |
Definition at line 1259 of file celestrondriver.cpp.
bool CelestronDriver::PecPlayback | ( | bool | start | ) |
Definition at line 1277 of file celestrondriver.cpp.
bool CelestronDriver::PecRecord | ( | bool | start | ) |
Definition at line 1301 of file celestrondriver.cpp.
bool CelestronDriver::PecSeekIndex | ( | ) |
Definition at line 1188 of file celestrondriver.cpp.
const char * CelestronDriver::PecStateStr | ( | ) |
Definition at line 1387 of file celestrondriver.cpp.
const char * CelestronDriver::PecStateStr | ( | PEC_STATE | state | ) |
Definition at line 1392 of file celestrondriver.cpp.
|
protected |
Definition at line 147 of file celestrondriver.cpp.
|
protected |
Definition at line 234 of file celestrondriver.cpp.
size_t CelestronDriver::send_pulse | ( | CELESTRON_DIRECTION | direction, |
unsigned char | rate, | ||
unsigned char | duration_msec | ||
) |
Definition at line 512 of file celestrondriver.cpp.
|
protectedvirtual |
Definition at line 119 of file celestrondriver.cpp.
|
protectedvirtual |
Reimplemented in MockCelestronDriver.
Definition at line 125 of file celestrondriver.cpp.
|
protectedvirtual |
Definition at line 112 of file celestrondriver.cpp.
bool CelestronDriver::set_datetime | ( | struct ln_date * | utc, |
double | utc_offset, | ||
bool | dst = false , |
||
bool | precise = false |
||
) |
Definition at line 846 of file celestrondriver.cpp.
void CelestronDriver::set_device | ( | const char * | name | ) |
Definition at line 106 of file celestrondriver.cpp.
bool CelestronDriver::set_guide_rate | ( | CELESTRON_AXIS | axis, |
uint8_t | rate | ||
) |
Definition at line 601 of file celestrondriver.cpp.
bool CelestronDriver::set_location | ( | double | longitude, |
double | latitude | ||
) |
Definition at line 789 of file celestrondriver.cpp.
|
inline |
Definition at line 204 of file celestrondriver.h.
|
inline |
Definition at line 243 of file celestrondriver.h.
|
inline |
Definition at line 239 of file celestrondriver.h.
|
inline |
Definition at line 235 of file celestrondriver.h.
|
inline |
Definition at line 223 of file celestrondriver.h.
|
inline |
Definition at line 231 of file celestrondriver.h.
|
protected |
|
inline |
Definition at line 215 of file celestrondriver.h.
|
inline |
Definition at line 227 of file celestrondriver.h.
|
inline |
Definition at line 219 of file celestrondriver.h.
|
inline |
Definition at line 208 of file celestrondriver.h.
bool CelestronDriver::set_track_mode | ( | CELESTRON_TRACK_MODE | mode | ) |
Definition at line 978 of file celestrondriver.cpp.
bool CelestronDriver::set_track_rate | ( | CELESTRON_TRACK_RATE | rate, |
CELESTRON_TRACK_MODE | mode | ||
) |
Definition at line 1050 of file celestrondriver.cpp.
bool CelestronDriver::setPecValue | ( | size_t | index, |
int | data | ||
) |
Definition at line 1362 of file celestrondriver.cpp.
bool CelestronDriver::slew_azalt | ( | double | az, |
double | alt, | ||
bool | precise | ||
) |
Definition at line 667 of file celestrondriver.cpp.
bool CelestronDriver::slew_radec | ( | double | ra, |
double | dec, | ||
bool | precise | ||
) |
Definition at line 647 of file celestrondriver.cpp.
bool CelestronDriver::start_motion | ( | CELESTRON_DIRECTION | dir, |
CELESTRON_SLEW_RATE | rate | ||
) |
Definition at line 621 of file celestrondriver.cpp.
bool CelestronDriver::startmovetoindex | ( | ) |
Definition at line 1007 of file celestrondriver.cpp.
bool CelestronDriver::stop_motion | ( | CELESTRON_DIRECTION | dir | ) |
Definition at line 632 of file celestrondriver.cpp.
bool CelestronDriver::sync | ( | double | ra, |
double | dec, | ||
bool | precise | ||
) |
Definition at line 687 of file celestrondriver.cpp.
bool CelestronDriver::unsync | ( | ) |
Definition at line 709 of file celestrondriver.cpp.
PEC_STATE CelestronDriver::updatePecState | ( | ) |
Definition at line 1371 of file celestrondriver.cpp.
bool CelestronDriver::wakeup | ( | ) |
Definition at line 994 of file celestrondriver.cpp.
|
protected |
Definition at line 374 of file celestrondriver.h.
PEC_STATE CelestronDriver::pecState { PEC_STATE::NotKnown } |
Definition at line 334 of file celestrondriver.h.
|
protected |
Definition at line 371 of file celestrondriver.h.
|
protected |
Definition at line 373 of file celestrondriver.h.
|
protected |
Definition at line 377 of file celestrondriver.h.
|
protected |
Definition at line 376 of file celestrondriver.h.
int CelestronDriver::simIndex |
Definition at line 356 of file celestrondriver.h.
int CelestronDriver::simRecordStart |
Definition at line 357 of file celestrondriver.h.
bool CelestronDriver::simSeekIndex = false |
Definition at line 358 of file celestrondriver.h.
|
protected |
Definition at line 372 of file celestrondriver.h.