Blame view

src/ParamOutputImpl/Download/FileWriterCDFISTP.hh 2.84 KB
9e1bbe22   Benjamin Renard   Skeleton to imple...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * 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"
9e1bbe22   Benjamin Renard   Skeleton to imple...
16
#include "cdf.h"
9e1bbe22   Benjamin Renard   Skeleton to imple...
17
18
19
20
21
#include <map>

#define NB_RECORDS_BUFFER 100000

namespace AMDA {
993426a6   Erdogan Furkan   TIME2000 included
22
23
24
	namespace ParamOutputImpl {
		namespace Download {
			namespace FileWriter {
9e1bbe22   Benjamin Renard   Skeleton to imple...
25

993426a6   Erdogan Furkan   TIME2000 included
26
				using namespace AMDA::Info;
9e1bbe22   Benjamin Renard   Skeleton to imple...
27

993426a6   Erdogan Furkan   TIME2000 included
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
				/**
				 * @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,
5291eadc   Erdogan Furkan   For now - Ca avance
51
					//						  FileDataType type, bool isFirstParam, int dim1Size = 1, int dim2Size = 1, bool isTableParam = false);
993426a6   Erdogan Furkan   TIME2000 included
52
53


5a693c10   Erdogan Furkan   For now
54
					bool writeTableParamsInfo(std::map<int, boost::shared_ptr<ParamTable>> &dependTables,std::string currentParamId);
c2e1eb0f   Erdogan Furkan   More compliant now
55
56
57
58
					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);

993426a6   Erdogan Furkan   TIME2000 included
59
					bool writeParamsInfo(ParamPropertiesList &paramPropertiesList, OutputStructure outputStructure,
5a693c10   Erdogan Furkan   For now
60
													std::string currentParamId);
993426a6   Erdogan Furkan   TIME2000 included
61

5a693c10   Erdogan Furkan   For now
62
					void addInfoInMap(std::string key, std::string value);
993426a6   Erdogan Furkan   TIME2000 included
63

5291eadc   Erdogan Furkan   For now - Ca avance
64
					void writeParamVariableAttributes(ParamInfoSPtr ParamInfo, std::string paramId);
993426a6   Erdogan Furkan   TIME2000 included
65

c2e1eb0f   Erdogan Furkan   More compliant now
66
67
					void writeTimeInfo();

993426a6   Erdogan Furkan   TIME2000 included
68
69
70
				protected:

					//bool addCDFParameter(std::string outputId, AMDA::Common::ParameterIndexComponentList &indexList,
5291eadc   Erdogan Furkan   For now - Ca avance
71
					//					 FileDataType type, int dim1Size, int dim2Size, bool isTableParam);
993426a6   Erdogan Furkan   TIME2000 included
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
					
					//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:
5a693c10   Erdogan Furkan   For now
91
					std::vector<std::pair<std::string, std::string>> _infoMap;
993426a6   Erdogan Furkan   TIME2000 included
92
93
94
95
96
				};

			} /* namespace FileWriter */
		} /* namespace Download */
	} /* namespace ParamOutputImpl */
9e1bbe22   Benjamin Renard   Skeleton to imple...
97
98
99
} /* namespace AMDA */

#endif /* FILEWRITERCDFISTP_HH_ */