My Project
DasAcquisition.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "prodml2_0/AbstractObject.h"
37 #include "resqml2/AbstractValuesProperty.h"
38 
39 namespace common {
40  class HdfProxy;
41 }
42 
43 namespace prodml2_0
44 {
45  class DLL_IMPORT_OR_EXPORT DasAcquisition : public prodml2_0::AbstractObject
46  {
47  private:
51  gsoap_eml2_1::prodml2__DasRaw* pushBackRawXmlOnly(const std::string & uuid, const std::string & rawDataUnit, const ULONG64 & startLocusIndex, const ULONG64 & numberOfLoci, const std::string & rawDescription,
52  const std::string & startTime, const std::string endTime, const ULONG64 & timeCount,
53  gsoap_eml2_1::prodml2__DasDimensions slowestHdfDimension, gsoap_eml2_1::prodml2__DasDimensions fastestHdfDimension,
54  bool datatypeIsInteger,
56 
57  public:
62 
69  DasAcquisition(class FiberOpticalPath* fiberOpticalPath, class DasInstrumentBox* dasInstrumentBox,
70  const std::string & guid, const std::string & title,
71  const std::string & jobUuid, const std::string & facilityId, const std::string & vendorName,
72  const double & pulseRate, const gsoap_eml2_1::eml21__FrequencyUom & pulseRateUom,
73  const double & pulseWidth, const gsoap_eml2_1::eml21__TimeUom & pulseWidthUom,
74  const double & gaugeLength, const gsoap_eml2_1::eml21__LengthUom & gaugeLengthUom,
75  const double & spatialSamplingInterval, const gsoap_eml2_1::eml21__LengthUom & spatialSamplingIntervalUom,
76  const double & minimumFrequency, const gsoap_eml2_1::eml21__FrequencyUom & minimumFrequencyUom,
77  const double & maximumFrequency, const gsoap_eml2_1::eml21__FrequencyUom & maximumFrequencyUom,
78  const ULONG64 & lociCount, const ULONG64 & startLocusIndex,
79  const std::string & measurementStartIsoTime, bool triggeredMeasurement);
80 
84  DasAcquisition(class FiberOpticalPath* fiberOpticalPath, class DasInstrumentBox* dasInstrumentBox,
85  prodml2_0::HdfProxy * proxy);
86 
90  DasAcquisition(gsoap_eml2_1::_prodml2__DasAcquisition* fromGsoap) : AbstractObject(fromGsoap) {}
91 
96 
97  static const char* XML_TAG;
98  virtual std::string getXmlTag() const {return XML_TAG;}
99 
100  void setHdfProxy(common::AbstractHdfProxy * proxy);
101 
102  gsoap_eml2_1::eml21__DataObjectReference* getFiberOpticalPathDor() const;
103  class FiberOpticalPath* getFiberOpticalPath() const;
104 
105  void setFiberOpticalPath(class FiberOpticalPath* fiberOpticalPath);
106 
107  gsoap_eml2_1::eml21__DataObjectReference* getDasInstrumentBoxDor() const;
108  class DasInstrumentBox* getDasInstrumentBox() const;
109 
110  void setDasInstrumentBox(class DasInstrumentBox* dasInstrumentBox);
111 
112  std::string getJobUuid() const;
113  std::string getFacilityUuid() const; // only the first one for now
114  std::string getVendorName() const;
115 
116  double getPulseRate() const;
117  gsoap_eml2_1::eml21__FrequencyUom getPulseRateUom() const;
118 
119  double getPulseWidth() const;
120  gsoap_eml2_1::eml21__TimeUom getPulseWidthUom() const;
121 
122  double getGaugeLength() const;
123  gsoap_eml2_1::eml21__LengthUom getGaugeLengthUom() const;
124 
125  double getSpatialSamplingInterval() const;
126  gsoap_eml2_1::eml21__LengthUom getSpatialSamplingIntervalUom() const;
127 
128  double getMinimumFrequency() const;
129  gsoap_eml2_1::eml21__FrequencyUom getMinimumFrequencyUom() const;
130 
131  double getMaximumFrequency() const;
132  gsoap_eml2_1::eml21__FrequencyUom getMaximumFrequencyUom() const;
133 
134  ULONG64 getLociCount() const;
135  LONG64 getStartLocusIndex() const;
136 
137  std::string getMeasurementStartIsoTime() const;
138 
139  bool isTriggeredMeasurement() const;
140 
152  void pushBackRaw(const std::string & guid, bool datatypeIsInteger, const char & datatypeByteCount, const std::string & rawDataUnit, LONG64* timeArray, const ULONG64 & timeCount, common::AbstractHdfProxy* proxy);
153 
157  void writeIntoDataset(float * data,
158  unsigned long numSampleForAllLoci,
159  unsigned long timeStepIndex);
160  void writeIntoDataset(double * data,
161  unsigned long numSampleForAllLoci,
162  unsigned long timeStepIndex);
163  void writeIntoDataset(LONG64 * data,
164  unsigned long numSampleForAllLoci,
165  unsigned long timeStepIndex);
166  void writeIntoDataset(int * data,
167  unsigned long numSampleForAllLoci,
168  unsigned long timeStepIndex);
169  void writeIntoDataset(short * data,
170  unsigned long numSampleForAllLoci,
171  unsigned long timeStepIndex);
172  void writeIntoDataset(char * data,
173  unsigned long numSampleForAllLoci,
174  unsigned long timeStepIndex);
175 
179  unsigned int getRawCount() const;
180 
185  gsoap_eml2_1::prodml2__DasDimensions getRawDataSlowestDimension(const unsigned int & rawIndex) const;
186 
191  gsoap_eml2_1::prodml2__DasDimensions getRawDataFastestDimension(const unsigned int & rawIndex) const;
192 
193  std::string getRawDataUnit(const unsigned int & rawIndex) const;
194  LONG64 getStartLocusIndex(const unsigned int & rawIndex) const;
195  ULONG64 getNumberOfLoci(const unsigned int & rawIndex) const;
196  ULONG64 getRawDataTimeCount(const unsigned int & rawIndex) const;
197 
201  resqml2::AbstractValuesProperty::hdfDatatypeEnum getRawDataHdfDatatype(const unsigned int & rawIndex) const;
202 
208  void getRawDataAsDoubleValues(const unsigned int & rawIndex, double * values);
209 
215  void getRawDataAsFloatValues(const unsigned int & rawIndex, float * values);
216 
222  void getRawDataAsLongValues(const unsigned int & rawIndex, LONG64 * values);
223 
229  void getRawDataAsIntValues(const unsigned int & rawIndex, int * values);
230 
236  void getRawDataAsShortValues(const unsigned int & rawIndex, short * values);
237 
243  void getRawDataAsCharValues(const unsigned int & rawIndex, char * values);
244 
249  void getRawDataTime(const unsigned int & rawIndex, LONG64 * values);
250 
251  common::AbstractHdfProxy* getHdfProxy() const;
252 
253  std::string getHdfProxyUuid() const;
254 
255  private:
256 
257  void initHdfAttributes();
258 
259  std::vector<epc::Relationship> getAllEpcRelationships() const;
263  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc) {}
264  };
265 }
Definition: DasInstrumentBox.h:40
Definition: EpcDocument.h:152
Definition: HdfProxy.h:40
virtual std::string getXmlTag() const
Definition: DasAcquisition.h:98
~DasAcquisition()
Definition: DasAcquisition.h:95
Definition: DasAcquisition.h:45
DasAcquisition()
Definition: DasAcquisition.h:61
Definition: AbstractObject.h:40
DasAcquisition(gsoap_eml2_1::_prodml2__DasAcquisition *fromGsoap)
Definition: DasAcquisition.h:90
Definition: EpcDocument.h:168
Definition: AbstractHdfProxy.h:43
Definition: FiberOpticalPath.h:40
Definition: AbstractHdfProxy.h:45