aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-04 02:27:57 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-04 02:27:57 +1200
commitb95d93b27e6b1b22db89aac994131bac26362123 (patch)
tree988bf03e4ce814f21706da216128148abef1782b /src/org/traccar/protocol
parentf594abe5da4399d3119175695e02e62b719c6ade (diff)
downloadtrackermap-server-b95d93b27e6b1b22db89aac994131bac26362123.tar.gz
trackermap-server-b95d93b27e6b1b22db89aac994131bac26362123.tar.bz2
trackermap-server-b95d93b27e6b1b22db89aac994131bac26362123.zip
Decode H02 additional data
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index b11a1e0e6..b78f21d8d 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -179,9 +179,12 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
.number("(x+),") // lac
.number("(x+)#") // cid
.or()
- .expression(",.*")
+ .number(",(d+),")
+ .number("(d+),")
+ .number("(d+),")
+ .number("(d+)#")
.or()
- .text("#")
+ .any()
.groupEnd()
.compile();
@@ -262,6 +265,12 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
position.setNetwork(new Network(CellTower.fromLacCid(parser.nextInt(16), parser.nextInt(16))));
}
+ if (parser.hasNext(4)) {
+ for (int i = 1; i <= 4; i++) {
+ position.set(Position.PREFIX_IO + i, parser.nextInt());
+ }
+ }
+
return position;
}