diff options
Diffstat (limited to 'src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java')
-rw-r--r-- | src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java index 7fd7cc599..023beaeeb 100644 --- a/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java @@ -12,6 +12,18 @@ public class HuabaoProtocolDecoderTest extends ProtocolTest { var decoder = inject(new HuabaoProtocolDecoder(null)); verifyAttribute(decoder, binary( + "7e02000033017051564189000c00000000000c00020158ff7206cd1f4c000000000123201122115639010400000000300143310114930100e3060064019a0000557e"), + Position.KEY_BATTERY_LEVEL, 100); + + verifyAttribute(decoder, binary( + "7e020000520198080908740af300000000000c000f016602a302c662f802fc000000cc24051618132401040000020f30011e310109f30100610204b056020acd5d0b0102d40379b8011423033c51108017ffffffffffffffffffffffffffffc87e"), + Position.PREFIX_TEMP + 1, -32745); + + verifyAttribute(decoder, binary( + "7e020000460100503769640002000001000000001a01b9eaf804d8ee86001800000000240507035152010400000000300100310107eb1c00060089fffffffe000400ce0000000c00b28942310221007544309f5f7e"), + Position.KEY_ICCID, "8942310221007544309"); + + verifyAttribute(decoder, binary( "7E0200005300959000194400080000000000000003015DA64806CCB4A8001100000000230816014137010400005B3F30011F310112EB29000C00B28986049910219020787400060089FFFFFFFF000600C5FFFFFFEF0004002D0F4E000300A84CE07E"), Position.KEY_BATTERY_LEVEL, 76); @@ -219,6 +231,14 @@ public class HuabaoProtocolDecoderTest extends ProtocolTest { verifyNull(decoder, binary( "7e0002000004304832546500b7ca7e")); + verifyAttribute(decoder, binary( + "7E020000964130564801050048000000001000004F01651E2E02CAEC3802E80000001524062616002101040000000330011F31010EF1040000308CF231414F56585F564C3330302D4C415F48322E315F4547393135554C4141425230334130324D30385F56322E312E305F763130F3011FF400F5080000000000000001F6084008FFFFFFFD0009F70600000E870246F912000F000000010000062A00082406261600184D7E"), + Position.KEY_CHARGE, true); + + verifyAttribute(decoder, binary( + "7E020000964130564801050048000000001000004F01651E2E02CAEC3802E80000001524062616002101040000000330011F31010EF1040000308CF231414F56585F564C3330302D4C415F48322E315F4547393135554C4141425230334130324D30385F56322E312E305F763130F3011FF400F5080000000000000001F6084008FFFFFFFD0009F70600000E870246F912000F000000010000062A00082406261600184D7E"), + Position.KEY_POWER, 12.428); + } } |