Fawkes API Fawkes Development Version
fvff.h
1
2/***************************************************************************
3 * fvff.h - FireVision file format
4 *
5 * Created: Fri Mar 28 11:12:38 2008
6 * Copyright 2008 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#ifndef _FIREVISION_FVUTILS_FILEFORMAT_FVFF_H_
25#define _FIREVISION_FVUTILS_FILEFORMAT_FVFF_H_
26
27#pragma pack(push, 4)
28
29#ifndef __STDC_LIMIT_MACROS
30# define __STDC_LIMIT_MACROS
31#endif
32#include <stdint.h>
33
34#define FVFF_COMMENT_SIZE 256
35
36namespace firevision {
37
38/** Header for a FireVision file format file.
39 * The header defines the basic parameters needed to correctly interpret the
40 * following file contents.
41 *
42 * The header defines a magic by which a rectinfo can be identified. This is
43 * defined by the actual content of the file.
44 * The version is stored as a sequential number. This version has to be changed
45 * whenever either the header or the file data format changes. The version is set
46 * by the concrete data implementation.
47 * The file defines the endianess of the supplied data.
48 * There are several reserved bits that may be used later to store flags. The field
49 * num_blocks define how many info blocks there are in this file.
50 *
51 * Directly following the header is the content specific header. It has to be exactly
52 * the size given in spec_head_size.
53 */
54typedef struct _fvff_header_t
55{
56 uint16_t magic_token; /**< magic token */
57 uint16_t version : 4; /**< version of the data file, this header defines version 1 */
58 uint16_t endianess : 1; /**< endianess of the file, 0 means little endian, 1 means big endian */
59 uint16_t reserved : 11; /**< reserved for future use */
60 uint16_t num_blocks; /**< number of rectification info blocks in this file */
61 uint32_t spec_head_size; /**< data specific header size */
62 uint64_t created_sec; /**< creation unix timestamp, seconds */
63 uint64_t created_usec; /**< creation unix timestamp, useconds */
64 char comment[FVFF_COMMENT_SIZE]; /**< optional comment */
66
67/** Block header.
68 * Each block in a FvFF file has a block header. This header defines only the basic
69 * characteristics that are needed to parse the file.
70 * Directly following the header is the content specific block header. The size has to
71 * be set in spec_head_size.
72 */
74{
75 uint32_t type; /**< The type of the block, content-specific */
76 uint32_t size; /**< size in bytes of this block, does not include any headers */
77 uint32_t spec_head_size; /**< the size of the following content specific block header */
79
80} // end namespace firevision
81
82#pragma pack(pop)
83#endif
uint32_t type
The type of the block, content-specific.
Definition: fvff.h:75
uint32_t spec_head_size
the size of the following content specific block header
Definition: fvff.h:77
uint32_t size
size in bytes of this block, does not include any headers
Definition: fvff.h:76
Header for a FireVision file format file.
Definition: fvff.h:55
uint16_t num_blocks
number of rectification info blocks in this file
Definition: fvff.h:60
uint16_t reserved
reserved for future use
Definition: fvff.h:59
uint16_t version
version of the data file, this header defines version 1
Definition: fvff.h:57
uint64_t created_usec
creation unix timestamp, useconds
Definition: fvff.h:63
uint64_t created_sec
creation unix timestamp, seconds
Definition: fvff.h:62
uint16_t endianess
endianess of the file, 0 means little endian, 1 means big endian
Definition: fvff.h:58
uint32_t spec_head_size
data specific header size
Definition: fvff.h:61
uint16_t magic_token
magic token
Definition: fvff.h:56
char comment[FVFF_COMMENT_SIZE]
optional comment
Definition: fvff.h:64