RAVE
|
Utilities when working with ODIM H5 files. More...
#include <lazy_nodelist_reader.h>
#include "rave_field.h"
#include "rave_object.h"
#include "rave_types.h"
#include "raveobject_list.h"
#include "raveobject_hashtable.h"
#include "hlhdf.h"
#include <stdarg.h>
#include "rave_legend.h"
Go to the source code of this file.
Classes | |
struct | OdimIoUtilityArg |
Struct that can be used when passing around objects and associated nodelist between the writing and loading functions. More... | |
Typedefs | |
typedef struct OdimIoUtilityArg | OdimIoUtilityArg |
Struct that can be used when passing around objects and associated nodelist between the writing and loading functions. | |
Functions | |
int | OdimIoUtilities_convertGainOffsetFromInternalRave (const char *quantity, RaveIO_ODIM_Version version, double *gain, double *offset) |
Converts the gain and offset so that quantity is adjusted for ODIM version to be written. | |
int | OdimIoUtilities_convertGainOffsetToInternalRave (const char *quantity, RaveIO_ODIM_Version version, double *gain, double *offset) |
Converts the gain and offset so that quantity is adjusted for the internally used quantity. | |
int | OdimIoUtilities_addRaveField (RaveField_t *field, HL_NodeList *nodelist, RaveIO_ODIM_Version outversion, const char *fmt,...) |
Adds a rave field to a nodelist. | |
int | OdimIoUtilities_addQualityFields (RaveObjectList_t *fields, HL_NodeList *nodelist, RaveIO_ODIM_Version outversion, const char *fmt,...) |
Adds a list of quality fields (RaveField_t) to a nodelist. | |
RaveField_t * | OdimIoUtilities_loadField (LazyNodeListReader_t *lazyReader, RaveIO_ODIM_Version version, const char *fmt,...) |
Loads a rave field. | |
RaveLegend_t * | OdimIOUtilities_loadLegend (LazyNodeListReader_t *lazyReader, RaveIO_ODIM_Version version, const char *fmt,...) |
Loads a rave legend. | |
int | OdimIoUtilities_getIdFromSource (const char *source, const char *id, char *buf, size_t buflen) |
Gets the specified id from the source string, for example. | |
int | OdimIoUtilities_getNodOrCmtFromSource (const char *source, char *buf, size_t buflen) |
Like OdimIoUtilities_getIdFromSource but will first check NOD: and then CMT: | |
int | OdimIoUtilities_createLegend (RaveLegend_t *legend, HL_NodeList *nodelist, RaveIO_ODIM_Version version, const char *fmt,...) |
Adds a legend (RaveLegend_t) to a nodelist. | |
Utilities when working with ODIM H5 files.
typedef struct OdimIoUtilityArg OdimIoUtilityArg |
Struct that can be used when passing around objects and associated nodelist between the writing and loading functions.
int OdimIoUtilities_addQualityFields | ( | RaveObjectList_t * | fields, |
HL_NodeList * | nodelist, | ||
RaveIO_ODIM_Version | version, | ||
const char * | fmt, | ||
... ) |
Adds a list of quality fields (RaveField_t) to a nodelist.
[in] | fields | - the list of fields |
[in] | nodelist | - the hlhdf node list |
[in] | outversion | - the version of file to be written |
[in] | fmt | - the varargs format string |
[in] | ... | - the varargs |
[in] | fields | - the list of fields |
[in] | nodelist | - the hlhdf node list |
[in] | fmt | - the varargs format string |
[in] | ... | - the varargs |
int OdimIoUtilities_addRaveField | ( | RaveField_t * | field, |
HL_NodeList * | nodelist, | ||
RaveIO_ODIM_Version | outversion, | ||
const char * | fmt, | ||
... ) |
Adds a rave field to a nodelist.
[in] | field | - the field |
[in] | nodelist | - the hlhdf node list |
[in] | outversion | - the version of file to be written |
[in] | fmt | - the varargs format string |
[in] | ... | - the varargs |
int OdimIoUtilities_convertGainOffsetFromInternalRave | ( | const char * | quantity, |
RaveIO_ODIM_Version | version, | ||
double * | gain, | ||
double * | offset ) |
Converts the gain and offset so that quantity is adjusted for ODIM version to be written.
[in] | quantity | - the quantity that is affected |
[in] | version | - ODIM version that should be written |
[in,out] | gain | - the gain. Will be adjusted according to needs |
[in,out] | offset | - the offset. Will be adjusted according to needs |
int OdimIoUtilities_convertGainOffsetToInternalRave | ( | const char * | quantity, |
RaveIO_ODIM_Version | version, | ||
double * | gain, | ||
double * | offset ) |
Converts the gain and offset so that quantity is adjusted for the internally used quantity.
[in] | quantity | - the quantity that is affected |
[in] | version | - ODIM version that should be written |
[in,out] | gain | - the gain. Will be adjusted according to needs |
[in,out] | offset | - the offset. Will be adjusted according to needs |
int OdimIoUtilities_createLegend | ( | RaveLegend_t * | legend, |
HL_NodeList * | nodelist, | ||
RaveIO_ODIM_Version | version, | ||
const char * | fmt, | ||
... ) |
Adds a legend (RaveLegend_t) to a nodelist.
[in] | legend | - the legend |
[in] | nodelist | - the hlhdf node list |
[in] | outversion | - the version of file to be written |
[in] | fmt | - the varargs format string |
[in] | ... | - the varargs |
int OdimIoUtilities_getIdFromSource | ( | const char * | source, |
const char * | id, | ||
char * | buf, | ||
size_t | buflen ) |
Gets the specified id from the source string, for example.
If source string contains CMT:abc,NOD:selek,RAD:se50 then if id = NOD: buf will be filled with selek
[in] | source | - the what/source string |
[in] | id | - the id to search for ended with a :, for example NOD: |
[in,out] | buf | - the buffer filled with the found id |
[in] | buflen | - the length of buf |
int OdimIoUtilities_getNodOrCmtFromSource | ( | const char * | source, |
char * | buf, | ||
size_t | buflen ) |
Like OdimIoUtilities_getIdFromSource but will first check NOD: and then CMT:
[in] | source | - the what/source string |
[in] | id | - the id to search for ended with a :, for example NOD: |
[in,out] | buf | - the buffer filled with the found id |
[in] | buflen | - the length of buf |
RaveField_t * OdimIoUtilities_loadField | ( | LazyNodeListReader_t * | lazyReader, |
RaveIO_ODIM_Version | version, | ||
const char * | fmt, | ||
... ) |
Loads a rave field.
A rave field can be just about anything with a mapping between attributes and a dataset.
[in] | lazyReader | - the wrapper around the hlhdf node list |
[in] | version | - version of the file read |
[in] | fmt | - the variable argument list string format |
[in] | ... | - the variable argument list |
A rave field can be just about anything with a mapping between attributes and a dataset.
[in] | nodelist | - the hlhdf node list |
[in] | nodelist | - version of the file read |
[in] | fmt | - the variable argument list string format |
[in] | ... | - the variable argument list |
RaveLegend_t * OdimIOUtilities_loadLegend | ( | LazyNodeListReader_t * | lazyReader, |
RaveIO_ODIM_Version | version, | ||
const char * | fmt, | ||
... ) |
Loads a rave legend.
The compound type should have been written in a dataset according to the specification.
[in] | lazyReader | - the wrapper around the hlhdf node list |
[in] | version | - version of the file read |
[in] | fmt | - the variable argument list string format |
[in] | ... | - the variable argument list |