Fawkes API Fawkes Development Version
fuse.h
1
2/***************************************************************************
3 * fuse.h - FireVision Remote Control Protocol
4 *
5 * Generated: Mon Jan 09 15:47:58 2006
6 * Copyright 2005-2007 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_NET_FUSE_H_
25#define _FIREVISION_FVUTILS_NET_FUSE_H_
26
27#include <fvutils/color/colorspaces.h>
28#include <fvutils/ipc/defs.h>
29#include <netcomm/utils/dynamic_buffer.h>
30
31#include <stdint.h>
32
33/* Present this e-a-s-t-e-r e-g-g to Tim and get one package of Maoam! */
34
35#pragma pack(push, 4)
36
37namespace firevision {
38
39/** FUSE version enum. */
40typedef enum {
41 FUSE_VERSION_1 = 1, /**< Version 1 */
42 FUSE_VERSION_2 = 2, /**< Version 2 */
43 FUSE_VERSION_3 = 3 /**< Version 3 - current */
44} FUSE_version_t;
45
46/** Current FUSE version */
47#define FUSE_CURRENT_VERSION FUSE_VERSION_3
48
49/** FUSE packet types */
50typedef enum {
51 /* bi-directional packages, 1-999 and 0xFFFFFFFE */
52 FUSE_MT_GREETING = 0xFFFFFFFE, /**< version */
53
54 /* server to client, 1000-1999 */
55 FUSE_MT_IMAGE = 1000, /**< image */
56 FUSE_MT_LUT = 1001, /**< lookup table */
57 FUSE_MT_IMAGE_LIST = 1002, /**< image list */
58 FUSE_MT_LUT_LIST = 1003, /**< lut list */
59 FUSE_MT_GET_IMAGE_FAILED = 1004, /**< Fetching an image failed */
60 FUSE_MT_GET_LUT_FAILED = 1005, /**< Fetching a LUT failed */
61 FUSE_MT_SET_LUT_SUCCEEDED = 1006, /**< Setting a LUT succeeded */
62 FUSE_MT_SET_LUT_FAILED = 1007, /**< Setting a LUT failed */
63 FUSE_MT_IMAGE_INFO = 1008, /**< image info */
64 FUSE_MT_IMAGE_INFO_FAILED = 1009, /**< Retrieval of image info failed */
65
66 /* client to server, 2000-2999 */
67 FUSE_MT_GET_IMAGE = 2000, /**< request image */
68 FUSE_MT_GET_LUT = 2001, /**< request lookup table */
69 FUSE_MT_SET_LUT = 2002, /**< set lookup table */
70 FUSE_MT_GET_IMAGE_LIST = 2003, /**< get image list */
71 FUSE_MT_GET_LUT_LIST = 2004, /**< get LUT list */
72 FUSE_MT_GET_IMAGE_INFO = 2005, /**< get image info */
73
74} FUSE_message_type_t;
75
76/** Image format. */
77typedef enum {
78 FUSE_IF_RAW = 1, /**< Raw image */
79 FUSE_IF_JPEG = 2 /**< JPEG image */
80} FUSE_image_format_t;
81
82/** general packet header */
83typedef struct
84{
85 uint32_t message_type; /**< packet type from FUSE_message_type_t */
86 uint32_t payload_size; /**< payload size */
88
89/** FUSE message. */
90typedef struct
91{
92 FUSE_header_t header; /**< header */
93 void * payload; /**< payload */
95
96/** version packet, bi-directional */
97typedef struct
98{
99 uint32_t version; /**< version from FUSE_version_t */
101
102/** Lookup table packet header.
103 * server to client: PT_LUT
104 * client to server: PT_SETLUT
105 */
106typedef struct
107{
108 char lut_id[LUT_ID_MAX_LENGTH]; /**< LUT ID */
109 uint32_t width; /**< width of LUT */
110 uint32_t height; /**< height of LUT */
111 uint32_t depth; /**< depth of LUT */
112 uint32_t bytes_per_cell; /**< bytes per cell */
114
115// uint32_t next_header; /**< ID of next header. */
116/** Image packet header.
117 * (server to client)
118 */
119typedef struct
120{
121 char image_id[IMAGE_ID_MAX_LENGTH]; /**< image ID */
122 uint32_t format : 8; /**< Image format */
123 uint32_t colorspace : 16; /**< color space */
124 uint32_t reserved : 8; /**< reserved for future use */
125 uint32_t width; /**< width in pixels */
126 uint32_t height; /**< height in pixels */
127 uint32_t buffer_size; /**< size of following image buffer in bytes */
128 int64_t capture_time_sec; /**< capture time seconds part */
129 int64_t capture_time_usec; /**< capture time microseconds part */
131
132/*
133 uint32_t roi_x; *< ROI X coordinate
134 uint32_t roi_y; *< ROI Y coordinate
135 uint32_t roi_width; *< ROI width
136 uint32_t roi_height; *< ROI height
137 // Circle relative to ROI
138
139 int32_t circle_x; *< circle x coordinate
140 int32_t circle_y; *< circle y coordinate
141 uint32_t circle_radius; *< circle radius
142 uint32_t flag_circle_found : 1; *< circle found, 1 if found
143 uint32_t flag_reserved : 31; *< reserved for future use
144*/
145
146/** Image request message. */
147typedef struct
148{
149 char image_id[IMAGE_ID_MAX_LENGTH]; /**< image ID */
150 uint32_t format : 8; /**< requested image format, see FUSE_image_format_t */
151 uint32_t reserved : 24; /**< reserved for future use */
153
154/** Image description message. */
155typedef struct
156{
157 char image_id[IMAGE_ID_MAX_LENGTH]; /**< image ID */
159
160/** LUT description message. */
161typedef struct
162{
163 char lut_id[LUT_ID_MAX_LENGTH]; /**< LUT ID */
165
166/** Image info message. */
167typedef struct
168{
169 char image_id[IMAGE_ID_MAX_LENGTH]; /**< image ID */
170 uint32_t colorspace : 16; /**< color space */
171 uint32_t reserved : 16; /**< reserved for future use */
172 uint32_t width; /**< width in pixels */
173 uint32_t height; /**< height in pixels */
174 uint32_t buffer_size; /**< size of following image buffer in bytes */
176
177/** LUT info message. */
178typedef struct
179{
180 char lut_id[LUT_ID_MAX_LENGTH]; /**< LUT ID */
181 uint32_t width; /**< width of LUT */
182 uint32_t height; /**< height of LUT */
183 uint32_t depth; /**< depth of LUT */
184 uint32_t bytes_per_cell; /**< bytes per cell */
186
187/** Image list message. */
188typedef struct
189{
190 fawkes::dynamic_list_t image_list; /**< DynamicBuffer holding a list of FUSE_imageinfo_t */
192
193/** LUT list message. */
194typedef struct
195{
196 fawkes::dynamic_list_t lut_list; /**< DynamicBuffer holding a list of FUSE_lutinfo_t */
198
199} // end namespace firevision
200
201#pragma pack(pop)
202#endif
Dynamic list type.
version packet, bi-directional
Definition: fuse.h:98
uint32_t version
version from FUSE_version_t
Definition: fuse.h:99
general packet header
Definition: fuse.h:84
uint32_t payload_size
payload size
Definition: fuse.h:86
uint32_t message_type
packet type from FUSE_message_type_t
Definition: fuse.h:85
int64_t capture_time_sec
capture time seconds part
Definition: fuse.h:128
uint32_t format
Image format.
Definition: fuse.h:122
uint32_t buffer_size
size of following image buffer in bytes
Definition: fuse.h:127
int64_t capture_time_usec
capture time microseconds part
Definition: fuse.h:129
uint32_t height
height in pixels
Definition: fuse.h:126
uint32_t reserved
reserved for future use
Definition: fuse.h:124
uint32_t width
width in pixels
Definition: fuse.h:125
uint32_t colorspace
color space
Definition: fuse.h:123
Image description message.
Definition: fuse.h:156
Image info message.
Definition: fuse.h:168
uint32_t reserved
reserved for future use
Definition: fuse.h:171
uint32_t colorspace
color space
Definition: fuse.h:170
uint32_t height
height in pixels
Definition: fuse.h:173
uint32_t width
width in pixels
Definition: fuse.h:172
uint32_t buffer_size
size of following image buffer in bytes
Definition: fuse.h:174
Image list message.
Definition: fuse.h:189
fawkes::dynamic_list_t image_list
DynamicBuffer holding a list of FUSE_imageinfo_t.
Definition: fuse.h:190
Image request message.
Definition: fuse.h:148
uint32_t format
requested image format, see FUSE_image_format_t
Definition: fuse.h:150
uint32_t reserved
reserved for future use
Definition: fuse.h:151
Lookup table packet header.
Definition: fuse.h:107
uint32_t width
width of LUT
Definition: fuse.h:109
uint32_t bytes_per_cell
bytes per cell
Definition: fuse.h:112
uint32_t height
height of LUT
Definition: fuse.h:110
uint32_t depth
depth of LUT
Definition: fuse.h:111
LUT description message.
Definition: fuse.h:162
LUT info message.
Definition: fuse.h:179
uint32_t height
height of LUT
Definition: fuse.h:182
uint32_t bytes_per_cell
bytes per cell
Definition: fuse.h:184
uint32_t width
width of LUT
Definition: fuse.h:181
uint32_t depth
depth of LUT
Definition: fuse.h:183
fawkes::dynamic_list_t lut_list
DynamicBuffer holding a list of FUSE_lutinfo_t.
Definition: fuse.h:196
FUSE message.
Definition: fuse.h:91
void * payload
payload
Definition: fuse.h:93
FUSE_header_t header
header
Definition: fuse.h:92