aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/LdplProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/LdplProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/LdplProtocolDecoder.java50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/org/traccar/protocol/LdplProtocolDecoder.java b/src/org/traccar/protocol/LdplProtocolDecoder.java
index fec957281..52d7cd020 100644
--- a/src/org/traccar/protocol/LdplProtocolDecoder.java
+++ b/src/org/traccar/protocol/LdplProtocolDecoder.java
@@ -34,31 +34,31 @@ public class LdplProtocolDecoder extends BaseProtocolDecoder {
}
private static final Pattern PATTERN = new PatternBuilder()
- .text("*ID") // start of frame
- .number("(d+),") // command code
- .number("(d+),") // imei
- .number("(dd)(dd)(dd),") // current date
- .number("(dd)(dd)(dd),") // current time
- .expression("([A|V]),") // gps fix
- .number("(dd)(dd).?(d+),([NS]),") // latitude
- .number("(ddd)(dd).?(d+),([EW]),") // longitude
- .number("(d{1,3}.dd),") // speed
- .number("(d{1,3}.dd),") // course
- .number("(d{1,2}),") // sats
- .number("(d{1,3}),") // gsm signal strength
- .expression("([A|N|S]),") // vehicle status
- .expression("([0|1]),") // main power status
- .number("(d.dd),") // internal battery voltage
- .expression("([0|1]),") // sos alert
- .expression("([0|1]),") // body tamper
- .expression("([0|1])([0|1]),") // ac status + ign_status
- .expression("([0|1|2]),") // output1 status
- .number("(d{1,3}),") // adc1
- .number("(d{1,3}),") // adc2
- .expression("([0-9A-Z]{3}),") // software version
- .expression("([L|R]),") // message type
- .expression("([0-9A-Z]{4})#") // crc
- .compile();
+ .text("*ID") // start of frame
+ .number("(d+),") // command code
+ .number("(d+),") // imei
+ .number("(dd)(dd)(dd),") // current date
+ .number("(dd)(dd)(dd),") // current time
+ .expression("([A|V]),") // gps fix
+ .number("(dd)(dd).?(d+),([NS]),") // latitude
+ .number("(ddd)(dd).?(d+),([EW]),") // longitude
+ .number("(d{1,3}.dd),") // speed
+ .number("(d{1,3}.dd),") // course
+ .number("(d{1,2}),") // sats
+ .number("(d{1,3}),") // gsm signal strength
+ .expression("([A|N|S]),") // vehicle status
+ .expression("([0|1]),") // main power status
+ .number("(d.dd),") // internal battery voltage
+ .expression("([0|1]),") // sos alert
+ .expression("([0|1]),") // body tamper
+ .expression("([0|1])([0|1]),") // ac status + ign_status
+ .expression("([0|1|2]),") // output1 status
+ .number("(d{1,3}),") // adc1
+ .number("(d{1,3}),") // adc2
+ .expression("([0-9A-Z]{3}),") // software version
+ .expression("([L|R]),") // message type
+ .expression("([0-9A-Z]{4})#") // crc
+ .compile();
@Override
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {