25 #ifndef _NEXSTAR_COMMAND_HPP_
26 #define _NEXSTAR_COMMAND_HPP_
28 #include <QTextStream>
39 virtual bool writeCommandToBuffer(
char *&buff,
char *end) = 0;
40 bool hasBeenWrittenToBuffer(
void)
const {
return has_been_written_to_buffer; }
41 virtual int readAnswerFromBuffer(
const char *&buff,
const char *end)
const = 0;
42 virtual bool needsNoAnswer(
void)
const {
return false; }
43 virtual void print(QTextStream &o)
const = 0;
49 bool has_been_written_to_buffer;
52 inline QTextStream &operator<<(QTextStream &o,
const NexStarCommand &c)
63 bool writeCommandToBuffer(
char *&buff,
char *end);
64 int readAnswerFromBuffer(
const char *&buff,
const char *end)
const;
65 void print(QTextStream &o)
const;
76 bool writeCommandToBuffer(
char *&buff,
char *end);
77 int readAnswerFromBuffer(
const char *&buff,
const char *end)
const;
78 void print(QTextStream &o)
const;
Base class for telescope server classes.
Telescope client that connects directly to a Celestron NexStar through a serial port.
Celestron NexStar command: Get the current position.
Abstract base class for Celestron NexStar (and compatible) commands.
Celestron NexStar command: Slew to a given position.