Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
DasAcquisition.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "prodml2_0/AbstractObject.h"
22 #include "resqml2/AbstractValuesProperty.h"
23 
24 namespace COMMON_NS {
25  class HdfProxy;
26 }
27 
28 namespace PRODML2_0_NS
29 {
30  class DLL_IMPORT_OR_EXPORT DasAcquisition : public PRODML2_0_NS::AbstractObject
31  {
32  private:
36  gsoap_eml2_1::prodml2__DasRaw* pushBackRawXmlOnly(const std::string & uuid, const std::string & rawDataUnit, const ULONG64 & startLocusIndex, const ULONG64 & numberOfLoci, const std::string & rawDescription,
37  const std::string & startTime, const std::string endTime, const ULONG64 & timeCount,
38  gsoap_eml2_1::prodml2__DasDimensions slowestHdfDimension, gsoap_eml2_1::prodml2__DasDimensions fastestHdfDimension,
39  bool datatypeIsInteger,
41 
42  public:
47 
54  DasAcquisition(class FiberOpticalPath* fiberOpticalPath, class DasInstrumentBox* dasInstrumentBox,
55  const std::string & guid, const std::string & title,
56  const std::string & jobUuid, const std::string & facilityId, const std::string & vendorName,
57  const double & pulseRate, const gsoap_eml2_1::eml21__FrequencyUom & pulseRateUom,
58  const double & pulseWidth, const gsoap_eml2_1::eml21__TimeUom & pulseWidthUom,
59  const double & gaugeLength, const gsoap_eml2_1::eml21__LengthUom & gaugeLengthUom,
60  const double & spatialSamplingInterval, const gsoap_eml2_1::eml21__LengthUom & spatialSamplingIntervalUom,
61  const double & minimumFrequency, const gsoap_eml2_1::eml21__FrequencyUom & minimumFrequencyUom,
62  const double & maximumFrequency, const gsoap_eml2_1::eml21__FrequencyUom & maximumFrequencyUom,
63  const ULONG64 & lociCount, const ULONG64 & startLocusIndex,
64  const std::string & measurementStartIsoTime, bool triggeredMeasurement);
65 
69  DasAcquisition(class FiberOpticalPath* fiberOpticalPath, class DasInstrumentBox* dasInstrumentBox,
70  PRODML2_0_NS::HdfProxy * proxy);
71 
75  DasAcquisition(gsoap_eml2_1::_prodml2__DasAcquisition* fromGsoap) : AbstractObject(fromGsoap) {}
76 
81 
82  static const char* XML_TAG;
83  virtual std::string getXmlTag() const {return XML_TAG;}
84 
85  void setHdfProxy(COMMON_NS::AbstractHdfProxy * proxy);
86 
87  gsoap_eml2_1::eml21__DataObjectReference* getFiberOpticalPathDor() const;
88  class FiberOpticalPath* getFiberOpticalPath() const;
89 
90  void setFiberOpticalPath(class FiberOpticalPath* fiberOpticalPath);
91 
92  gsoap_eml2_1::eml21__DataObjectReference* getDasInstrumentBoxDor() const;
93  class DasInstrumentBox* getDasInstrumentBox() const;
94 
95  void setDasInstrumentBox(class DasInstrumentBox* dasInstrumentBox);
96 
97  std::string getJobUuid() const;
98  std::string getFacilityUuid() const; // only the first one for now
99  std::string getVendorName() const;
100 
101  double getPulseRate() const;
102  gsoap_eml2_1::eml21__FrequencyUom getPulseRateUom() const;
103 
104  double getPulseWidth() const;
105  gsoap_eml2_1::eml21__TimeUom getPulseWidthUom() const;
106 
107  double getGaugeLength() const;
108  gsoap_eml2_1::eml21__LengthUom getGaugeLengthUom() const;
109 
110  double getSpatialSamplingInterval() const;
111  gsoap_eml2_1::eml21__LengthUom getSpatialSamplingIntervalUom() const;
112 
113  double getMinimumFrequency() const;
114  gsoap_eml2_1::eml21__FrequencyUom getMinimumFrequencyUom() const;
115 
116  double getMaximumFrequency() const;
117  gsoap_eml2_1::eml21__FrequencyUom getMaximumFrequencyUom() const;
118 
119  ULONG64 getLociCount() const;
120  LONG64 getStartLocusIndex() const;
121 
122  std::string getMeasurementStartIsoTime() const;
123 
124  bool isTriggeredMeasurement() const;
125 
137  void pushBackRaw(const std::string & guid, bool datatypeIsInteger, const char & datatypeByteCount, const std::string & rawDataUnit, LONG64* timeArray, const ULONG64 & timeCount, COMMON_NS::AbstractHdfProxy* proxy);
138 
142  void writeIntoDataset(float * data,
143  unsigned long numSampleForAllLoci,
144  unsigned long timeStepIndex);
145  void writeIntoDataset(double * data,
146  unsigned long numSampleForAllLoci,
147  unsigned long timeStepIndex);
148  void writeIntoDataset(LONG64 * data,
149  unsigned long numSampleForAllLoci,
150  unsigned long timeStepIndex);
151  void writeIntoDataset(int * data,
152  unsigned long numSampleForAllLoci,
153  unsigned long timeStepIndex);
154  void writeIntoDataset(short * data,
155  unsigned long numSampleForAllLoci,
156  unsigned long timeStepIndex);
157  void writeIntoDataset(char * data,
158  unsigned long numSampleForAllLoci,
159  unsigned long timeStepIndex);
160 
164  unsigned int getRawCount() const;
165 
170  gsoap_eml2_1::prodml2__DasDimensions getRawDataSlowestDimension(const unsigned int & rawIndex) const;
171 
176  gsoap_eml2_1::prodml2__DasDimensions getRawDataFastestDimension(const unsigned int & rawIndex) const;
177 
178  std::string getRawDataUnit(const unsigned int & rawIndex) const;
179  LONG64 getStartLocusIndex(const unsigned int & rawIndex) const;
180  ULONG64 getNumberOfLoci(const unsigned int & rawIndex) const;
181  ULONG64 getRawDataTimeCount(const unsigned int & rawIndex) const;
182 
186  RESQML2_NS::AbstractValuesProperty::hdfDatatypeEnum getRawDataHdfDatatype(const unsigned int & rawIndex) const;
187 
193  void getRawDataAsDoubleValues(const unsigned int & rawIndex, double * values);
194 
200  void getRawDataAsFloatValues(const unsigned int & rawIndex, float * values);
201 
207  void getRawDataAsLongValues(const unsigned int & rawIndex, LONG64 * values);
208 
214  void getRawDataAsIntValues(const unsigned int & rawIndex, int * values);
215 
221  void getRawDataAsShortValues(const unsigned int & rawIndex, short * values);
222 
228  void getRawDataAsCharValues(const unsigned int & rawIndex, char * values);
229 
234  void getRawDataTime(const unsigned int & rawIndex, LONG64 * values);
235 
236  COMMON_NS::AbstractHdfProxy* getHdfProxy() const;
237 
238  std::string getHdfProxyUuid() const;
239 
240  private:
241 
242  void initHdfAttributes();
243 
244  std::vector<epc::Relationship> getAllEpcRelationships() const;
248  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc) {}
249  };
250 }
251 
Definition: FiberOpticalPath.h:25
virtual std::string getXmlTag() const
Definition: DasAcquisition.h:83
~DasAcquisition()
Definition: DasAcquisition.h:80
DasAcquisition()
Definition: DasAcquisition.h:46
Definition: DasAcquisition.h:30
DasAcquisition(gsoap_eml2_1::_prodml2__DasAcquisition *fromGsoap)
Definition: DasAcquisition.h:75
Definition: EpcDocument.h:138
Definition: EpcDocument.h:154
Definition: AbstractHdfProxy.h:30
Definition: AbstractObject.h:25
Definition: HdfProxy.h:25
Definition: AbstractHdfProxy.h:28
Definition: DasInstrumentBox.h:25