ecCodes/ECC-1: C interface macros changed

This commit is contained in:
Shahram Najm 2014-12-22 16:16:52 +00:00
parent 8e2b816c5b
commit 8c4d78e8f5
1 changed files with 83 additions and 107 deletions

View File

@ -26,6 +26,13 @@ extern "C" {
#define CODES_VERSION GRIB_API_VERSION
/* sections */
#define CODES_SECTION_PRODUCT GRIB_SECTION_PRODUCT
#define CODES_SECTION_GRID GRIB_SECTION_GRID
#define CODES_SECTION_LOCAL GRIB_SECTION_LOCAL
#define CODES_SECTION_DATA GRIB_SECTION_DATA
#define CODES_SECTION_BITMAP GRIB_SECTION_BITMAP
/* LOG MODES
Log mode for information for processing information
*/
@ -69,46 +76,13 @@ Log mode for information for processing information
#define CODES_NEAREST_SAME_DATA GRIB_NEAREST_SAME_DATA
#define CODES_NEAREST_SAME_POINT GRIB_NEAREST_SAME_POINT
/*! Iteration is carried out on all the keys available in the message
\ingroup keys_iterator
\see codes_keys_iterator_new
*/
#define CODES_KEYS_ITERATOR_ALL_KEYS GRIB_KEYS_ITERATOR_ALL_KEYS
/*! read only keys are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new
*/
#define CODES_KEYS_ITERATOR_ALL_KEYS GRIB_KEYS_ITERATOR_ALL_KEYS
#define CODES_KEYS_ITERATOR_SKIP_READ_ONLY GRIB_KEYS_ITERATOR_SKIP_READ_ONLY
/*! optional keys are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new */
#define CODES_KEYS_ITERATOR_SKIP_OPTIONAL GRIB_KEYS_ITERATOR_SKIP_OPTIONAL
/*! edition specific keys are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new */
#define CODES_KEYS_ITERATOR_SKIP_OPTIONAL GRIB_KEYS_ITERATOR_SKIP_OPTIONAL
#define CODES_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC GRIB_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC
/*! coded keys are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new */
#define CODES_KEYS_ITERATOR_SKIP_CODED GRIB_KEYS_ITERATOR_SKIP_CODED
/*! computed keys are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new */
#define CODES_KEYS_ITERATOR_SKIP_COMPUTED GRIB_KEYS_ITERATOR_SKIP_COMPUTED
/*! duplicates of a key are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new */
#define CODES_KEYS_ITERATOR_SKIP_DUPLICATES GRIB_KEYS_ITERATOR_SKIP_DUPLICATES
/*! function keys are skipped by keys iterator.
\ingroup keys_iterator
\see codes_keys_iterator_new */
#define CODES_KEYS_ITERATOR_SKIP_CODED GRIB_KEYS_ITERATOR_SKIP_CODED
#define CODES_KEYS_ITERATOR_SKIP_COMPUTED GRIB_KEYS_ITERATOR_SKIP_COMPUTED
#define CODES_KEYS_ITERATOR_SKIP_DUPLICATES GRIB_KEYS_ITERATOR_SKIP_DUPLICATES
#define CODES_KEYS_ITERATOR_SKIP_FUNCTION GRIB_KEYS_ITERATOR_SKIP_FUNCTION
@ -1068,12 +1042,12 @@ int codes_points_get_values(grib_handle* h, grib_points* points, double* val);
grib_handle *codes_util_set_spec(grib_handle *h,
const grib_util_grid_spec *grid_spec,
const grib_util_packing_spec *packing_spec, /* NULL for defaults (same as input) */
int flags,
const double *data_values,
size_t data_values_count,
int *err);
const grib_util_grid_spec *grid_spec,
const grib_util_packing_spec *packing_spec, /* NULL for defaults (same as input) */
int flags,
const double *data_values,
size_t data_values_count,
int *err);
/* --------------------------------------- */
@ -1084,133 +1058,135 @@ grib_handle *codes_util_set_spec(grib_handle *h,
#endif
#endif
/* This part is automatically generated by ./errors.pl, do not edit */
#ifndef grib_errors_H
#define grib_errors_H
#ifndef eccodes_errors_H
#define eccodes_errors_H
/*! \defgroup errors Error codes
Error codes returned by the grib_api functions.
*/
/*! @{*/
/** No error */
#define GRIB_SUCCESS 0
#define CODES_SUCCESS GRIB_SUCCESS
/** End of resource reached */
#define GRIB_END_OF_FILE -1
#define CODES_END_OF_FILE GRIB_END_OF_FILE
/** Internal error */
#define GRIB_INTERNAL_ERROR -2
#define CODES_INTERNAL_ERROR GRIB_INTERNAL_ERROR
/** Passed buffer is too small */
#define GRIB_BUFFER_TOO_SMALL -3
#define CODES_BUFFER_TOO_SMALL GRIB_BUFFER_TOO_SMALL
/** Function not yet implemented */
#define GRIB_NOT_IMPLEMENTED -4
#define CODES_NOT_IMPLEMENTED GRIB_NOT_IMPLEMENTED
/** Missing 7777 at end of message */
#define GRIB_7777_NOT_FOUND -5
#define CODES_7777_NOT_FOUND GRIB_7777_NOT_FOUND
/** Passed array is too small */
#define GRIB_ARRAY_TOO_SMALL -6
#define CODES_ARRAY_TOO_SMALL GRIB_ARRAY_TOO_SMALL
/** File not found */
#define GRIB_FILE_NOT_FOUND -7
#define CODES_FILE_NOT_FOUND GRIB_FILE_NOT_FOUND
/** Code not found in code table */
#define GRIB_CODE_NOT_FOUND_IN_TABLE -8
#define CODES_CODE_NOT_FOUND_IN_TABLE GRIB_CODE_NOT_FOUND_IN_TABLE
/** Array size mismatch */
#define GRIB_WRONG_ARRAY_SIZE -9
#define CODES_WRONG_ARRAY_SIZE GRIB_WRONG_ARRAY_SIZE
/** Key/value not found */
#define GRIB_NOT_FOUND -10
#define CODES_NOT_FOUND GRIB_NOT_FOUND
/** Input output problem */
#define GRIB_IO_PROBLEM -11
#define CODES_IO_PROBLEM GRIB_IO_PROBLEM
/** Message invalid */
#define GRIB_INVALID_MESSAGE -12
#define CODES_INVALID_MESSAGE GRIB_INVALID_MESSAGE
/** Decoding invalid */
#define GRIB_DECODING_ERROR -13
#define CODES_DECODING_ERROR GRIB_DECODING_ERROR
/** Encoding invalid */
#define GRIB_ENCODING_ERROR -14
#define CODES_ENCODING_ERROR GRIB_ENCODING_ERROR
/** Code cannot unpack because of string too small */
#define GRIB_NO_MORE_IN_SET -15
#define CODES_NO_MORE_IN_SET GRIB_NO_MORE_IN_SET
/** Problem with calculation of geographic attributes */
#define GRIB_GEOCALCULUS_PROBLEM -16
#define CODES_GEOCALCULUS_PROBLEM GRIB_GEOCALCULUS_PROBLEM
/** Out of memory */
#define GRIB_OUT_OF_MEMORY -17
#define CODES_OUT_OF_MEMORY GRIB_OUT_OF_MEMORY
/** Value is read only */
#define GRIB_READ_ONLY -18
#define CODES_READ_ONLY GRIB_READ_ONLY
/** Invalid argument */
#define GRIB_INVALID_ARGUMENT -19
#define CODES_INVALID_ARGUMENT GRIB_INVALID_ARGUMENT
/** Null handle */
#define GRIB_NULL_HANDLE -20
#define CODES_NULL_HANDLE GRIB_NULL_HANDLE
/** Invalid section number */
#define GRIB_INVALID_SECTION_NUMBER -21
#define CODES_INVALID_SECTION_NUMBER GRIB_INVALID_SECTION_NUMBER
/** Value cannot be missing */
#define GRIB_VALUE_CANNOT_BE_MISSING -22
#define CODES_VALUE_CANNOT_BE_MISSING GRIB_VALUE_CANNOT_BE_MISSING
/** Wrong message length */
#define GRIB_WRONG_LENGTH -23
#define CODES_WRONG_LENGTH GRIB_WRONG_LENGTH
/** Invalid key type */
#define GRIB_INVALID_TYPE -24
#define CODES_INVALID_TYPE GRIB_INVALID_TYPE
/** Unable to set step */
#define GRIB_WRONG_STEP -25
#define CODES_WRONG_STEP GRIB_WRONG_STEP
/** Wrong units for step (step must be integer) */
#define GRIB_WRONG_STEP_UNIT -26
#define CODES_WRONG_STEP_UNIT GRIB_WRONG_STEP_UNIT
/** Invalid file id */
#define GRIB_INVALID_FILE -27
#define CODES_INVALID_FILE GRIB_INVALID_FILE
/** Invalid grib id */
#define GRIB_INVALID_GRIB -28
#define CODES_INVALID_GRIB GRIB_INVALID_GRIB
/** Invalid index id */
#define GRIB_INVALID_INDEX -29
#define CODES_INVALID_INDEX GRIB_INVALID_INDEX
/** Invalid iterator id */
#define GRIB_INVALID_ITERATOR -30
#define CODES_INVALID_ITERATOR GRIB_INVALID_ITERATOR
/** Invalid keys iterator id */
#define GRIB_INVALID_KEYS_ITERATOR -31
#define CODES_INVALID_KEYS_ITERATOR GRIB_INVALID_KEYS_ITERATOR
/** Invalid nearest id */
#define GRIB_INVALID_NEAREST -32
#define CODES_INVALID_NEAREST GRIB_INVALID_NEAREST
/** Invalid order by */
#define GRIB_INVALID_ORDERBY -33
#define CODES_INVALID_ORDERBY GRIB_INVALID_ORDERBY
/** Missing a key from the fieldset */
#define GRIB_MISSING_KEY -34
#define CODES_MISSING_KEY GRIB_MISSING_KEY
/** The point is out of the grid area */
#define GRIB_OUT_OF_AREA -35
#define CODES_OUT_OF_AREA GRIB_OUT_OF_AREA
/** Concept no match */
#define GRIB_CONCEPT_NO_MATCH -36
#define CODES_CONCEPT_NO_MATCH GRIB_CONCEPT_NO_MATCH
/** Hash array no match */
#define GRIB_HASH_ARRAY_NO_MATCH -37
#define CODES_HASH_ARRAY_NO_MATCH GRIB_HASH_ARRAY_NO_MATCH
/** Definitions files not found */
#define GRIB_NO_DEFINITIONS -38
#define CODES_NO_DEFINITIONS GRIB_NO_DEFINITIONS
/** Wrong type while packing */
#define GRIB_WRONG_TYPE -39
#define CODES_WRONG_TYPE GRIB_WRONG_TYPE
/** End of resource */
#define GRIB_END -40
#define CODES_END GRIB_END
/** Unable to code a field without values */
#define GRIB_NO_VALUES -41
#define CODES_NO_VALUES GRIB_NO_VALUES
/** Grid description is wrong or inconsistent */
#define GRIB_WRONG_GRID -42
#define CODES_WRONG_GRID GRIB_WRONG_GRID
/** End of index reached */
#define GRIB_END_OF_INDEX -43
#define CODES_END_OF_INDEX GRIB_END_OF_INDEX
/** Null index */
#define GRIB_NULL_INDEX -44
#define CODES_NULL_INDEX GRIB_NULL_INDEX
/** End of resource reached when reading message */
#define GRIB_PREMATURE_END_OF_FILE -45
#define CODES_PREMATURE_END_OF_FILE GRIB_PREMATURE_END_OF_FILE
/** An internal array is too small */
#define GRIB_INTERNAL_ARRAY_TOO_SMALL -46
#define CODES_INTERNAL_ARRAY_TOO_SMALL GRIB_INTERNAL_ARRAY_TOO_SMALL
/** Message is too large for the current architecture */
#define GRIB_MESSAGE_TOO_LARGE -47
#define CODES_MESSAGE_TOO_LARGE GRIB_MESSAGE_TOO_LARGE
/** Constant field */
#define GRIB_CONSTANT_FIELD -48
#define CODES_CONSTANT_FIELD GRIB_CONSTANT_FIELD
/** Switch unable to find a matching case */
#define GRIB_SWITCH_NO_MATCH -49
#define CODES_SWITCH_NO_MATCH GRIB_SWITCH_NO_MATCH
/** Underflow */
#define GRIB_UNDERFLOW -50
#define CODES_UNDERFLOW GRIB_UNDERFLOW
/** Message malformed */
#define GRIB_MESSAGE_MALFORMED -51
#define CODES_MESSAGE_MALFORMED GRIB_MESSAGE_MALFORMED
/** Index is corrupted */
#define GRIB_CORRUPTED_INDEX -52
#define CODES_CORRUPTED_INDEX GRIB_CORRUPTED_INDEX
/** Invalid number of bits per value */
#define GRIB_INVALID_BPV -53
#define CODES_INVALID_BPV GRIB_INVALID_BPV
/** Edition of two messages is different */
#define GRIB_DIFFERENT_EDITION -54
#define CODES_DIFFERENT_EDITION GRIB_DIFFERENT_EDITION
/** Value is different */
#define GRIB_VALUE_DIFFERENT -55
#define CODES_VALUE_DIFFERENT GRIB_VALUE_DIFFERENT
/** Invalid key value */
#define GRIB_INVALID_KEY_VALUE -56
#define CODES_INVALID_KEY_VALUE GRIB_INVALID_KEY_VALUE
/** String is smaller than requested */
#define GRIB_STRING_TOO_SMALL -57
#define CODES_STRING_TOO_SMALL GRIB_STRING_TOO_SMALL
/** Wrong type conversion */
#define GRIB_WRONG_CONVERSION -58
#define CODES_WRONG_CONVERSION GRIB_WRONG_CONVERSION
/** Missing BUFR table entry for descriptor */
#define GRIB_MISSING_BUFR_ENTRY -59
#define CODES_MISSING_BUFR_ENTRY GRIB_MISSING_BUFR_ENTRY
/** Null pointer */
#define GRIB_NULL_POINTER -60
#define CODES_NULL_POINTER GRIB_NULL_POINTER
/*! @}*/
#endif