diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-08-21 22:38:58 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-08-21 22:38:58 -0700 |
commit | b90a8dc10826bc0fecc6833e44fd25433fc31081 (patch) | |
tree | 8e1480073f61c6be537860605ca4e4bc5f58810c /src/test/java/org/traccar/protocol | |
parent | b9875d4076a6c88b4da6d6b296f9496f525091fe (diff) | |
download | traccar-server-b90a8dc10826bc0fecc6833e44fd25433fc31081.tar.gz traccar-server-b90a8dc10826bc0fecc6833e44fd25433fc31081.tar.bz2 traccar-server-b90a8dc10826bc0fecc6833e44fd25433fc31081.zip |
Decode StarLink sensor data
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r-- | src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java index 459dad978..114a352e6 100644 --- a/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java @@ -11,6 +11,12 @@ public class StarLinkProtocolDecoderTest extends ProtocolTest { StarLinkProtocolDecoder decoder = new StarLinkProtocolDecoder(null); + decoder.setFormat("#EDT#,#EID#,#PDT#,#LAT#,#LONG#,#SPD#,#HEAD#,#ODO#,#LAC#,#CID#,#VIN#,#VBAT#,#TI1#,#TS1#,#TV1#,#TH1#,#TD1#,#EDSC#,#TI2#,#TS2#,#TV2#,#TH2#,#TD2#"); + + verifyAttribute(decoder, text( + "$SLU351580050356894,06,1192,200811104100,01,200811104058,+4121.8168,+00205.1158,000.0,069,000069,2080,15139043,12.221,03.533,D469062D44D6,1,29.7,56.9,CAEaBtRpBi1E1jhLSJoYKLkEINIEWABgAmgAcAJ4AIABAIgBAA==,Location,D2567108639E,1,30.2,55.3,CAIaBtJWcQhjnjhPSPIXKKkEINwEWEpgA2gAcAJ4AIABAIgBAA==,1,99*5A"), + "sensor2Voltage", 3058 * 0.001); + decoder.setFormat("#IMEI#,#EDT#,#PDT#,#LAT#,#LONG#,#SPD#,#IGN#,#ODO#,#DUR#,#TDUR#,#LAC#,#CID#,#VIN#,#VBAT#,#EID#,#EDSC#,#DRV#,#SATU#,#CSS#,#OUT1#,#OUT2#"); verifyAttribute(decoder, text( |