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____012345'
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)0x00, (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[] hello_message()
67 byte[] start_message()
70 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
71 (byte)0x01, (byte)0x00,
73 // message_header.type : START (0x1002) : OpenSession
74 (byte)0x02, (byte)0x10,
76 // message_id (0~1づつ繰り上がる)
77 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
80 (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
84 byte[] start_message2()
87 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
88 (byte)0x01, (byte)0x00,
90 // message_header.type : single_part (0x1015) : GetDevicePropValue
91 (byte)0x15, (byte)0x10,
93 // message_id (0~1づつ繰り上がる)
94 (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x00,
97 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
102 byte[] start_message3_1()
105 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
106 (byte)0x01, (byte)0x00,
108 // message_header.type : two_part (0x1016) : SetDevicePropValue
109 (byte)0x16, (byte)0x10,
111 // message_id (0~1づつ繰り上がる)
112 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
115 (byte)0x01, (byte)0xdf, (byte)0x00, (byte)0x00,
120 byte[] start_message3_2()
123 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
124 (byte)0x02, (byte)0x00,
126 // message_header.type : two_part (0x1016) : SetDevicePropValue
127 (byte)0x16, (byte)0x10,
129 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
130 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
133 (byte)0x05, (byte)0x00,
139 byte[] start_message4()
142 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
143 (byte)0x01, (byte)0x00,
145 // message_header.type : single_part (0x1015) : GetDevicePropValue
146 (byte)0x15, (byte)0x10,
148 // message_id (0~1づつ繰り上がる)
149 (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x00,
152 (byte)0x24, (byte)0xdf, (byte)0x00, (byte)0x00,
157 byte[] start_message5_1()
160 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
161 (byte)0x01, (byte)0x00,
163 // message_header.type : two_part (0x1016) : SetDevicePropValue
164 (byte)0x16, (byte)0x10,
166 // message_id (0~1づつ繰り上がる)
167 (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00,
170 (byte)0x24, (byte)0xdf, (byte)0x00, (byte)0x00,
175 byte[] start_message5_2()
178 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
179 (byte)0x02, (byte)0x00,
181 // message_header.type : two_part (0x1016) : SetDevicePropValue
182 (byte)0x16, (byte)0x10,
184 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
185 (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00,
188 (byte)0x07, (byte)0x00, (byte)0x02, (byte)0x00,
193 byte[] start_message6()
196 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
197 (byte)0x01, (byte)0x00,
199 // message_header.type : single_part (0x1015) : GetDevicePropValue
200 (byte)0x15, (byte)0x10,
202 // message_id (0~1づつ繰り上がる...)
203 (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00,
206 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
212 byte[] start_message7()
215 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
216 (byte)0x01, (byte)0x00,
218 // message_header.type : camera_capabilities (0x902b)
219 (byte)0x2b, (byte)0x90,
221 // message_id (0~1づつ繰り上がる...)
222 (byte)0x07, (byte)0x00, (byte)0x00, (byte)0x00,
228 byte[] start_message8()
231 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
232 (byte)0x01, (byte)0x00,
234 // message_header.type : single_part (0x1015) : GetDevicePropValue
235 (byte)0x15, (byte)0x10,
237 // message_id (0~1づつ繰り上がる...)
238 (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00,
241 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
248 byte[] start_message9()
251 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
252 (byte)0x01, (byte)0x00,
254 // message_header.type : camera_remote (0x101c) : InitiateOpenCapture
255 (byte)0x1c, (byte)0x10,
257 // message_id (0~1づつ繰り上がる...)
258 (byte)0x09, (byte)0x00, (byte)0x00, (byte)0x00,
261 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
262 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
268 byte[] status_request_message()
272 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
273 (byte)0x01, (byte)0x00,
275 // message_header.type : single_part (0x1015) : GetDevicePropValue
276 (byte)0x15, (byte)0x10,
278 // message_id (0~1づつ繰り上がる...)
279 (byte)0x0A, (byte)0x00, (byte)0x00, (byte)0x00,
282 (byte)0x12, (byte)0xd2, (byte)0x00, (byte)0x00,
287 byte[] execute_shutter_message()
291 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
292 (byte)0x01, (byte)0x00,
294 // message_header.type : shutter (0x100e)
295 (byte)0x0e, (byte)0x10,
297 // message_id (0~1づつ繰り上がる...
298 (byte)0x0B, (byte)0x00, (byte)0x00, (byte)0x00,
301 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
302 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
308 byte[] execute_focus_lock(byte pointX, byte pointY)
312 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
313 (byte)0x01, (byte)0x00,
315 // message_header.type : focus_point (0x9026)
316 (byte)0x26, (byte)0x90,
318 // message_id (0~1づつ繰り上がる...
319 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
322 pointY, pointX, (byte)0x02, (byte)0x03,
323 //pointY, pointX, (byte)0x00, (byte)0x00,
329 byte[] execute_focus_unlock()
333 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
334 (byte)0x01, (byte)0x00,
336 // message_header.type : focus_unlock (0x9027)
337 (byte)0x27, (byte)0x90,
339 // message_id (0~1づつ繰り上がる...
340 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
344 byte[] update_aperture(boolean isIncrement)
348 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
349 (byte)0x01, (byte)0x00,
351 // message_header.type : aperture (0x5007)
352 (byte)0x07, (byte)0x50,
354 // message_id (0~1づつ繰り上がる...
355 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
358 (isIncrement)? (byte) 0x01 : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
363 byte[] update_shutter_speed(boolean isIncrement)
367 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
368 (byte)0x01, (byte)0x00,
370 // message_header.type : aperture (0xd240)
371 (byte)0x40, (byte)0xd2,
373 // message_id (0~1づつ繰り上がる...
374 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
377 (isIncrement)? (byte) 0x01 : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
382 byte[] update_exposure(boolean isIncrement)
386 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
387 (byte)0x01, (byte)0x00,
389 // message_header.type : aperture (0x902e)
390 (byte)0x2e, (byte)0x90,
392 // message_id (0~1づつ繰り上がる...
393 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
396 (isIncrement)? (byte) 0x01 : (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
400 byte[] update_property_1(byte high, byte low)
403 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
404 (byte)0x01, (byte)0x00,
406 // message_header.type : two_part (0x1016) : SetDevicePropValue
407 (byte)0x16, (byte)0x10,
409 // message_id (0~1づつ繰り上がる)
410 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
417 byte[] update_property_2(byte data0, byte data1, byte data2, byte data3)
420 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
421 (byte)0x02, (byte)0x00,
423 // message_header.type : two_part (0x1016) : SetDevicePropValue
424 (byte)0x16, (byte)0x10,
426 // message_id (0~1づつ繰り上がる...けど two-part messageなので同じ)
427 (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
430 data3, data2, data1, data0,