FileWriterCDFISTP.hh
3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/**
* FileWriterCDFISTP.hh
*
* Created on: 28 feb. 2022
* Author: AKKA
*/
#ifndef FILEWRITERCDFISTP_HH_
#define FILEWRITERCDFISTP_HH_
#include "FileWriterCDF.hh"
#include "ParamMgr.hh"
#include "DataSetMgr.hh"
#include "InstrumentMgr.hh"
#include "MissionMgr.hh"
#include "cdf.h"
#include <map>
#define NB_RECORDS_BUFFER 100000
namespace AMDA {
namespace ParamOutputImpl {
namespace Download {
namespace FileWriter {
using namespace AMDA::Info;
/**
* @class FileWriterCDFISTP
* @brief Implementation of FileWriter for CDF file format compliant with ISTP.
* @details
*/
class FileWriterCDFISTP : public FileWriterCDF
{
public:
/*
* @brief Constructor
*/
FileWriterCDFISTP(AMDA::Parameters::ParameterManager& pParameterManager);
/*
* @brief Destructor
*/
virtual ~FileWriterCDFISTP(void);
/*
* @overload FileWriter::addParameter - Add an output parameter in CDF file
*/
//virtual bool addParameter(ParamProperties *paramProp, AMDA::Common::ParameterIndexComponentList &indexList,
// FileDataType type, bool isFirstParam, int dim1Size = 1, int dim2Size = 1);
bool writeTableParamsInfo(std::vector<std::string> tableParams, int level){return true;}
bool writeAMDAInfo(std::string version, std::string createdby, std::string acknowledgement){return true;}
bool writeRequestInfo(std::string structure, std::string /* timeFormat */,
int timeResolution, std::string outputParams, std::string ttName)
{return true;}
bool writeParamsInfo(ParamPropertiesList ¶mPropertiesList, OutputStructure outputStructure,
std::string currentParamId)
{return true;}
bool writeTimeData(std::string /* paramId */, double data, OutputFormatTime /* timeFormat */, bool isFirstParam);
/*
* @overload FileWriter::getExtension - method to get file format extension
*/
virtual std::string getExtension(void);
protected:
//bool addCDFParameter(std::string outputId, AMDA::Common::ParameterIndexComponentList &indexList,
// FileDataType type, int dim1Size, int dim2Size);
//bool writeMissionInfo(MissionInfoSPtr missionInfo, long varNum);
/*
* @brief Write instrument info attributes in the CDF file
*/
//bool writeInstrumentInfo(InstrumentInfoSPtr instrumentInfo, long varNum);
/*
* @brief Write dataset info attributes in the CDF file
*/
//bool writeDatasetInfo(DataSetInfoSPtr datasetInfo, long varNum);
/*
* @brief Write parameter info attributes in the CDF file
*/
//bool writeParameterInfo(ParamInfoSPtr parameterInfo, long varNum);
private:
/*
* @brief CDF identifier
*/
CDFid _cdfid;
/*
* @brief Map of CDF var info
*/
std::map<std::string, ParamCDFVar> _cdfVarMap;
};
} /* namespace FileWriter */
} /* namespace Download */
} /* namespace ParamOutputImpl */
} /* namespace AMDA */
#endif /* FILEWRITERCDFISTP_HH_ */