aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gps103ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Gps103ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 9646a5e6c..344d985e9 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.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 Gps103ProtocolDecoder extends BaseProtocolDecoder {
@@ -85,7 +86,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
// Create new position
Position position = new Position();
- StringBuilder extendedInfo = new StringBuilder("<protocol>gps103</protocol>");
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("gps103");
Integer index = 1;
@@ -99,9 +100,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
}
// Alarm message
- extendedInfo.append("<alarm>");
- extendedInfo.append(parser.group(index++));
- extendedInfo.append("</alarm>");
+ extendedInfo.set("alarm", parser.group(index++));
// Date
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));