RAVE
odim_sources.h File Reference

Provides support for reading the odim sources from an xml-file This object supports RAVE_OBJECT_CLONE. More...

#include "rave_object.h"
#include "odim_source.h"
#include "rave_list.h"

Go to the source code of this file.

Typedefs

typedef struct _OdimSources_t OdimSources_t
 Defines the odim sources.
 

Functions

OdimSources_tOdimSources_load (const char *filename)
 Simplified loading function, takes filename and a projection registry.
 
int OdimSources_add (OdimSources_t *self, OdimSource_t *source)
 Adds an area to the registry.
 
int OdimSources_size (OdimSources_t *self)
 Returns the number of registered sour es.
 
OdimSource_tOdimSources_get (OdimSources_t *self, const char *nod)
 Returns the source with specified nod name.
 
OdimSource_tOdimSources_get_wmo (OdimSources_t *self, const char *wmo)
 Returns the source with specified wmo identifier.
 
OdimSource_tOdimSources_get_wigos (OdimSources_t *self, const char *wigos)
 Returns the source with specified wigos identifier.
 
OdimSource_tOdimSources_get_rad (OdimSources_t *self, const char *rad)
 Returns the source with specified rad identifier.
 
OdimSource_tOdimSources_get_plc (OdimSources_t *self, const char *plc)
 Returns the source with specified plc identifier.
 
OdimSource_tOdimSources_identify (OdimSources_t *self, const char *sourcestr)
 Returns the source with specified nod name.
 
RaveList_tOdimSources_nods (OdimSources_t *self)
 Return all NODs that has been registered in this source registry.
 

Variables

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

Detailed Description

Provides support for reading the odim sources from an xml-file This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2025-01-15

Typedef Documentation

◆ OdimSources_t

typedef struct _OdimSources_t OdimSources_t

Defines the odim sources.

Function Documentation

◆ OdimSources_add()

int OdimSources_add ( OdimSources_t * self,
OdimSource_t * source )

Adds an area to the registry.

There will be no check if the area already exists so it is up to the user to ensure that no duplicates are added.

Parameters
[in]self- self
[in]area- the area to add
Returns
1 on success otherwise 0

◆ OdimSources_get()

OdimSource_t * OdimSources_get ( OdimSources_t * self,
const char * nod )

Returns the source with specified nod name.

Parameters
[in]self- self
[in]nod- the NOD identifier
Returns
the source or NULL if no such source

◆ OdimSources_get_plc()

OdimSource_t * OdimSources_get_plc ( OdimSources_t * self,
const char * plc )

Returns the source with specified plc identifier.

Parameters
[in]self- self
[in]plc- the plc identifier
Returns
the source or NULL if no such source

◆ OdimSources_get_rad()

OdimSource_t * OdimSources_get_rad ( OdimSources_t * self,
const char * rad )

Returns the source with specified rad identifier.

Parameters
[in]self- self
[in]rad- the rad identifier
Returns
the source or NULL if no such source

◆ OdimSources_get_wigos()

OdimSource_t * OdimSources_get_wigos ( OdimSources_t * self,
const char * wigos )

Returns the source with specified wigos identifier.

Parameters
[in]self- self
[in]wmo- the wigos identifier
Returns
the source or NULL if no such source

◆ OdimSources_get_wmo()

OdimSource_t * OdimSources_get_wmo ( OdimSources_t * self,
const char * wmo )

Returns the source with specified wmo identifier.

Parameters
[in]self- self
[in]wmo- the wmo identifier (5-digits)
Returns
the source or NULL if no such source

◆ OdimSources_identify()

OdimSource_t * OdimSources_identify ( OdimSources_t * self,
const char * sourcestr )

Returns the source with specified nod name.

The source string will be checked in the order NOD, WIGOS, WMO, RAD and finally PLC. If WMO:00000, then WMO will not be used as identifier.

Parameters
[in]self- self
[in]sourcestr- the ODIM source string
Returns
the source or NULL if no such source could be identified

◆ OdimSources_load()

OdimSources_t * OdimSources_load ( const char * filename)

Simplified loading function, takes filename and a projection registry.

Parameters
[in]filename- the area file name
[in]pRegistry- the projection registry
Returns
an area registry

◆ OdimSources_nods()

RaveList_t * OdimSources_nods ( OdimSources_t * self)

Return all NODs that has been registered in this source registry.

Remember to use @ref RaveList_freeAndDestroy that will deallocate the list for you.

Parameters
[in]self- self
Returns
a list of nods (char* pointers).

◆ OdimSources_size()

int OdimSources_size ( OdimSources_t * self)

Returns the number of registered sour es.

Parameters
[in]self- self
Returns
the number of registered sources

Variable Documentation

◆ OdimSources_TYPE

RaveCoreObjectType OdimSources_TYPE
extern

Type definition to use when creating a rave object.