diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-06 22:45:48 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-06 22:45:48 -0800 |
commit | d21747209c9092e3cd693a872d38b9fac8fb1abc (patch) | |
tree | 120dfc817e6efdf5b7a15389f8eb11135e0d5f8a /src/main/java/org/traccar/protocol/AdmProtocolDecoder.java | |
parent | a9745c6b14a0b6f48e57b9055c0977d814b46e28 (diff) | |
download | trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.gz trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.bz2 trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.zip |
Satellite protocol support
Diffstat (limited to 'src/main/java/org/traccar/protocol/AdmProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/AdmProtocolDecoder.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java b/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java index 52d1439ed..31064286e 100644 --- a/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/AdmProtocolDecoder.java @@ -178,6 +178,10 @@ public class AdmProtocolDecoder extends BaseProtocolDecoder { protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { ByteBuf buf = (ByteBuf) msg; + if (Character.isDigit(buf.getUnsignedByte(buf.readerIndex()))) { + getDeviceSession(channel, remoteAddress, buf.readSlice(15).toString(StandardCharsets.UTF_8)); + } + buf.readUnsignedShortLE(); // device id int size = buf.readUnsignedByte(); |