nidas  v1.2-1520
SimGOESXmtr.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2006, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 
27 #ifndef NIDAS_DYNLD_ISFF_SIMGOESXMTR_H
28 #define NIDAS_DYNLD_ISFF_SIMGOESXMTR_H
29 
30 #include "GOESXmtr.h"
31 #include <nidas/core/IOChannel.h>
32 #include <nidas/core/SampleTag.h>
33 #include <nidas/util/UTime.h>
34 #include <nidas/util/Logger.h>
35 
36 #include <string>
37 #include <iostream>
38 #include <vector>
39 
40 namespace nidas { namespace dynld { namespace isff {
41 
42 using namespace nidas::core;
43 
47 class SimGOESXmtr: public GOESXmtr {
48 
49 public:
50 
54  SimGOESXmtr();
55 
59  SimGOESXmtr(const SimGOESXmtr&);
60 
64  ~SimGOESXmtr();
65 
69  SimGOESXmtr* clone() const { return new SimGOESXmtr(*this); }
70 
76  {
77  _rfBaud = val;
78  }
79 
80  int getRFBaud() const
81  {
82  return _rfBaud;
83  }
84 
85 
86  void open() throw(nidas::util::IOException);
87 
91  size_t read(void*, size_t) throw (nidas::util::IOException)
92  {
93  throw nidas::util::IOException(getName(),"read","not supported");
94  }
95 
99  size_t write(const void*, size_t) throw (nidas::util::IOException)
100  {
101  throw nidas::util::IOException(getName(),"write","not supported");
102  }
103 
107  size_t write(const struct iovec*, int) throw (nidas::util::IOException)
108  {
109  throw nidas::util::IOException(getName(),"write","not supported");
110  }
111 
115  void transmitData(const nidas::util::UTime& at,
116  int configid,const Sample*) throw (nidas::util::IOException);
117 
118  unsigned long checkId() throw(nidas::util::IOException);
119 
120  int checkClock() throw(nidas::util::IOException);
121 
122  void printStatus() throw();
123 
124  void reset() throw(nidas::util::IOException) {}
125 
126  void init() throw(nidas::util::IOException) {}
127 
128 private:
129 
131 
133 
135 
136  int _rfBaud;
137 
138 };
139 
140 
141 }}} // namespace nidas namespace dynld namespace isff
142 
143 #endif
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
size_t write(const struct iovec *, int)
Do the actual hardware write.
Definition: SimGOESXmtr.h:107
void setRFBaud(long val)
Set the RF baud rate.
Definition: SimGOESXmtr.h:75
Support for a GOES transmitter, implemented as an IOChannel.
Definition: GOESXmtr.h:47
size_t write(const void *, size_t)
Do the actual hardware write.
Definition: SimGOESXmtr.h:99
An IOChannel implementation to simulate a GOES transmitter.
Definition: SimGOESXmtr.h:47
int _rfBaud
Definition: SimGOESXmtr.h:136
int getRFBaud() const
Definition: SimGOESXmtr.h:80
Interface to a data sample.
Definition: Sample.h:189
nidas::util::UTime _transmitSampleTime
Definition: SimGOESXmtr.h:134
void init()
Initialize tranmitter.
Definition: SimGOESXmtr.h:126
nidas::util::UTime _transmitQueueTime
Definition: SimGOESXmtr.h:130
Header file for the nidas::util logging facility.
Definition: IOException.h:37
SimGOESXmtr * clone() const
Clone invokes default copy constructor.
Definition: SimGOESXmtr.h:69
nidas::util::UTime _transmitAtTime
Definition: SimGOESXmtr.h:132
Definition: InvalidParameterException.h:35