nidas  v1.2-1520
MOSMote.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  ** 2007, 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_MOSMOTE_H
28 #define NIDAS_DYNLD_ISFF_MOSMOTE_H
29 
32 
33 namespace nidas { namespace dynld { namespace isff {
34 
35  using namespace nidas::core;
36 
44 class MOSMote: public SerialSensor
45 {
46 public:
47 
48  MOSMote();
49 
50  void open(int flags)
52 
53  void close() throw(nidas::util::IOException);
54 
55  bool process(const Sample* samp,std::list<const Sample*>& results)
56  throw();
57 
58 private:
59  unsigned int _tsyncPeriodSecs;
60 
61  unsigned int _ncallBack;
62 
64  {
65  public:
66  MOS_TimeSyncer(MOSMote* mote): _mote(mote) {}
67 
71  void looperNotify() throw();
72  private:
73  MOSMote* _mote;
75  MOS_TimeSyncer& operator=(const MOS_TimeSyncer&);
76  };
77 
78  MOS_TimeSyncer _mosSyncher;
79 };
80 
81 }}} // namespace nidas namespace dynld namespace isff
82 
83 #endif
Interface of a client of Looper.
Definition: LooperClient.h:38
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition: SerialSensor.h:64
unsigned int _tsyncPeriodSecs
Definition: MOSMote.h:59
MOS_TimeSyncer(MOSMote *mote)
Definition: MOSMote.h:66
Interface to a data sample.
Definition: Sample.h:189
A SerialSensor for support of an early, buggy version of a Mantis OS Mote, which insert null...
Definition: MOSMote.h:44
Definition: IOException.h:37
unsigned int _ncallBack
Definition: MOSMote.h:61
Definition: InvalidParameterException.h:35