aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavigilProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-05-02 22:16:14 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-05-02 22:16:14 +1200
commit81beb5afb946d8c9ccfa2bbdfcfe884771a5bd3b (patch)
treece4d0b24f1c82381da30472844052f8cfdc1a164 /src/org/traccar/protocol/NavigilProtocolDecoder.java
parentf367b71b9c081416f6d64f6efd9844cd05f047ea (diff)
downloadtrackermap-server-81beb5afb946d8c9ccfa2bbdfcfe884771a5bd3b.tar.gz
trackermap-server-81beb5afb946d8c9ccfa2bbdfcfe884771a5bd3b.tar.bz2
trackermap-server-81beb5afb946d8c9ccfa2bbdfcfe884771a5bd3b.zip
Fix extended info XML format
Diffstat (limited to 'src/org/traccar/protocol/NavigilProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/NavigilProtocolDecoder.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/NavigilProtocolDecoder.java b/src/org/traccar/protocol/NavigilProtocolDecoder.java
index 58ea6e577..34642496a 100644
--- a/src/org/traccar/protocol/NavigilProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavigilProtocolDecoder.java
@@ -25,6 +25,7 @@ import org.traccar.BaseProtocolDecoder;
import org.traccar.ServerManager;
import org.traccar.helper.Crc;
import org.traccar.helper.Log;
+import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
public class NavigilProtocolDecoder extends BaseProtocolDecoder {
@@ -79,7 +80,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
private Position parseUnitReport(ChannelBuffer buf, long deviceId, int sequenceNumber) {
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>navigil</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("navigil");
position.setValid(true);
position.setId((long) sequenceNumber);
@@ -116,7 +117,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
private Position parseTg2Report(ChannelBuffer buf, long deviceId, int sequenceNumber) {
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>navigil</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("navigil");
position.setValid(true);
position.setId((long) sequenceNumber);
@@ -155,7 +156,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
private Position parsePositionReport(ChannelBuffer buf, long deviceId, int sequenceNumber, long timestamp) {
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>navigil</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("navigil");
position.setId((long) sequenceNumber);
position.setDeviceId(deviceId);
@@ -179,7 +180,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
private Position parsePositionReport2(ChannelBuffer buf, long deviceId, int sequenceNumber, long timestamp) {
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>navigil</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("navigil");
position.setId((long) sequenceNumber);
position.setDeviceId(deviceId);
@@ -206,7 +207,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
private Position parseSnapshot4(ChannelBuffer buf, long deviceId, int sequenceNumber) {
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>navigil</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("navigil");
position.setId((long) sequenceNumber);
position.setDeviceId(deviceId);
@@ -247,7 +248,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
private Position parseTrackingData(ChannelBuffer buf, long deviceId, int sequenceNumber, long timestamp) {
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>navigil</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("navigil");
position.setId((long) sequenceNumber);
position.setDeviceId(deviceId);