nidas  v1.2-1520
GOESProject.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_GOESPROJECT_H
28 #define NIDAS_DYNLD_ISFF_GOESPROJECT_H
29 
30 #include <nidas/core/Sample.h>
32 
33 #include <list>
34 #include <vector>
35 #include <map>
36 
37 namespace nidas {
38 
39 namespace core {
40 class Project;
41 class SampleTag;
42 }
43 
44 namespace dynld { namespace isff {
45 
47 {
48 public:
50  ~GOESProject();
51 
53 
61  int getStationNumber(unsigned long goesId) const
63 
64  int getXmitInterval(int stationNumber) const
66 
67  int getXmitOffset(int stationNumber) const
69 
70  const nidas::core::SampleTag* getGOESSampleTag(int stationNumber) const
72 
74  {
75  _sampleTags.push_back(tag);
76  _constSampleTags.push_back(tag);
77  }
78 
84  const nidas::core::SampleTag* getSampleTag(int stationNumber, int sampleId) const;
85 
86  std::list<const nidas::core::SampleTag*> getSampleTags() const
87  {
88  return _constSampleTags;
89  }
90 
91  unsigned long getGOESId(int stationNum) const
93 
94 private:
95  GOESProject(const GOESProject& x); // no copying
96 
97  GOESProject& operator=(const GOESProject& x) const; // no assign
98 
99  void readGOESIds()
100  throw(nidas::util::InvalidParameterException);
101 
102  nidas::core::Project* _project;
103 
104  std::vector<unsigned long> _goesIds;
105 
106  std::map<unsigned long,int> _stationNumbersById;
107 
108  std::map<nidas::core::dsm_sample_id_t,const nidas::core::SampleTag*> _sampleTagsById;
109 
110  std::vector<int> _xmitOffsets;
111 
112  std::vector<int> _xmitIntervals;
113 
114  std::list<nidas::core::SampleTag*> _sampleTags;
115 
116  std::list<const nidas::core::SampleTag*> _constSampleTags;
117 
118  std::vector<nidas::core::SampleTag*> _goesTags;
119 
120 };
121 
122 }}} // namespace nidas namespace dynld namespace isff
123 
124 #endif
unsigned int dsm_sample_id_t
Definition: Sample.h:63
~GOESProject()
Definition: GOESProject.cc:175
std::list< nidas::core::SampleTag * > _sampleTags
Definition: GOESProject.h:114
nidas::core::Project * _project
Definition: GOESProject.h:102
std::list< const nidas::core::SampleTag * > _constSampleTags
Definition: GOESProject.h:116
Definition: GOESProject.h:46
int getStationNumber(unsigned long goesId) const
Get the station number, corresponding to a GOES id.
Definition: GOESProject.cc:182
const nidas::core::SampleTag * getSampleTag(int stationNumber, int sampleId) const
Get a SampleTag*, corresponding to station and sampleid.
Definition: GOESProject.cc:225
GOESProject & operator=(const GOESProject &x) const
GOESProject(nidas::core::Project *p)
Definition: GOESProject.cc:42
void addSampleTag(nidas::core::SampleTag *tag)
Definition: GOESProject.h:73
std::map< nidas::core::dsm_sample_id_t, const nidas::core::SampleTag * > _sampleTagsById
Definition: GOESProject.h:108
const nidas::core::SampleTag * getGOESSampleTag(int stationNumber) const
Definition: GOESProject.cc:242
std::list< const nidas::core::SampleTag * > getSampleTags() const
Definition: GOESProject.h:86
nidas::core::Project * getProject() const
Definition: GOESProject.h:52
int getXmitInterval(int stationNumber) const
Definition: GOESProject.cc:213
std::vector< int > _xmitOffsets
Definition: GOESProject.h:110
Class describing a group of variables that are sampled and handled together.
Definition: SampleTag.h:87
unsigned long getGOESId(int stationNum) const
Definition: GOESProject.cc:194
int getXmitOffset(int stationNumber) const
Definition: GOESProject.cc:201
std::vector< int > _xmitIntervals
Definition: GOESProject.h:112
std::vector< unsigned long > _goesIds
Definition: GOESProject.h:104
Definition: Project.h:60
std::vector< nidas::core::SampleTag * > _goesTags
Definition: GOESProject.h:118
Definition: InvalidParameterException.h:35
std::map< unsigned long, int > _stationNumbersById
Definition: GOESProject.h:106