1 package net.osdn.gokigen.cameratest.fuji;
6 static final int IMAGE_INFO = 0x1008;
7 static final int THUMBNAIL = 0x100a;
9 static final int FULL_IMAGE = 0x101b;
10 static final int CAMERA_LAST_IMAGE = 0x9022;
12 static final int CAMERA_CAPABILITIES = 0x902b;
14 static final int SHUTTER_SPEED = 0x902c;
15 static final int APERTURE = 0x902d;
17 byte[] registration_message()
20 // length byte : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
22 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xf2, (byte)0xe4, (byte)0x53, (byte)0x8f,
23 (byte)0xad, (byte)0xa5, (byte)0x48, (byte)0x5d, (byte)0x87, (byte)0xb2, (byte)0x7f, (byte)0x0b,
24 (byte)0xd3, (byte)0xd5, (byte)0xde, (byte)0xd0, // (byte)0x02, (byte)0x78, (byte)0xa8, (byte)0xc0,
25 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
28 // device_name 'GOKIGEN____012345678'
29 (byte)0x47, (byte)0x00, (byte)0x4f, (byte)0x00, (byte)0x4b, (byte)0x00, (byte)0x49, (byte)0x00,
30 (byte)0x47, (byte)0x00, (byte)0x45, (byte)0x00, (byte)0x4e, (byte)0x00, (byte)0x5f, (byte)0x00,
31 (byte)0x5f, (byte)0x00, (byte)0x5f, (byte)0x00, (byte)0x5f, (byte)0x00, (byte)0x30, (byte)0x00,
32 (byte)0x31, (byte)0x00, (byte)0x32, (byte)0x00, (byte)0x33, (byte)0x00, (byte)0x34, (byte)0x00,
33 (byte)0x35, (byte)0x00, (byte)0x36, (byte)0x00, (byte)0x37, (byte)0x00, (byte)0x38, (byte)0x00,
34 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
35 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
43 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
44 (byte)0x01, (byte)0x00,
46 // message_header.type : STOP (0x1003)
47 (byte)0x03, (byte)0x10,
49 // message_id (0~1づつ繰り上がる)
50 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
54 byte[] reset_message()
56 return (new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, });
59 byte[] start_message()
62 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
63 (byte)0x01, (byte)0x00,
65 // message_header.type : START (0x1002) : OpenSession
66 (byte)0x02, (byte)0x10,
68 // message_id (0~1づつ繰り上がる)
69 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
72 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
76 byte[] start_message2()
79 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
80 (byte)0x01, (byte)0x00,
82 // message_header.type : single_part (0x1015) : GetDevicePropValue
83 (byte)0x15, (byte)0x10,
85 // message_id (0~1づつ繰り上がる)
86 (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x00,
89 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
94 byte[] start_message3_1()
97 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
98 (byte)0x01, (byte)0x00,
100 // message_header.type : two_part (0x1016) : SetDevicePropValue
101 (byte)0x16, (byte)0x10,
103 // message_id (0~1づつ繰り上がる)
104 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
107 (byte)0x01, (byte)0xdf, (byte)0x00, (byte)0x00,
112 byte[] start_message3_2()
115 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
116 (byte)0x02, (byte)0x00,
118 // message_header.type : two_part (0x1016) : SetDevicePropValue
119 (byte)0x16, (byte)0x10,
121 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
122 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
125 (byte)0x05, (byte)0x00,
130 byte[] start_message4()
133 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
134 (byte)0x01, (byte)0x00,
136 // message_header.type : single_part (0x1015) : GetDevicePropValue
137 (byte)0x15, (byte)0x10,
139 // message_id (0~1づつ繰り上がる)
140 (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x00,
143 (byte)0x24, (byte)0xdf, (byte)0x00, (byte)0x00,
148 byte[] start_message5_1()
151 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
152 (byte)0x01, (byte)0x00,
154 // message_header.type : two_part (0x1016) : SetDevicePropValue
155 (byte)0x16, (byte)0x10,
157 // message_id (0~1づつ繰り上がる)
158 (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00,
161 (byte)0x24, (byte)0xdf, (byte)0x00, (byte)0x00,
166 byte[] start_message5_2()
169 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
170 (byte)0x02, (byte)0x00,
172 // message_header.type : two_part (0x1016) : SetDevicePropValue
173 (byte)0x16, (byte)0x10,
175 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
176 (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00,
179 (byte)0x07, (byte)0x00, (byte)0x02, (byte)0x00,
184 byte[] start_message6()
187 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
188 (byte)0x01, (byte)0x00,
190 // message_header.type : single_part (0x1015) : GetDevicePropValue
191 (byte)0x15, (byte)0x10,
193 // message_id (0~1づつ繰り上がる...)
194 (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00,
197 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
203 byte[] start_message7()
206 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
207 (byte)0x01, (byte)0x00,
209 // message_header.type : camera_capabilities (0x902b)
210 (byte)0x2b, (byte)0x90,
212 // message_id (0~1づつ繰り上がる...)
213 (byte)0x07, (byte)0x00, (byte)0x00, (byte)0x00,
219 byte[] start_message8()
222 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
223 (byte)0x01, (byte)0x00,
225 // message_header.type : single_part (0x1015) : GetDevicePropValue
226 (byte)0x15, (byte)0x10,
228 // message_id (0~1づつ繰り上がる...)
229 (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00,
232 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
239 byte[] start_message9()
242 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
243 (byte)0x01, (byte)0x00,
245 // message_header.type : camera_remote (0x101c) : InitiateOpenCapture
246 (byte)0x1c, (byte)0x10,
248 // message_id (0~1づつ繰り上がる...)
249 (byte)0x09, (byte)0x00, (byte)0x00, (byte)0x00,
252 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
253 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
259 byte[] status_request_message()
263 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
264 (byte)0x01, (byte)0x00,
266 // message_header.type : single_part (0x1015) : GetDevicePropValue
267 (byte)0x15, (byte)0x10,
269 // message_id (0~1づつ繰り上がる...)
270 (byte)0x0A, (byte)0x00, (byte)0x00, (byte)0x00,
273 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
278 byte[] execute_shutter_message()
282 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
283 (byte)0x01, (byte)0x00,
285 // message_header.type : shutter (0x100e)
286 (byte)0x0e, (byte)0x10,
288 // message_id (0~1づつ繰り上がる...
289 (byte)0x0B, (byte)0x00, (byte)0x00, (byte)0x00,
292 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
293 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
299 byte[] execute_focus_lock(byte pointX, byte pointY)
303 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
304 (byte)0x01, (byte)0x00,
306 // message_header.type : focus_point (0x9026)
307 (byte)0x26, (byte)0x90,
309 // message_id (0~1づつ繰り上がる...
310 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
313 pointY, pointX, (byte)0x02, (byte)0x03,
314 //pointY, pointX, (byte)0x00, (byte)0x00,
319 byte[] execute_focus_unlock()
323 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
324 (byte)0x01, (byte)0x00,
326 // message_header.type : focus_unlock (0x9027)
327 (byte)0x27, (byte)0x90,
329 // message_id (0~1づつ繰り上がる...
330 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
334 byte[] update_aperture(boolean isIncrement)
338 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
339 (byte)0x01, (byte)0x00,
341 // message_header.type : aperture (0x5007)
342 (byte)0x07, (byte)0x50,
344 // message_id (0~1づつ繰り上がる...
345 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
348 (isIncrement)? (byte) 0x01 : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
353 byte[] update_shutter_speed(boolean isIncrement)
357 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
358 (byte)0x01, (byte)0x00,
360 // message_header.type : aperture (0xd240)
361 (byte)0x40, (byte)0xd2,
363 // message_id (0~1づつ繰り上がる...
364 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
367 (isIncrement)? (byte) 0x01 : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
372 byte[] update_exposure(boolean isIncrement)
376 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
377 (byte)0x01, (byte)0x00,
379 // message_header.type : aperture (0x902e)
380 (byte)0x2e, (byte)0x90,
382 // message_id (0~1づつ繰り上がる...
383 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
386 (isIncrement)? (byte) 0x01 : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
390 byte[] update_property_1(byte high, byte low)
393 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
394 (byte)0x01, (byte)0x00,
396 // message_header.type : two_part (0x1016) : SetDevicePropValue
397 (byte)0x16, (byte)0x10,
399 // message_id (0~1づつ繰り上がる)
400 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
407 byte[] update_property_2(byte data0, byte data1, byte data2, byte data3)
410 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
411 (byte)0x02, (byte)0x00,
413 // message_header.type : two_part (0x1016) : SetDevicePropValue
414 (byte)0x16, (byte)0x10,
416 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
417 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
420 data3, data2, data1, data0,