aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/OigoProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-21 05:11:01 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-21 05:11:01 +1200
commit277a28cd11a60246de96bcfb7be75e177f483809 (patch)
treed6115c1af0c675f4c6fc17f6891ec1554c198c79 /src/org/traccar/protocol/OigoProtocolDecoder.java
parent411edf2fecc6f5d2cceba20f06958f729ebcca54 (diff)
downloadtrackermap-server-277a28cd11a60246de96bcfb7be75e177f483809.tar.gz
trackermap-server-277a28cd11a60246de96bcfb7be75e177f483809.tar.bz2
trackermap-server-277a28cd11a60246de96bcfb7be75e177f483809.zip
Read event from OIGO messages
Diffstat (limited to 'src/org/traccar/protocol/OigoProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/OigoProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/OigoProtocolDecoder.java b/src/org/traccar/protocol/OigoProtocolDecoder.java
index 799f47ea3..bbea38183 100644
--- a/src/org/traccar/protocol/OigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/OigoProtocolDecoder.java
@@ -54,7 +54,7 @@ public class OigoProtocolDecoder extends BaseProtocolDecoder {
DeviceSession deviceSession;
switch (BitUtil.to(tag, 3)) {
case 0:
- String imei = ChannelBuffers.hexDump(buf.readBytes(9)).substring(1, 1 + 15);
+ String imei = ChannelBuffers.hexDump(buf.readBytes(8)).substring(1);
deviceSession = getDeviceSession(channel, remoteAddress, imei);
break;
case 1:
@@ -75,6 +75,8 @@ public class OigoProtocolDecoder extends BaseProtocolDecoder {
position.setProtocol(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
+ position.set(Position.KEY_EVENT, buf.readUnsignedByte());
+
int mask = buf.readInt();
if (BitUtil.check(mask, 0)) {