153 bool readPacket(
int port,
Packet &reply);
The Communicator class handles high-level communication with the Celestron devices.
static std::string Device
bool commandBlind(int port, Target dest, Command cmd, buffer data)
static void setDeviceName(const std::string &device)
bool sendCommand(int port, Target dest, Command cmd, buffer data, buffer &reply)
The Packet class handles low-level communication with the Celestron devices.
static const uint8_t AUX_HDR
void FillBuffer(buffer &buf)
Packet(Target source, Target destination, Command command)
Class to provide general functionality of a GPS device.
Command
The Command enum includes all the command types sent to the various devices (motor,...
@ MC_GOTO_FAST
send 24 bit target
@ MC_GOTO_SLOW
send 24 bit target
@ MC_SET_NEG_BACKLASH
1 byte, 0-99
@ GET_VER
return 2 or 4 bytes major.minor.build
@ MC_GET_POSITION
return 24 bit position
@ FOC_GET_HS_POSITIONS
returns 2 ints low and high limits
@ MC_GET_POS_BACKLASH
1 byte, 0-99
@ FOC_CALIB_ENABLE
send 0 to start or 1 to stop
@ MC_MOVE_POS
send move rate 0-9
@ MC_MOVE_NEG
send move rate 0-9
@ MC_SLEW_DONE
return 0xFF when move finished
@ MC_SET_POS_BACKLASH
1 byte, 0-99
@ MC_GET_NEG_BACKLASH
1 byte, 0-99
@ MC_SET_POSITION
send 24 bit new position
@ FOC_CALIB_DONE
returns 2 bytes [0] done, [1] state 0-12
std::vector< uint8_t > buffer
Target
The Target enum Specifies the target device of the command.
@ ALT
altitude|declination axis motor
@ AZM
azimuth|hour angle axis motor