aof_codec.h

Go to the documentation of this file.
00001 /*
00002  * DB-ALLe - Archive for punctual meteorological data
00003  *
00004  * Copyright (C) 2005,2006  ARPA-SIM <urpsim@smr.arpa.emr.it>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00018  *
00019  * Author: Enrico Zini <enrico@enricozini.com>
00020  */
00021 
00022 #ifndef DBALLE_AOF_CODEC_H
00023 #define DBALLE_AOF_CODEC_H
00024 
00025 #ifdef  __cplusplus
00026 extern "C" {
00027 #endif
00028 
00052 #include <dballe/core/rawmsg.h>
00053 #include <dballe/core/file.h>
00054 #include <dballe/msg/msgs.h>
00055 #include <stdint.h>
00056 
00067 dba_err aof_codec_decode(dba_rawmsg msg, dba_msgs* msgs);
00068 
00081 dba_err aof_codec_get_category(dba_rawmsg msg, int* category, int* subcategory);
00082 
00093 /*
00094 dba_err aof_message_encode(aof_message msg, dba_msg in);
00095 */
00096 
00105 void aof_codec_dump(dba_rawmsg msg, FILE* out);
00106 
00120 dba_err aof_codec_read_record(dba_file file, uint32_t** rec, int* len);
00121 
00135 dba_err aof_codec_write_record(dba_file file, const uint32_t* rec, int len);
00136 
00155 dba_err aof_codec_read_header(dba_file file, uint32_t** fdr, int* fdr_len, uint32_t** ddr, int* ddr_len);
00156 
00169 dba_err aof_codec_write_dummy_header(dba_file file);
00170 
00184 dba_err aof_codec_fix_header(dba_file file);
00185     
00186 
00187 #ifdef  __cplusplus
00188 }
00189 #endif
00190 
00191 /* vim:set ts=4 sw=4: */
00192 #endif

Generated on Fri Jun 22 15:18:06 2007 for libdballe-msg by  doxygen 1.5.2