27 #ifndef NIDAS_DYNLD_ISFF_SE_GOESXMTR_H
28 #define NIDAS_DYNLD_ISFF_SE_GOESXMTR_H
41 namespace nidas {
namespace dynld {
namespace isff {
43 using namespace nidas::core;
90 int getModel()
const {
return _model; }
107 int configid,
const Sample*)
113 void transmitDataSE110(const nidas::util::UTime& sendTime,
114 int configid,const
Sample*)
115 throw (nidas::util::IOException);
117 void transmitDataSE120(const nidas::util::UTime& sendTime,
118 int configid,const
Sample*)
119 throw (nidas::util::IOException);
121 void close() throw (nidas::util::IOException)
147 std::string recv() throw(nidas::util::
IOException);
149 void flush() throw(nidas::util::IOException)
160 static std::string fix(
const std::string& msg);
167 static std::string unfix(
const std::string& msg);
172 static char crc(
const std::string& msg);
186 void tosleep() throw(nidas::util::IOException);
193 void query() throw(nidas::util::IOException);
195 int detectModel() throw(nidas::util::IOException);
197 bool testTransmitSE120() throw(nidas::util::IOException);
199 void cancelTransmit(const nidas::util::UTime& at)
200 throw(nidas::util::IOException);
207 int checkStatus() throw(nidas::util::IOException);
209 void printStatus() throw();
211 void printStatus(std::ostream&) throw();
213 void setXmtrId() throw(nidas::util::IOException);
215 unsigned long getXmtrId() throw(nidas::util::IOException);
217 void setXmtrClock() throw(nidas::util::IOException);
219 nidas::util::UTime getXmtrClock() throw(nidas::util::IOException);
233 int getXmtrClockDelay(
int nchar) const;
235 unsigned long checkId() throw(nidas::util::IOException);
237 int checkClock() throw(nidas::util::IOException);
239 void transmitDataSE110() throw(nidas::util::IOException);
241 void reset() throw(nidas::util::IOException);
243 void doSelfTest() throw(nidas::util::IOException);
252 int getSelfTestResults() throw(nidas::util::IOException);
254 static std::
string codeString(
char pktType);
262 void checkResponse(
char ptype,const std::
string& resp)
263 throw(nidas::util::IOException);
271 void checkACKResponse(
char ptype,const std::
string& resp,
char seqnum)
272 throw(nidas::util::IOException);
279 void getBatteryVoltages(
float ¤t,
float& before,
float& during)
280 throw(nidas::util::IOException);
286 static const
char SOH = '\x1';
292 static const
char EOT = '\x4';
294 static const std::
string SOH_STR;
301 std::string getSelfTestStatusString();
304 static const char PKT_GET_ID =
'\x10';
307 static const char PKT_SET_ID =
'\x11';
310 static const char PKT_SET_TIME =
'\x13';
313 static const char PKT_GET_TIME =
'\x14';
316 static const char PKT_XMT_DATA =
'\x15';
319 static const char PKT_CANCEL_XMT =
'\x16';
321 static const char PKT_GET_XMT_QUE =
'\x17';
323 static const char PKT_QUERY =
'\x18';
326 static const char PKT_SET_GLOBALS =
'\x1b';
329 static const char PKT_GET_GLOBALS =
'\x1c';
332 static const char PKT_DISPLAY_VERSION =
'\x1d';
335 static const char PKT_XMT_DATA_SE120 =
'\x1e';
337 static const char PKT_POLL_ENABLE = 0x38;
338 static const char PKT_POLL_DATA_GET = 0x39;
339 static const char PKT_POLL_DATA_SET = 0x3a;
342 static const char PKT_GET_SE1200_STATUS =
'\x74';
344 static const char PKT_RESET_XMTR =
'\x76';
346 static const char PKT_SELFTEST_DISPL =
'\x77';
348 static const char PKT_SELFTEST_START =
'\x78';
350 static const char PKT_SEND_FIXED_CHAN =
'\x7a';
353 static const char PKT_SOFTWARE_LOAD =
'\x7c';
359 static const char PKT_ACKNOWLEDGE =
'\x80';
362 static const char PKT_ERR_RESPONSE =
'\xf0';
369 static const char PKT_STATUS_OK = 0;
371 static const char PKT_STATUS_ILLEGAL_REQUEST = 0x01;
373 static const char PKT_STATUS_ITEM_NOT_FOUND = 0x03;
375 static const char PKT_STATUS_INVALID_DATE_TIME = 0x04;
377 static const char PKT_STATUS_TRANSMIT_OVERLAP = 0x05;
379 static const char PKT_STATUS_INVALID_CHANNEL = 0x06;
381 static const char PKT_STATUS_INVALID_TRANSMIT_INTERVAL = 0x07;
383 static const char PKT_STATUS_EEPROM_NOT_UPDATED = 0x08;
385 static const char PKT_STATUS_INVALID_REPEAT_COUNT = 0x09;
387 static const char PKT_STATUS_CLOCK_NOT_LOADED = 0x0a;
389 static const char PKT_STATUS_CRC_ERROR_ON_LOAD = 0x0b;
391 static const char* statusCodeStrings[];
394 static const char ERR_TOOLONG = 0x01;
397 static const char ERR_TOOSHORT = 0x02;
400 static const char ERR_CRC = 0x03;
403 static const char ERR_BADTYPE = 0x04;
406 static const char ERR_BADLEN = 0x05;
409 static const char ERR_MEMORY = 0x06;
412 static const char ERR_SEQUENCE = 0x07;
415 static const char ERR_TIMEOUT = 0x08;
417 static const char* errorCodeStrings[];
422 } selfTestCodes[2][10];
uint32_t crc
Definition: sing.cc:937
A class for parsing, formatting and doing operations on time, based on Unix time conventions, where leap seconds are ignored, so that there are always 60 seconds in a minute, 3600 seconds in an hour and 86400 seconds in a day.
Definition: UTime.h:76
virtual bool isNewFile() const
Definition: SE_GOESXmtr.h:101
int getRFBaud() const
Definition: SE_GOESXmtr.h:79
void setModel(int val)
Definition: SE_GOESXmtr.h:92
Support for a GOES transmitter, implemented as an IOChannel.
Definition: GOESXmtr.h:47
std::string _softwareBuildDate
Definition: SE_GOESXmtr.h:459
int getMaxRFBaud() const
Get the maximum RF baud rate supported by the transmitter.
Definition: SE_GOESXmtr.h:99
short _selfTestStatus
Definition: SE_GOESXmtr.h:461
const char * msg
Definition: SE_GOESXmtr.h:298
std::string _lastXmitStatus
Definition: SE_GOESXmtr.h:457
Definition: SE_GOESXmtr.h:419
Definition: SE_GOESXmtr.h:296
Virtual base class declaring methods for converting numeric values between little-endian and big-endi...
Definition: EndianConverter.h:304
An IOChannel implementation for a Signal Engineering GOES transmitter.
Definition: SE_GOESXmtr.h:49
int _clockDiffMsecs
Most recent value for GOES clock difference: GOES clock - system clock.
Definition: SE_GOESXmtr.h:449
bool _gpsInstalled
Definition: SE_GOESXmtr.h:465
int len
Definition: sing.cc:934
Interface to a data sample.
Definition: Sample.h:189
int _model
Definition: SE_GOESXmtr.h:444
SE_GOESXmtr * clone() const
Clone invokes default copy constructor.
Definition: SE_GOESXmtr.h:71
Header file for the nidas::util logging facility.
short mask
Definition: SE_GOESXmtr.h:420
Definition: IOException.h:37
const char * text
Definition: SE_GOESXmtr.h:421
unsigned long _activeId
Actual id read from transmitter.
Definition: SE_GOESXmtr.h:472
nidas::util::UTime _transmitSampleTime
Definition: SE_GOESXmtr.h:455
int _maxRFBaud
Definition: SE_GOESXmtr.h:463
static const nidas::util::EndianConverter * _fromBig
Definition: SE_GOESXmtr.h:426
size_t _xmitNbytes
Definition: SE_GOESXmtr.h:467
nidas::util::UTime _transmitQueueTime
Definition: SE_GOESXmtr.h:451
int value
Definition: SE_GOESXmtr.h:297
int _rfBaud
Definition: SE_GOESXmtr.h:474
nidas::util::UTime _transmitAtTime
Definition: SE_GOESXmtr.h:453
Definition: InvalidParameterException.h:35