Instrument Neutral Distributed Interface INDI  2.0.2
Public Member Functions | List of all members
MockCelestronDriver Class Reference
Inheritance diagram for MockCelestronDriver:

Public Member Functions

 MockCelestronDriver ()
void set_response (const char *fmt,...)
 MOCK_METHOD3 (serial_write, int(const char *cmd, int nbytes, int *nbytes_written))
 MOCK_METHOD2 (serial_read, int(int nbytes, int *nbytes_read))
int serial_read_section (char stop_char, int *nbytes_read)
- Public Member Functions inherited from CelestronDriver
 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 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 ()

Additional Inherited Members

- Public Attributes inherited from CelestronDriver
PEC_STATE pecState { PEC_STATE::NotKnown }
int simIndex
int simRecordStart
bool simSeekIndex = false
- Protected Member Functions inherited from CelestronDriver
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)
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 inherited from CelestronDriver
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

Detailed Description

Definition at line 35 of file test_celestrondriver.cpp.

Constructor & Destructor Documentation

◆ MockCelestronDriver()

MockCelestronDriver::MockCelestronDriver ( )

Definition at line 38 of file test_celestrondriver.cpp.

Member Function Documentation


MockCelestronDriver::MOCK_METHOD2 ( serial_read  ,
int(int nbytes, int *nbytes_read)   


MockCelestronDriver::MOCK_METHOD3 ( serial_write  ,
int(const char *cmd, int nbytes, int *nbytes_written)   

◆ serial_read_section()

int MockCelestronDriver::serial_read_section ( char  stop_char,
int *  nbytes_read 

Reimplemented from CelestronDriver.

Definition at line 56 of file test_celestrondriver.cpp.

◆ set_response()

void MockCelestronDriver::set_response ( const char *  fmt,

Definition at line 44 of file test_celestrondriver.cpp.

The documentation for this class was generated from the following file: