aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/WialonProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/WialonProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/WialonProtocolDecoder.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java
index c3ea94624..cb89693f7 100644
--- a/src/org/traccar/protocol/WialonProtocolDecoder.java
+++ b/src/org/traccar/protocol/WialonProtocolDecoder.java
@@ -24,6 +24,7 @@ import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.ServerManager;
import org.traccar.helper.Log;
+import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
public class WialonProtocolDecoder extends BaseProtocolDecoder {
@@ -93,7 +94,7 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
// Create new position
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>wialon</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("wialon");
position.setDeviceId(deviceId);
Integer index = 1;
@@ -133,9 +134,7 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
// Satellites
int satellites = Integer.valueOf(parser.group(index++));
position.setValid(satellites >= 3);
- extendedInfo.append("<satellites>");
- extendedInfo.append(satellites);
- extendedInfo.append("</satellites>");
+ extendedInfo.set("satellites", satellites);
// Extended info
position.setExtendedInfo(extendedInfo.toString());