OSDN Git Service

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