nidas  v1.2-1520
PSQLProcessor.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  ********************************************************************
6  ** NIDAS: NCAR In-situ Data Acquistion Software
7  **
8  ** 2005, Copyright University Corporation for Atmospheric Research
9  **
10  ** This program is free software; you can redistribute it and/or modify
11  ** it under the terms of the GNU General Public License as published by
12  ** the Free Software Foundation; either version 2 of the License, or
13  ** (at your option) any later version.
14  **
15  ** This program is distributed in the hope that it will be useful,
16  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  ** GNU General Public License for more details.
19  **
20  ** The LICENSE.txt file accompanying this software contains
21  ** a copy of the GNU General Public License. If it is not found,
22  ** write to the Free Software Foundation, Inc.,
23  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  **
25  ********************************************************************
26 */
27 
28 #ifndef NIDAS_DYNLD_PSQL_PSQLPROCESSOR_H
29 #define NIDAS_DYNLD_PSQL_PSQLPROCESSOR_H
30 
33 
34 namespace nidas { namespace dynld { namespace psql {
35 
40 
42 {
43 public:
44 
45  PSQLProcessor();
46 
50  PSQLProcessor(const PSQLProcessor& x);
51 
52  virtual ~PSQLProcessor();
53 
54  PSQLProcessor* clone() const;
55 
56  bool cloneOnConncetion() const { return false; }
57 
58  void connect(SampleInput*) throw(nidas::util::IOException);
59 
60  void disconnect(SampleInput*) throw(nidas::util::IOException);
61 
62  void connected(SampleOutput* orig, SampleOutput* output) throw();
63 
64  void disconnected(SampleOutput* output) throw();
65 
69  void setAveragePeriod(int val) { averager.setAveragePeriod(val); }
70 
74  int getAveragePeriod() const { return averager.getAveragePeriod(); }
75 
76  const std::set<const SampleTag*>& getSampleTags() const
77  {
78  return averager.getSampleTags();
79  }
80 
81 protected:
82 
84 
86 
88 };
89 
90 }}}
91 
92 #endif // NIDAS_DYNLD_PSQL_PSQLPROCESSOR_H
const std::set< const SampleTag * > & getSampleTags() const
Implementation of SampleSource::getSampleTags().
Definition: PSQLProcessor.h:76
void setAveragePeriod(int val)
Set average period, in milliseconds.
Definition: PSQLProcessor.h:69
A measurement site.
Definition: Site.h:49
PSQLProcessor * clone() const
Definition: PSQLProcessor.cc:63
void connected(SampleOutput *orig, SampleOutput *output)
Definition: PSQLProcessor.cc:161
Interface of an output stream of samples.
Definition: SampleOutput.h:47
Definition: PSQLProcessor.h:41
const nidas::core::Site * site
Definition: PSQLProcessor.h:87
Definition: SampleAverager.h:37
int getAveragePeriod() const
Get average period, in milliseconds.
Definition: PSQLProcessor.h:74
SampleAverager averager
Definition: PSQLProcessor.h:85
PSQLProcessor()
Definition: PSQLProcessor.cc:44
void disconnect(SampleInput *)
Definition: PSQLProcessor.cc:137
void disconnected(SampleOutput *output)
Definition: PSQLProcessor.cc:173
std::list< const SampleTag * > getSampleTags() const
Get the output SampleTags.
Definition: SampleAverager.h:74
virtual ~PSQLProcessor()
Definition: PSQLProcessor.cc:59
void connect(SampleInput *)
Definition: PSQLProcessor.cc:67
SampleInput * input
Definition: PSQLProcessor.h:83
Definition: IOException.h:37
bool cloneOnConncetion() const
Definition: PSQLProcessor.h:56
Class describing a group of variables that are sampled and handled together.
Definition: SampleTag.h:87
Interface of a processor of samples.
Definition: SampleIOProcessor.h:49
Interface of an input SampleSource.
Definition: SampleInput.h:47