From e67e83731f80d12b86aac91337c9aab94bb6d4e6 Mon Sep 17 00:00:00 2001 From: Radek Svanda Date: Fri, 23 Oct 2020 18:07:28 +0200 Subject: Added support for JC400 alarm messages Also a bit of code reuse included. --- .../org/traccar/protocol/Gt06ProtocolDecoderTest.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/test/java/org/traccar/protocol') 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); + } } -- cgit v1.2.3