OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
nccmp_user_type.h
Go to the documentation of this file.
1 /*
2  * nccmp_user_type.h
3  *
4  * Created on: Sep 27, 2016
5  * Author: rhealy
6  */
7 
8 #ifndef SRC_NCCMP_NCCMP_USER_TYPE_H_
9 #define SRC_NCCMP_NCCMP_USER_TYPE_H_
10 #include <stdint.h>
11 #define NCCMP_MAX_COMPOUND_FIELD_DIMS 4
12 
13 typedef struct nccmp_user_type_t {
14  nc_type base_type; /* Used by vlen and enum types for their primitive type. */
16  char field_index; /* Relative to parent compound. */
17  int group_id; /* Group that defined the type. */
18  int id; /* Unique instance id of a type in tree defined by nccmp. */
19  char name[NC_MAX_NAME]; /* Base name like "myField". */
20  int num_dims;
21  size_t num_fields; /* Number of of fields in the compound type. */
22  size_t offset; /* Byte offset within a compound. */
24  size_t root_size; /* Total outermost root compound size. */
25  size_t size; /* Number of bytes. */
26  char *tree_name; /* Dotted name from root to child, like "myVar.myField1.myChild2". */
27  nc_type type_id; /* Defined by file metadata. */
28  nc_type user_class; /* Class like NC_BYTE or NC_COMPOUND. */
30 
31 
32 #endif /* SRC_NCCMP_NCCMP_USER_TYPE_H_ */
int dim_sizes[NCCMP_MAX_COMPOUND_FIELD_DIMS]
char name[NC_MAX_NAME]
struct nccmp_user_type_t * fields
#define NCCMP_MAX_COMPOUND_FIELD_DIMS