26 #ifndef _LX200_COMMAND_HPP_ 27 #define _LX200_COMMAND_HPP_ 29 #include <QTextStream> 40 virtual bool writeCommandToBuffer(
char *&buff,
char *end) = 0;
41 bool hasBeenWrittenToBuffer(
void)
const {
return has_been_written_to_buffer;}
42 virtual int readAnswerFromBuffer(
const char *&buff,
const char *end) = 0;
43 virtual bool needsNoAnswer(
void)
const {
return false;}
44 virtual void print(QTextStream &o)
const = 0;
45 virtual bool isCommandGotoSelected(
void)
const {
return false;}
46 virtual bool shortAnswerReceived(
void)
const {
return false;}
52 bool has_been_written_to_buffer;
69 bool writeCommandToBuffer(
char *&buff,
char *end);
70 int readAnswerFromBuffer(
const char*&,
const char*) {
return 1;}
71 bool needsNoAnswer(
void)
const {
return true;}
72 void print(QTextStream &o)
const;
83 bool writeCommandToBuffer(
char *&buff,
char *end);
84 int readAnswerFromBuffer(
const char*&,
const char*) {
return 1;}
85 bool needsNoAnswer(
void)
const {
return true;}
86 void print(QTextStream &o)
const;
95 bool writeCommandToBuffer(
char *&buff,
char *end);
96 int readAnswerFromBuffer(
const char *&buff,
const char *end);
97 void print(QTextStream &o)
const;
109 bool writeCommandToBuffer(
char *&buff,
char *end);
110 int readAnswerFromBuffer(
const char *&buff,
const char *end);
111 void print(QTextStream &o)
const;
123 bool writeCommandToBuffer(
char *&buff,
char *end);
124 int readAnswerFromBuffer(
const char *&buff,
const char *end);
125 void print(QTextStream &o)
const;
126 bool isCommandGotoSelected(
void)
const {
return true;}
127 bool shortAnswerReceived(
void)
const {
return (first_byte != 256);}
138 bool writeCommandToBuffer(
char *&buff,
char *end);
139 int readAnswerFromBuffer(
const char *&buff,
const char *end);
140 void print(QTextStream &o)
const;
148 bool writeCommandToBuffer(
char *&buff,
char *end);
149 int readAnswerFromBuffer(
const char *&buff,
const char *end);
150 void print(QTextStream &o)
const;
153 #endif //_LX200_COMMAND_HPP_ Meade LX200 command: Get the current declination.
Base class for telescope server classes.
Meade LX200 command: Slew to the coordinates set before.
Telescope client that connects directly to a Meade LX200 through a serial port.
Abstract base class for Meade LX200 (and compatible) commands.
Meade LX200 command: Stop the current slew.
Meade LX200 command: Set declination.
QDataStream & operator<<(QDataStream &out, const SphericalRegionP ®ion)
Serialize the passed SphericalRegionP into a binary blob.
Meade LX200 command: Get the current right ascension.
Meade LX200 command: Set right ascension.