1 package net.osdn.gokigen.cameratest.fuji;
5 static final int HELLO = 0x0000;
7 static final int START = 0x1002;
8 static final int STOP = 0x1003;
10 static final int IMAGE_INFO = 0x1008;
11 static final int THUMBNAIL = 0x100a;
13 static final int SHUTTER = 0x100e;
15 static final int SINGLE_PART = 0x1015;
16 static final int DOUBLE_PART = 0x1016;
18 static final int FULL_IMAGE = 0x101b;
19 static final int CAMERA_REMOTE = 0x101c;
21 static final int CAMERA_LAST_IMAGE = 0x9022;
23 static final int FOCUS_POINT = 0x9026;
24 static final int FOCUS_UNLOCK = 0x9027;
26 static final int CAMERA_CAPABILITIES = 0x902b;
28 static final int SHUTTER_SPEED = 0x902c;
29 static final int APERTURE = 0x902d;
30 static final int EXPOSURE_CORRECTION = 0x902e;
32 byte[] registration_message()
35 // length byte : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
37 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xf2, (byte)0xe4, (byte)0x53, (byte)0x8f,
38 (byte)0xad, (byte)0xa5, (byte)0x48, (byte)0x5d, (byte)0x87, (byte)0xb2, (byte)0x7f, (byte)0x0b,
39 (byte)0xd3, (byte)0xd5, (byte)0xde, (byte)0xd0, // (byte)0x02, (byte)0x78, (byte)0xa8, (byte)0xc0,
40 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
43 // device_name 'GOKIGEN____012345'
44 (byte)0x47, (byte)0x00, (byte)0x4f, (byte)0x00, (byte)0x4b, (byte)0x00, (byte)0x49, (byte)0x00,
45 (byte)0x47, (byte)0x00, (byte)0x45, (byte)0x00, (byte)0x4e, (byte)0x00, (byte)0x5f, (byte)0x00,
46 (byte)0x5f, (byte)0x00, (byte)0x5f, (byte)0x00, (byte)0x5f, (byte)0x00, (byte)0x30, (byte)0x00,
47 (byte)0x31, (byte)0x00, (byte)0x32, (byte)0x00, (byte)0x33, (byte)0x00, (byte)0x34, (byte)0x00,
48 (byte)0x35, (byte)0x00, (byte)0x36, (byte)0x00, (byte)0x37, (byte)0x00, (byte)0x00, (byte)0x00,
49 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
50 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
55 byte[] reset_message()
57 return (new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, });
61 byte[] hello_message()
69 byte[] start_message()
74 (byte) 0x01, (byte) 0x00, (byte) 0x02, (byte) 0x10, (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0x00,
75 (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0x00,
77 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
78 (byte)0x01, (byte)0x00,
80 // message_header.type : START (0x1002)
81 (byte)0x02, (byte)0x10,
83 // message_id (0~1づつ繰り上がる)
84 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
87 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
91 byte[] start_message2()
96 (byte) 0x01, (byte) 0x00, (byte) 0x15, (byte) 0x10, (byte) 0x02, (byte) 0x00, (byte) 0x00, (byte) 0x00,
97 (byte) 0x12, (byte) 0xd2, (byte) 0x00, (byte) 0x00,
99 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
100 (byte)0x01, (byte)0x00,
102 // message_header.type : single_part (0x1015)
103 (byte)0x15, (byte)0x10,
105 // message_id (0~1づつ繰り上がる)
106 (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x00,
109 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
114 byte[] start_message3_1()
119 (byte) 0x01, (byte) 0x00, (byte) 0x16, (byte) 0x10, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00,
120 (byte) 0x01, (byte) 0xdf, (byte) 0x00, (byte) 0x00,
122 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
123 (byte)0x01, (byte)0x00,
125 // message_header.type : two_part (0x1016)
126 (byte)0x16, (byte)0x10,
128 // message_id (0~1づつ繰り上がる)
129 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
132 (byte)0x01, (byte)0xdf, (byte)0x00, (byte)0x00,
137 byte[] start_message3_2()
142 (byte) 0x02, (byte) 0x00, (byte) 0x16, (byte) 0x10, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00,
143 (byte) 0x05, (byte) 0x00,
145 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
146 (byte)0x02, (byte)0x00,
148 // message_header.type : two_part (0x1016)
149 (byte)0x16, (byte)0x10,
151 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
152 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
155 (byte)0x05, (byte)0x00,
161 byte[] start_message4()
166 (byte) 0x01, (byte) 0x00, (byte) 0x15, (byte) 0x10, (byte) 0x04, (byte) 0x00, (byte) 0x00, (byte) 0x00,
167 (byte) 0x24, (byte) 0xdf, (byte) 0x00, (byte) 0x00,
169 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
170 (byte)0x01, (byte)0x00,
172 // message_header.type : single_part (0x1015)
173 (byte)0x15, (byte)0x10,
175 // message_id (0~1づつ繰り上がる)
176 (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x00,
179 (byte)0x24, (byte)0xdf, (byte)0x00, (byte)0x00,
184 byte[] start_message5_1()
189 (byte) 0x01, (byte) 0x00, (byte) 0x16, (byte) 0x10, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00,
190 (byte) 0x24, (byte) 0xdf, (byte) 0x00, (byte) 0x00,
192 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
193 (byte)0x01, (byte)0x00,
195 // message_header.type : two_part (0x1016)
196 (byte)0x16, (byte)0x10,
198 // message_id (0~1づつ繰り上がる)
199 (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00,
202 (byte)0x24, (byte)0xdf, (byte)0x00, (byte)0x00,
207 byte[] start_message5_2()
212 (byte) 0x02, (byte) 0x00, (byte) 0x16, (byte) 0x10, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00,
213 (byte) 0x07, (byte) 0x00, (byte) 0x02, (byte) 0x00,
215 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
216 (byte)0x02, (byte)0x00,
218 // message_header.type : two_part (0x1016)
219 (byte)0x16, (byte)0x10,
221 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
222 (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00,
225 (byte)0x07, (byte)0x00, (byte)0x02, (byte)0x00,
230 byte[] start_message6()
235 (byte) 0x01, (byte) 0x00, (byte) 0x15, (byte) 0x10, (byte) 0x06, (byte) 0x00, (byte) 0x00, (byte) 0x00,
236 (byte) 0x12, (byte) 0xd2, (byte) 0x00, (byte) 0x00,
238 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
239 (byte)0x01, (byte)0x00,
241 // message_header.type : single_part (0x1015)
242 (byte)0x15, (byte)0x10,
244 // message_id (0~1づつ繰り上がる...)
245 (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00,
248 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
254 byte[] start_message7()
259 (byte) 0x01, (byte) 0x00, (byte) 0x2b, (byte) 0x90, (byte) 0x07, (byte) 0x00, (byte) 0x00, (byte) 0x00,
261 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
262 (byte)0x01, (byte)0x00,
264 // message_header.type : camera_capabilities (0x902b)
265 (byte)0x2b, (byte)0x90,
267 // message_id (0~1づつ繰り上がる...)
268 (byte)0x07, (byte)0x00, (byte)0x00, (byte)0x00,
274 byte[] start_message8()
279 (byte) 0x01, (byte) 0x00, (byte) 0x15, (byte) 0x10, (byte) 0x08, (byte) 0x00, (byte) 0x00, (byte) 0x00,
280 (byte) 0x12, (byte) 0xd2, (byte) 0x00, (byte) 0x00
282 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
283 (byte)0x01, (byte)0x00,
285 // message_header.type : single_part (0x1015)
286 (byte)0x15, (byte)0x10,
288 // message_id (0~1づつ繰り上がる...)
289 (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00,
292 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
299 byte[] start_message9()
304 (byte) 0x01, (byte) 0x00, (byte) 0x1c, (byte) 0x10, (byte) 0x09, (byte) 0x00, (byte) 0x00, (byte) 0x00,
305 (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00
307 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
308 (byte)0x01, (byte)0x00,
310 // message_header.type : camera_remote (0x101c)
311 (byte)0x1c, (byte)0x10,
313 // message_id (0~1づつ繰り上がる...)
314 (byte)0x09, (byte)0x00, (byte)0x00, (byte)0x00,
317 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
318 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
324 byte[] status_request_message()
328 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
329 (byte)0x01, (byte)0x00,
331 // message_header.type : single_part (0x1015)
332 (byte)0x15, (byte)0x10,
334 // message_id (0~1づつ繰り上がる...)
335 (byte)0x0A, (byte)0x00, (byte)0x00, (byte)0x00,
338 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
343 byte[] execute_shutter_message()
347 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
348 (byte)0x01, (byte)0x00,
350 // message_header.type : shutter (0x100e)
351 (byte)0x0e, (byte)0x10,
353 // message_id (0~1づつ繰り上がる...
354 (byte)0x0B, (byte)0x00, (byte)0x00, (byte)0x00,
357 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
358 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
364 byte[] execute_focus_lock(byte pointX, byte pointY)
368 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
369 (byte)0x01, (byte)0x00,
371 // message_header.type : focus_point (0x9026)
372 (byte)0x26, (byte)0x90,
374 // message_id (0~1づつ繰り上がる...
375 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
378 pointY, pointX, (byte)0x00, (byte)0x00,
384 byte[] execute_focus_unlock()
388 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
389 (byte)0x01, (byte)0x00,
391 // message_header.type : focus_unlock (0x9027)
392 (byte)0x27, (byte)0x90,
394 // message_id (0~1づつ繰り上がる...
395 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,