diff options
author | Anton Tananaev <anton@traccar.org> | 2022-03-18 20:37:47 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-03-18 20:37:47 -0700 |
commit | bcb2eb7db5f34cf1aa25024fa41f226f7d99a0c7 (patch) | |
tree | b0d10c9e0eb06acc3202fe3863915e4608cfe664 /src/main/java/org | |
parent | b0b9cdb254eb5031c744be1029d87aaf2802b674 (diff) | |
download | trackermap-server-bcb2eb7db5f34cf1aa25024fa41f226f7d99a0c7.tar.gz trackermap-server-bcb2eb7db5f34cf1aa25024fa41f226f7d99a0c7.tar.bz2 trackermap-server-bcb2eb7db5f34cf1aa25024fa41f226f7d99a0c7.zip |
Add TeraTrack response
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java index 634c18bcb..c36da2aed 100644 --- a/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TeraTrackProtocolDecoder.java @@ -18,6 +18,7 @@ package org.traccar.protocol; import io.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.NetworkMessage; import org.traccar.Protocol; import org.traccar.helper.UnitsConverter; import org.traccar.model.Position; @@ -68,6 +69,10 @@ public class TeraTrackProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY_LEVEL, Integer.parseInt(json.getString("Power"))); position.set(Position.KEY_RSSI, Integer.parseInt(json.getString("GSM"))); + if (channel != null && json.getString("MessageAck").equals("1")) { + channel.writeAndFlush(new NetworkMessage("{01}", remoteAddress)); + } + return position; } |