RAVE
polar_odim_io.h File Reference

Adaptor for polar ODIM H5 files. More...

#include <lazy_nodelist_reader.h>
#include "rave_object.h"
#include "hlhdf.h"
#include "polarscan.h"
#include "polarvolume.h"
#include "rave_list.h"

Go to the source code of this file.

Typedefs

typedef struct _PolarOdimIO_t PolarOdimIO_t
 Defines the odim h5 adaptor for polar products.
 

Functions

void PolarOdimIO_setVersion (PolarOdimIO_t *self, RaveIO_ODIM_Version version)
 Sets the version that this io class should handle.
 
RaveIO_ODIM_Version PolarOdimIO_getVersion (PolarOdimIO_t *self)
 Returns the version that this io class handles.
 
void PolarOdimIO_setStrict (PolarOdimIO_t *self, int strict)
 If writing should be done strictly.
 
int PolarOdimIO_isStrict (PolarOdimIO_t *self)
 If writing should be done strictly.
 
const char * PolarOdimIO_getErrorMessage (PolarOdimIO_t *self)
 If an error occurs during writing, you might get an indication for why by checking the error message.
 
int PolarOdimIO_validateVolumeHowAttributes (PolarOdimIO_t *self, PolarVolume_t *volume)
 Validates if the attributes in the polar volume are valid according to the version rules and strictness.
 
int PolarOdimIO_validateScanHowAttributes (PolarOdimIO_t *self, PolarScan_t *scan)
 Validates if the attributes in the polar scan are valid according to the version rules and strictness.
 
int PolarOdimIO_readScan (PolarOdimIO_t *self, LazyNodeListReader_t *lazyReader, PolarScan_t *scan)
 Reads a scan from the nodelist and sets the data in the scan.
 
int PolarOdimIO_readVolume (PolarOdimIO_t *self, LazyNodeListReader_t *lazyReader, PolarVolume_t *volume)
 Reads a volume from the nodelist and sets the data in the volume.
 
int PolarOdimIO_fillScan (PolarOdimIO_t *self, PolarScan_t *scan, HL_NodeList *nodelist)
 Fills a nodelist with information about a scan.
 
int PolarOdimIO_fillVolume (PolarOdimIO_t *self, PolarVolume_t *volume, HL_NodeList *nodelist)
 Fills a nodelist with information about a volume.
 

Variables

RaveCoreObjectType PolarOdimIO_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Adaptor for polar ODIM H5 files.

This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2010-11-12

Typedef Documentation

◆ PolarOdimIO_t

typedef struct _PolarOdimIO_t PolarOdimIO_t

Defines the odim h5 adaptor for polar products.

Function Documentation

◆ PolarOdimIO_fillScan()

int PolarOdimIO_fillScan ( PolarOdimIO_t * self,
PolarScan_t * scan,
HL_NodeList * nodelist )

Fills a nodelist with information about a scan.

Parameters
[in]self- self
[in]scan- the polar scan
[in]nodelist- the hlhdf nodelist to fill
Returns
1 on success otherwise 0

◆ PolarOdimIO_fillVolume()

int PolarOdimIO_fillVolume ( PolarOdimIO_t * self,
PolarVolume_t * volume,
HL_NodeList * nodelist )

Fills a nodelist with information about a volume.

Parameters
[in]self- self
[in]volume- the polar volume
[in]nodelist- the hlhdf nodelist to fill
Returns
1 on success otherwise 0

◆ PolarOdimIO_getErrorMessage()

const char * PolarOdimIO_getErrorMessage ( PolarOdimIO_t * self)

If an error occurs during writing, you might get an indication for why by checking the error message.

Parameters
[in]raveio- rave io
Returns
the error message (will be an empty string if nothing to report).

◆ PolarOdimIO_getVersion()

RaveIO_ODIM_Version PolarOdimIO_getVersion ( PolarOdimIO_t * self)

Returns the version that this io class handles.

Parameters
[in]self- self
Returns
- the odim version

◆ PolarOdimIO_isStrict()

int PolarOdimIO_isStrict ( PolarOdimIO_t * self)

If writing should be done strictly.

From ODIM H5 2.4 several how-attributes are mandatory. If any of these are missing and strict is set to true, then the writing will fail.

Parameters
[in]self- self
Returns
if writing should be performed strictly or not

◆ PolarOdimIO_readScan()

int PolarOdimIO_readScan ( PolarOdimIO_t * self,
LazyNodeListReader_t * lazyReader,
PolarScan_t * scan )

Reads a scan from the nodelist and sets the data in the scan.

Parameters
[in]self- self
[in]nodelist- the hdf5 node list
[in]scan- the scan that should get the attribute and data set
Returns
1 on success otherwise 0

◆ PolarOdimIO_readVolume()

int PolarOdimIO_readVolume ( PolarOdimIO_t * self,
LazyNodeListReader_t * lazyReader,
PolarVolume_t * volume )

Reads a volume from the nodelist and sets the data in the volume.

Parameters
[in]self- self
[in]nodelist- the lazy node list
[in]volume- the volume that should get the attribute and data set
Returns
1 on success otherwise 0

◆ PolarOdimIO_setStrict()

void PolarOdimIO_setStrict ( PolarOdimIO_t * self,
int strict )

If writing should be done strictly.

From ODIM H5 2.4 several how-attributes are mandatory. If any of these are missing and strict is set to true, then the writing will fail.

Parameters
[in]self- self
[in]strict- if writing should be performed strictly or not

◆ PolarOdimIO_setVersion()

void PolarOdimIO_setVersion ( PolarOdimIO_t * self,
RaveIO_ODIM_Version version )

Sets the version that this io class should handle.

Parameters
[in]self- self
[in]version- the odim version

◆ PolarOdimIO_validateScanHowAttributes()

int PolarOdimIO_validateScanHowAttributes ( PolarOdimIO_t * self,
PolarScan_t * scan )

Validates if the attributes in the polar scan are valid according to the version rules and strictness.

Parameters
[in]self- self
[in]scan- the scan to validate
Returns
1 if valid, otherwise 0

◆ PolarOdimIO_validateVolumeHowAttributes()

int PolarOdimIO_validateVolumeHowAttributes ( PolarOdimIO_t * self,
PolarVolume_t * volume )

Validates if the attributes in the polar volume are valid according to the version rules and strictness.

Parameters
[in]self- self
[in]volume- the volume to validate
Returns
1 if valid, otherwise 0

Variable Documentation

◆ PolarOdimIO_TYPE

RaveCoreObjectType PolarOdimIO_TYPE
extern

Type definition to use when creating a rave object.