OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
productInfo.h
Go to the documentation of this file.
1 #ifndef PRODUCT_INFO_H
2 #define PRODUCT_INFO_H
3 
4 #include <stdint.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 /* default values for the product info structure */
11 
12 #define PRODUCT_DEFAULT_description "no description"
13 #define PRODUCT_DEFAULT_units "unspecified"
14 #define PRODUCT_DEFAULT_palette "default"
15 #define PRODUCT_DEFAULT_paramDesignator "none"
16 #define PRODUCT_DEFAULT_paramWaveMin -1
17 #define PRODUCT_DEFAULT_paramWaveMax -1
18 #define PRODUCT_DEFAULT_standardName NULL
19 #define PRODUCT_DEFAULT_category "Miscellaneous"
20 #define PRODUCT_DEFAULT_dataType "float"
21 #define PRODUCT_DEFAULT_prefix NULL
22 #define PRODUCT_DEFAULT_suffix NULL
23 #define PRODUCT_DEFAULT_algorithmName ""
24 #define PRODUCT_DEFAULT_productName ""
25 #define PRODUCT_DEFAULT_cat_ix -1
26 #define PRODUCT_DEFAULT_prod_ix -1
27 #define PRODUCT_DEFAULT_rank 2
28 #define PRODUCT_DEFAULT_fillValue -32767
29 #define PRODUCT_DEFAULT_fillValue_byte -1
30 #define PRODUCT_DEFAULT_fillValue_ubyte 0xFF
31 #define PRODUCT_DEFAULT_fillValue_ushort 0xFFFF
32 #define PRODUCT_DEFAULT_fillValue_uint 0xFFFFFFFF
33 #define PRODUCT_DEFAULT_validMin 0
34 #define PRODUCT_DEFAULT_validMax 0
35 #define PRODUCT_DEFAULT_displayScale "linear"
36 #define PRODUCT_DEFAULT_displayMin 0
37 #define PRODUCT_DEFAULT_displayMax 0
38 #define PRODUCT_DEFAULT_scaleFactor 1
39 #define PRODUCT_DEFAULT_addOffset 0
40 #define PRODUCT_DEFAULT_reference NULL
41 #define PRODUCT_DEFAULT_comment NULL
42 #define PRODUCT_DEFAULT_titleFormat "no format string"
43 
47 typedef struct productInfo_str {
48  char *description;
49  char *units;
50  char *palette;
54  char *standardName;
55  char *category;
56  char *dataType;
57  char *prefix;
58  char *suffix;
59  char *algorithmName;
60  char *productName;
61  int cat_ix;
62  int prod_ix;
63  int rank;
64  double fillValue;
65  double validMin;
66  double validMax;
67  char *displayScale;
68  double displayMin;
69  double displayMax;
70  double scaleFactor;
71  double addOffset;
72  char *reference;
73  char *comment;
74  char *titleFormat;
75 } productInfo_t;
76 
77 
78 /*
79  * function prototypes
80  */
81 
82 void clearProductInfo(productInfo_t* info);
83 void initProductInfo(productInfo_t* info);
84 productInfo_t* allocateProductInfo();
85 void freeProductInfo(productInfo_t* info);
86 void copyProductInfo(productInfo_t* dest, const productInfo_t* src);
87 void getFirstProductInfo(productInfo_t* info);
88 int getNextProductInfo(productInfo_t* info);
89 int findProductInfo(const char* name, int sensorId, productInfo_t* info);
90 char* getProductNameFull(productInfo_t* info);
91 void printProductInfo(const char* productFullName, const productInfo_t* info);
92 const char* getDOI(const char* platform, const char* sensor, const char* level,
93  const char* suite, const char* version);
94 const char* getGCMDKeywords(const char* suite);
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif
double displayMax
Definition: productInfo.h:69
char * algorithmName
Definition: productInfo.h:59
double addOffset
Definition: productInfo.h:71
void copyProductInfo(productInfo_t *dest, const productInfo_t *src)
char * standardName
Definition: productInfo.h:54
void initProductInfo(productInfo_t *info)
double fillValue
Definition: productInfo.h:64
char * productName
Definition: productInfo.h:60
char * paramDesignator
Definition: productInfo.h:51
void freeProductInfo(productInfo_t *info)
int findProductInfo(const char *name, int sensorId, productInfo_t *info)
double displayMin
Definition: productInfo.h:68
char * description
Definition: productInfo.h:48
void clearProductInfo(productInfo_t *info)
Definition: productInfo.cpp:42
char * reference
Definition: productInfo.h:72
char * titleFormat
Definition: productInfo.h:74
const char * getDOI(const char *platform, const char *sensor, const char *level, const char *suite, const char *version)
Definition: getDOI.cpp:16
double scaleFactor
Definition: productInfo.h:70
level
Definition: mapgen.py:186
char * displayScale
Definition: productInfo.h:67
int getNextProductInfo(productInfo_t *info)
productInfo_t * allocateProductInfo()
const char * getGCMDKeywords(const char *suite)
void printProductInfo(const char *productFullName, const productInfo_t *info)
void getFirstProductInfo(productInfo_t *info)
char * getProductNameFull(productInfo_t *info)
version
Definition: setup.py:15