diff options
author | Radek Svanda <radek.svanda@elder.cz> | 2020-10-23 18:07:28 +0200 |
---|---|---|
committer | Radek Svanda <radek.svanda@elder.cz> | 2020-10-26 12:15:32 +0100 |
commit | e67e83731f80d12b86aac91337c9aab94bb6d4e6 (patch) | |
tree | c579695891d55cf747c405e17cb5d46b6a57537f /src/test/java/org/traccar/protocol | |
parent | 9188d67c08f309697fed0f4e452b06ea738a67bf (diff) | |
download | trackermap-server-e67e83731f80d12b86aac91337c9aab94bb6d4e6.tar.gz trackermap-server-e67e83731f80d12b86aac91337c9aab94bb6d4e6.tar.bz2 trackermap-server-e67e83731f80d12b86aac91337c9aab94bb6d4e6.zip |
Added support for JC400 alarm messages
Also a bit of code reuse included.
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r-- | src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java index 46d6a6dab..25d6870bc 100644 --- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java @@ -334,12 +334,21 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest { Position.KEY_ALARM, Position.ALARM_ACCELERATION); verifyAttribute(decoder, binary( - "78780c95130a0209321c90000112800d0a"), - "alarmValue", 1); + "78780c95130a0209321c91000112800d0a"), + Position.KEY_ALARM, Position.ALARM_BRAKING); verifyAttribute(decoder, binary( - "78780c95130a0209321c91000112800d0a"), + "78788b95140a060e2208055D4A800209D9C014c59100004556454e545f3335333337363131303032333139365f30303030303030305f323032305f31305f30365f31365f33345f30385f33322e6d70342c4556454e545f3335333337363131303032333139365f30303030303030305f323032305f31305f30365f31365f33345f30385f33312e6d70340000da360d0a"), Position.KEY_ALARM, Position.ALARM_BRAKING); + + verifyAttribute(decoder, binary( + "78788b95140a070c1434055D4A800209D9C014280100004556454e545f3335333337363131303032333139365f30303030303030305f323032305f31305f30375f31345f32305f35325f32342e6d70342c4556454e545f3335333337363131303032333139365f30303030303030305f323032305f31305f30375f31345f32305f35325f32332e6d7034003f6b260d0a"), + Position.KEY_ALARM, Position.ALARM_SOS); + + verifyAttribute(decoder, binary( + "78785195140a020c2914055D4A800209D9C014009300004556454e545f3335333337363131303032333139365f30303030303030305f323032305f31305f30325f31345f34315f32305f30352e6d70340004e3a60d0a"), + Position.KEY_ALARM, Position.ALARM_ACCIDENT); + } } |