writers.h File Reference


Detailed Description

Encapsulates the algorithms used to write raw encoded messages to files containing weather reports.

#include <dballe/core/rawfile.h>
#include <dballe/msg/msg.h>

Go to the source code of this file.

Functions

dba_err dba_file_writer_create_bufr (dba_file_writer *writer, dba_rawfile file)
 Create a writer for data in BUFR format.
dba_err dba_file_writer_set_bufr_template (dba_file_writer writer, int type, int subtype)
 Specify the template to use for encoding BUFR messages.
dba_err dba_file_writer_create_crex (dba_file_writer *writer, dba_rawfile file)
 Create a writer for data in CREX format.
dba_err dba_file_writer_set_crex_template (dba_file_writer writer, int type, int subtype)
 Specify the template to use for encoding CREX messages.
dba_err dba_file_writer_create_aof (dba_file_writer *writer, dba_rawfile file)
 Create a writer for data in AOF format.
dba_err dba_file_writer_write (dba_file_writer writer, dba_msg msg)
 Write a message to the file.
dba_err dba_file_writer_write_raw (dba_file_writer writer, dba_rawmsg msg)
 Write an encoded message to the file.
void dba_file_writer_delete (dba_file_writer writer)
 Delete a dba_file_writer.


Function Documentation

dba_err dba_file_writer_create_aof ( dba_file_writer *  writer,
dba_rawfile  file 
)

Create a writer for data in AOF format.

Return values:
writer The new writer, to be deallocated with dba_file_writer_delete()
Returns:
The error indicator for the function. See error.h

dba_err dba_file_writer_create_bufr ( dba_file_writer *  writer,
dba_rawfile  file 
)

Create a writer for data in BUFR format.

Return values:
writer The new writer, to be deallocated with dba_file_writer_delete()
Returns:
The error indicator for the function. See error.h

dba_err dba_file_writer_create_crex ( dba_file_writer *  writer,
dba_rawfile  file 
)

Create a writer for data in CREX format.

Return values:
writer The new writer, to be deallocated with dba_file_writer_delete()
Returns:
The error indicator for the function. See error.h

void dba_file_writer_delete ( dba_file_writer  writer  ) 

Delete a dba_file_writer.

Parameters:
writer The writer to delete.

dba_err dba_file_writer_set_bufr_template ( dba_file_writer  writer,
int  type,
int  subtype 
)

Specify the template to use for encoding BUFR messages.

Note that the template can be changed while encoding, between one message and another.

Parameters:
writer The writer to change the parameter for
type Message type of the template to use
subtype Message subtype of the template to use
Returns:
The error indicator for the function. See error.h

dba_err dba_file_writer_set_crex_template ( dba_file_writer  writer,
int  type,
int  subtype 
)

Specify the template to use for encoding CREX messages.

Note that the template can be changed while encoding, between one message and another.

Parameters:
writer The writer to change the parameter for
type Message type of the template to use
subtype Message subtype of the template to use
Returns:
The error indicator for the function. See error.h

dba_err dba_file_writer_write ( dba_file_writer  writer,
dba_msg  msg 
)

Write a message to the file.

Parameters:
writer dba_file_writer to use for identifying the message in the file.
msg The dba_rawmsg that will hold the data.
Return values:
found Will 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

dba_err dba_file_writer_write_raw ( dba_file_writer  writer,
dba_rawmsg  msg 
)

Write an encoded message to the file.

Parameters:
writer dba_file_writer to use for identifying the message in the file.
msg The dba_rawmsg that will hold the data.
Return values:
found Will 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


Generated on Fri Jun 22 13:06:53 2007 for libdballe-db by  doxygen 1.5.2