nidas v1.2.3
ChronyLog.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 ** 2011, 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#include <nidas/Config.h>
28
29#ifdef HAVE_SYS_INOTIFY_H
30
31#ifndef NIDAS_DYNLD_CHRONYLOG_H
32#define NIDAS_DYNLD_CHRONYLOG_H
33
34#include "WatchedFileSensor.h"
36
37namespace nidas { namespace dynld {
38
39using namespace nidas::core;
40
66class ChronyLog: public WatchedFileSensor, public ChronyStatusNode
67{
68
69public:
70
75 ChronyLog();
76
83 void init();
84
89 bool process(const Sample* samp, std::list<const Sample*>& results) throw();
90
97 void printChronyStatus(std::ostream& ostr) throw();
98
99private:
100
101 dsm_time_t _lastSampleTime;
102
103 struct statusVariable {
104 statusVariable(): name(), id(0), varindex(0) {}
105 std::string name;
106 dsm_sample_id_t id;
107 unsigned int varindex;
108 };
109
110 struct statusVariable _statusVariables[2];
111
112 float _stratum;
113
114 float _toffset;
115
119 float _toffsetToUsecs;
120
122 ChronyLog(const ChronyLog&);
123
125 ChronyLog& operator=(const ChronyLog&);
126
127};
128
129}} // namespace nidas namespace dynld
130
131#endif
132#endif // HAVE_SYS_INOTIFY_H
Object with a printChronyStatus() method which can be called from a DSMServer.
Definition ChronyStatus.h:44
Interface to a data sample.
Definition Sample.h:190
The essential core classes of nidas.
Definition A2DConverter.h:31
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC.
Definition Sample.h:62
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31