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_