datum.h File Reference


Detailed Description

Store a dba_var together with time range metadata.

#include <dballe/core/var.h>

Go to the source code of this file.

Data Structures

struct  _dba_msg_datum
 Representation of one physical value. More...

Typedefs

typedef _dba_msg_datumdba_msg_datum
 Representation of one physical value.

Functions

dba_err dba_msg_datum_create (int pind, int p1, int p2, dba_msg_datum *d)
 Create a new dba_msg_datum.
dba_err dba_msg_datum_copy (dba_msg_datum src, dba_msg_datum *dst)
 Copy an existing datum.
void dba_msg_datum_delete (dba_msg_datum d)
 Delete a dba_msg_datum.
int dba_msg_datum_compare (const dba_msg_datum d1, const dba_msg_datum d2)
 Compare two dba_msg_datum strutures, for use in sorting.
int dba_msg_datum_compare2 (dba_msg_datum d, dba_varcode code, int pind, int p1, int p2)
 Compare a dba_msg_datum struture with some datum information, for use in sorting.


Function Documentation

int dba_msg_datum_compare ( const dba_msg_datum  d1,
const dba_msg_datum  d2 
)

Compare two dba_msg_datum strutures, for use in sorting.

Parameters:
d1 First dba_msg_datum to compare
d2 Second dba_msg_datum to compare
Returns:
-1 if d1 < d2, 0 if d1 == d2, 1 if d1 > d2

int dba_msg_datum_compare2 ( dba_msg_datum  d,
dba_varcode  code,
int  pind,
int  p1,
int  p2 
)

Compare a dba_msg_datum struture with some datum information, for use in sorting.

Parameters:
d First dba_msg_datum to compare
code Variable code of the second datum in the comparison. See vartable.h
pind Time range type indicator. See Time range values.
p1 Time range P1 indicator. See Time range values.
p2 Time range P2 indicator. See Time range values.
Returns:
-1 if p < code,ptype,p1,p2; 0 if p == code,ptype,p1,p2; 1 if p > code,ptype,p1,p2

dba_err dba_msg_datum_copy ( dba_msg_datum  src,
dba_msg_datum dst 
)

Copy an existing datum.

Parameters:
src The datum to copy.
Return values:
dst The newly created duplicate.
Returns:
The error indicator for the function (See error.h)

dba_err dba_msg_datum_create ( int  pind,
int  p1,
int  p2,
dba_msg_datum d 
)

Create a new dba_msg_datum.

Parameters:
pind Time range type indicator. See Time range values.
p1 Time range P1 indicator. See Time range values.
p2 Time range P2 indicator. See Time range values.
Return values:
d The newly created datum.
Returns:
The error indicator for the function (See error.h)

void dba_msg_datum_delete ( dba_msg_datum  d  ) 

Delete a dba_msg_datum.

Parameters:
d The datum to delete.


Generated on Fri Jun 22 15:33:59 2007 for libdballe-msg by  doxygen 1.5.2