Functions | |
int | grib_get_offset (grib_handle *h, const char *key, size_t *offset) |
Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned. | |
int | grib_get_size (grib_handle *h, const char *key, size_t *size) |
Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned. | |
int | grib_get_long (grib_handle *h, const char *key, long *value) |
Get a long value from a key, if several keys of the same name are present, the last one is returned. | |
int | grib_get_double (grib_handle *h, const char *key, double *value) |
Get a double value from a key, if several keys of the same name are present, the last one is returned. | |
int | grib_get_double_element (grib_handle *h, const char *key, int i, double *value) |
Get as double the i-th element of the "key" array. | |
int | grib_get_double_elements (grib_handle *h, const char *key, int *i, long size, double *value) |
Get as double array the elements of the "key" array whose indexes are listed in the input array i. | |
int | grib_get_string (grib_handle *h, const char *key, char *mesg, size_t *length) |
Get a string value from a key, if several keys of the same name are present, the last one is returned. | |
int | grib_get_bytes (grib_handle *h, const char *key, unsigned char *bytes, size_t *length) |
Get raw bytes values from a key. | |
int | grib_get_double_array (grib_handle *h, const char *key, double *vals, size_t *length) |
Get double array values from a key. | |
int | grib_get_long_array (grib_handle *h, const char *key, long *vals, size_t *length) |
Get long array values from a key. | |
int | grib_copy_namespace (grib_handle *dest, const char *name, grib_handle *src) |
Copy the keys belonging to a given namespace from a source handle to a destination handle. | |
int | grib_set_long (grib_handle *h, const char *key, long val) |
Set a long value from a key. | |
int | grib_set_double (grib_handle *h, const char *key, double val) |
Set a double value from a key. | |
int | grib_set_string (grib_handle *h, const char *key, const char *mesg, size_t *length) |
Set a string value from a key. | |
int | grib_set_bytes (grib_handle *h, const char *key, const unsigned char *bytes, size_t *length) |
Set a bytes array from a key. | |
int | grib_set_double_array (grib_handle *h, const char *key, const double *vals, size_t length) |
Set a double array from a key. | |
int | grib_set_long_array (grib_handle *h, const char *key, const long *vals, size_t length) |
Set a long array from a key. |
int grib_copy_namespace | ( | grib_handle * | dest, | |
const char * | name, | |||
grib_handle * | src | |||
) |
Copy the keys belonging to a given namespace from a source handle to a destination handle.
dest | : destination handle | |
name | : namespace | |
src | : source handle |
int grib_get_bytes | ( | grib_handle * | h, | |
const char * | key, | |||
unsigned char * | bytes, | |||
size_t * | length | |||
) |
Get raw bytes values from a key.
If several keys of the same name are present, the last one is returned
h | : the handle to get the data from | |
key | : the key to be searched | |
bytes | : the address of a byte array where the data will be retreived | |
length | : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output |
int grib_get_double | ( | grib_handle * | h, | |
const char * | key, | |||
double * | value | |||
) |
Get a double value from a key, if several keys of the same name are present, the last one is returned.
h | : the handle to get the data from | |
key | : the key to be searched | |
value | : the address of a double where the data will be retreived |
int grib_get_double_array | ( | grib_handle * | h, | |
const char * | key, | |||
double * | vals, | |||
size_t * | length | |||
) |
Get double array values from a key.
If several keys of the same name are present, the last one is returned
h | : the handle to get the data from | |
key | : the key to be searched | |
vals | : the address of a double array where the data will be retreived | |
length | : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output |
int grib_get_double_element | ( | grib_handle * | h, | |
const char * | key, | |||
int | i, | |||
double * | value | |||
) |
Get as double the i-th element of the "key" array.
h | : the handle to get the data from | |
key | : the key to be searched | |
i | : zero based index | |
value | : the address of a double where the data will be retreived |
int grib_get_double_elements | ( | grib_handle * | h, | |
const char * | key, | |||
int * | i, | |||
long | size, | |||
double * | value | |||
) |
Get as double array the elements of the "key" array whose indexes are listed in the input array i.
h | : the handle to get the data from | |
key | : the key to be searched | |
i | : zero based array of indexes | |
size | : size of the i and value arrays | |
value | : the address of a double where the data will be retreived |
int grib_get_long | ( | grib_handle * | h, | |
const char * | key, | |||
long * | value | |||
) |
Get a long value from a key, if several keys of the same name are present, the last one is returned.
h | : the handle to get the data from | |
key | : the key to be searched | |
value | : the address of a long where the data will be retreived |
int grib_get_long_array | ( | grib_handle * | h, | |
const char * | key, | |||
long * | vals, | |||
size_t * | length | |||
) |
Get long array values from a key.
If several keys of the same name are present, the last one is returned
h | : the handle to get the data from | |
key | : the key to be searched | |
vals | : the address of a long array where the data will be retreived | |
length | : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output |
int grib_get_offset | ( | grib_handle * | h, | |
const char * | key, | |||
size_t * | offset | |||
) |
Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned.
h | : the handle to get the offset from | |
key | : the key to be searched | |
offset | : the address of a size_t where the offset will be set |
int grib_get_size | ( | grib_handle * | h, | |
const char * | key, | |||
size_t * | size | |||
) |
Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned.
h | : the handle to get the offset from | |
key | : the key to be searched | |
size | : the address of a size_t where the size will be set |
int grib_get_string | ( | grib_handle * | h, | |
const char * | key, | |||
char * | mesg, | |||
size_t * | length | |||
) |
Get a string value from a key, if several keys of the same name are present, the last one is returned.
h | : the handle to get the data from | |
key | : the key to be searched | |
mesg | : the address of a string where the data will be retreived | |
length | : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output |
int grib_set_bytes | ( | grib_handle * | h, | |
const char * | key, | |||
const unsigned char * | bytes, | |||
size_t * | length | |||
) |
Set a bytes array from a key.
If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
bytes | : the address of a byte array where the data will be read | |
length | : the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output |
int grib_set_double | ( | grib_handle * | h, | |
const char * | key, | |||
double | val | |||
) |
Set a double value from a key.
If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
val | : a double where the data will be read |
int grib_set_double_array | ( | grib_handle * | h, | |
const char * | key, | |||
const double * | vals, | |||
size_t | length | |||
) |
Set a double array from a key.
If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
vals | : the address of a double array where the data will be read | |
length | : a size_t that contains the length of the byte array on input |
int grib_set_long | ( | grib_handle * | h, | |
const char * | key, | |||
long | val | |||
) |
Set a long value from a key.
If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
val | : a long where the data will be read |
int grib_set_long_array | ( | grib_handle * | h, | |
const char * | key, | |||
const long * | vals, | |||
size_t | length | |||
) |
Set a long array from a key.
If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
vals | : the address of a long array where the data will be read | |
length | : a size_t that contains the length of the long array on input |
int grib_set_string | ( | grib_handle * | h, | |
const char * | key, | |||
const char * | mesg, | |||
size_t * | length | |||
) |
Set a string value from a key.
If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
mesg | : the address of a string where the data will be read | |
length | : the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output |