RAVE
file_object_odim_io.c File Reference

File Object ODIM IO functions. More...

#include "file_object_odim_io.h"
#include "rave_hlhdf_utilities.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include <string.h>
#include "odim_io_utilities.h"
#include "lazy_dataset.h"
#include <math.h>

Classes

struct  _FileObjectOdimIO_t
 The Polar ODIM IO adaptor. More...
 

Functions

void FileObjectOdimIO_setVersion (FileObjectOdimIO_t *self, RaveIO_ODIM_Version version)
 Sets the version that this io class should handle.
 
RaveIO_ODIM_Version FileObjectOdimIO_getVersion (FileObjectOdimIO_t *self)
 Returns the version that this io class handles.
 
void FileObjectOdimIO_setStrict (FileObjectOdimIO_t *self, int strict)
 If writing should be done strictly.
 
int FileObjectOdimIO_isStrict (FileObjectOdimIO_t *self)
 If writing should be done strictly.
 
const char * FileObjectOdimIO_getErrorMessage (FileObjectOdimIO_t *self)
 If an error occurs during writing, you might get an indication for why by checking the error message.
 
FileObject_tFileObjectOdimIO_read (FileObjectOdimIO_t *self, LazyNodeListReader_t *lazyReader)
 Reads a scan from the nodelist and sets the data in the scan.
 
int FileObjectOdimIO_fill (FileObjectOdimIO_t *self, FileObject_t *fobj, HL_NodeList *nodelist)
 Fills a nodelist with information about a file object.
 

Variables

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

Detailed Description

File Object ODIM IO functions.

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

Function Documentation

◆ FileObjectOdimIO_fill()

int FileObjectOdimIO_fill ( FileObjectOdimIO_t * self,
FileObject_t * fobj,
HL_NodeList * nodelist )

Fills a nodelist with information about a file object.

Parameters
[in]self- self
[in]fobj- the file object
[in]nodelist- the hlhdf nodelist to fill
Returns
1 on success otherwise 0

◆ FileObjectOdimIO_getErrorMessage()

const char * FileObjectOdimIO_getErrorMessage ( FileObjectOdimIO_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).

◆ FileObjectOdimIO_getVersion()

RaveIO_ODIM_Version FileObjectOdimIO_getVersion ( FileObjectOdimIO_t * self)

Returns the version that this io class handles.

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

◆ FileObjectOdimIO_isStrict()

int FileObjectOdimIO_isStrict ( FileObjectOdimIO_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

◆ FileObjectOdimIO_read()

FileObject_t * FileObjectOdimIO_read ( FileObjectOdimIO_t * self,
LazyNodeListReader_t * lazyReader )

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

Parameters
[in]self- self
[in]nodelist- the hdf5 node list
Returns
the file object on success otherwise NULL

◆ FileObjectOdimIO_setStrict()

void FileObjectOdimIO_setStrict ( FileObjectOdimIO_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

◆ FileObjectOdimIO_setVersion()

void FileObjectOdimIO_setVersion ( FileObjectOdimIO_t * self,
RaveIO_ODIM_Version version )

Sets the version that this io class should handle.

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

Variable Documentation

◆ FileObjectOdimIO_TYPE

RaveCoreObjectType FileObjectOdimIO_TYPE
Initial value:
= {
"FileObjectOdimIO",
FileObjectOdimIO_constructor,
FileObjectOdimIO_destructor,
FileObjectOdimIO_copyconstructor
}
struct _FileObjectOdimIO_t FileObjectOdimIO_t
Defines the odim h5 adaptor for polar products.
Definition file_object_odim_io.h:37

Type definition to use when creating a rave object.