FileWriterCDFISTP.hh
2.84 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
/**
* 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 isTableParam = false);
bool writeTableParamsInfo(std::map<int, boost::shared_ptr<ParamTable>> &dependTables,std::string currentParamId);
bool writeAMDAInfo(std::string version, std::string createdby, std::string acknowledgement);
bool writeRequestInfo(std::string structure, std::string timeFormat,
int timeResolution, std::string outputParams, std::string ttName);
bool writeParamsInfo(ParamPropertiesList ¶mPropertiesList, OutputStructure outputStructure,
std::string currentParamId);
void addInfoInMap(std::string key, std::string value);
void writeParamVariableAttributes(ParamInfoSPtr ParamInfo, std::string paramId);
void writeTimeInfo();
protected:
//bool addCDFParameter(std::string outputId, AMDA::Common::ParameterIndexComponentList &indexList,
// FileDataType type, int dim1Size, int dim2Size, bool isTableParam);
//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:
std::vector<std::pair<std::string, std::string>> _infoMap;
};
} /* namespace FileWriter */
} /* namespace Download */
} /* namespace ParamOutputImpl */
} /* namespace AMDA */
#endif /* FILEWRITERCDFISTP_HH_ */