libdballe 4.0.18
Functions
file.h File Reference

I/O functions to dba_file using dba_msgs structures. More...

#include <dballe/core/file.h>
#include <dballe/msg/msgs.h>

Go to the source code of this file.

Functions

dba_err dba_file_read_msgs (dba_file file, dba_msgs *msgs, int *found)
 Read and parse a message from the file.
dba_err dba_file_write_msgs (dba_file file, dba_msgs msgs, int cat, int subcat, int localsubcat)
 Write a message to the file.

Detailed Description

I/O functions to dba_file using dba_msgs structures.


Function Documentation

dba_err dba_file_read_msgs ( dba_file  file,
dba_msgs msgs,
int *  found 
)

Read and parse a message from the file.

Parameters:
filedba_file to read from
Return values:
msgsThe resulting dba_msgs
foundWill be set to true if a message has been found in the file, else to false.
Returns:
The error indicator for the function. See error.h

References DBA_RUN_OR_GOTO, and DBA_RUN_OR_RETURN.

dba_err dba_file_write_msgs ( dba_file  file,
dba_msgs  msgs,
int  cat,
int  subcat,
int  localsubcat 
)

Write a message to the file.

Parameters:
filedba_file to write to
msgsThe dba_msgs to encode and write.
catThe BUFR of CREX message category to use for encoding (0 for auto detect)
subcatThe BUFR of CREX message subcategory to use for encoding (0 for auto detect)
localsubcatThe BUFR of CREX message subcategory (defined by local centres) to use for encoding (0 for auto detect)
Returns:
The error indicator for the function. See error.h

References dba_error_unimplemented, and DBA_RUN_OR_GOTO.