diff options
author | Anton Tananaev <anton@traccar.org> | 2023-03-27 20:05:05 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-03-27 20:05:05 -0700 |
commit | c68e92043cb52f859de724781f2e5774c60d465b (patch) | |
tree | 90854306ce71f69bd951c84bf10d2dd6f050461d /src/test/java/org/traccar | |
parent | 1d1fc57b3dd44013bd467a825b970ac06749e125 (diff) | |
download | trackermap-server-c68e92043cb52f859de724781f2e5774c60d465b.tar.gz trackermap-server-c68e92043cb52f859de724781f2e5774c60d465b.tar.bz2 trackermap-server-c68e92043cb52f859de724781f2e5774c60d465b.zip |
Add HuaSheng output control
Diffstat (limited to 'src/test/java/org/traccar')
-rw-r--r-- | src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java index b44f6e89c..c320d4aa9 100644 --- a/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java +++ b/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java @@ -11,7 +11,17 @@ public class HuaShengProtocolEncoderTest extends ProtocolTest { var encoder = inject(new HuaShengProtocolEncoder(null)); - Command command = new Command(); + Command command; + + command = new Command(); + command.setDeviceId(1); + command.setType(Command.TYPE_OUTPUT_CONTROL); + command.set(Command.KEY_INDEX, 1); + command.set(Command.KEY_DATA, "1"); + + verifyCommand(encoder, command, binary("c00000000daa1600000000000101c0")); + + command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_POSITION_PERIODIC); command.set(Command.KEY_FREQUENCY, 60); |