OSDN Git Service

ccf9280d9a4fa3975a9cfb898f60797ef6507a64
[gokigen/Gr2Control.git] / app / src / main / java / net / osdn / gokigen / gr2control / camera / fuji_x / wrapper / command / messages / start / StartMessage3rd.java
1 package net.osdn.gokigen.gr2control.camera.fuji_x.wrapper.command.messages.start;
2
3 import androidx.annotation.NonNull;
4
5 import net.osdn.gokigen.gr2control.camera.fuji_x.wrapper.command.IFujiXCommandCallback;
6 import net.osdn.gokigen.gr2control.camera.fuji_x.wrapper.command.IFujiXMessages;
7 import net.osdn.gokigen.gr2control.camera.fuji_x.wrapper.command.messages.FujiXCommandBase;
8
9 public class StartMessage3rd extends FujiXCommandBase
10 {
11     private final IFujiXCommandCallback callback;
12
13     public StartMessage3rd(@NonNull IFujiXCommandCallback callback)
14     {
15         this.callback = callback;
16     }
17
18     @Override
19     public IFujiXCommandCallback responseCallback()
20     {
21         return (callback);
22     }
23
24     @Override
25     public int getId()
26     {
27         return (IFujiXMessages.SEQ_START_3RD);
28     }
29
30     @Override
31     public byte[] commandBody()
32     {
33         return (new byte[] {
34                 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
35                 (byte)0x01, (byte)0x00,
36
37                 // message_header.type : two_part (0x1016) : SetDevicePropValue
38                 (byte)0x16, (byte)0x10,
39
40                 // sequence number
41                 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
42
43                 // data ...
44                 (byte)0x01, (byte)0xdf, (byte)0x00, (byte)0x00,
45         });
46     }
47
48     @Override
49     public byte[] commandBody2()
50     {
51         return (new byte[] {
52                 // message_header.index : uint16 (0: terminate, 2: two_part_message, 1: other)
53                 (byte)0x02, (byte)0x00,
54
55                 // message_header.type : two_part (0x1016) : SetDevicePropValue
56                 (byte)0x16, (byte)0x10,
57
58                 // sequence number
59                 (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
60
61                 // data ...
62                 (byte)0x05, (byte)0x00,
63
64         });
65     }
66 }