aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/CarTrackProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/RitiProtocolDecoder.java2
-rwxr-xr-xsrc/org/traccar/protocol/SupermateProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java2
6 files changed, 7 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
index 94f5d208b..0952a0978 100644
--- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
@@ -74,7 +74,7 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder {
}
position.setDeviceId(deviceSession.getDeviceId());
- position.set("command", parser.next());
+ position.set(Position.KEY_COMMAND, parser.next());
DateBuilder dateBuilder = new DateBuilder()
.setTime(parser.nextInt(), parser.nextInt(), parser.nextInt(), parser.nextInt());
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index 688629063..c4baad5ab 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -77,7 +77,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
}
position.setDeviceId(deviceSession.getDeviceId());
- position.set("command", parser.next());
+ position.set(Position.KEY_COMMAND, parser.next());
position.setValid(parser.next().equals("A"));
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 356097fb2..bbba639c1 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -264,7 +264,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
if (commandLength > 0) {
buf.readUnsignedByte(); // server flag (reserved)
- position.set("command", buf.readBytes(commandLength - 1).toString(StandardCharsets.US_ASCII));
+ position.set(Position.KEY_COMMAND,
+ buf.readBytes(commandLength - 1).toString(StandardCharsets.US_ASCII));
}
} else if (isSupported(type)) {
diff --git a/src/org/traccar/protocol/RitiProtocolDecoder.java b/src/org/traccar/protocol/RitiProtocolDecoder.java
index 26aeb40f3..7f81ef09c 100644
--- a/src/org/traccar/protocol/RitiProtocolDecoder.java
+++ b/src/org/traccar/protocol/RitiProtocolDecoder.java
@@ -66,7 +66,7 @@ public class RitiProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
position.set("mode", buf.readUnsignedByte());
- position.set("command", buf.readUnsignedByte());
+ position.set(Position.KEY_COMMAND, buf.readUnsignedByte());
position.set(Position.KEY_POWER, buf.readUnsignedShort()); // mV
buf.skipBytes(5); // status
diff --git a/src/org/traccar/protocol/SupermateProtocolDecoder.java b/src/org/traccar/protocol/SupermateProtocolDecoder.java
index 7f12121bb..5e6615e9f 100755
--- a/src/org/traccar/protocol/SupermateProtocolDecoder.java
+++ b/src/org/traccar/protocol/SupermateProtocolDecoder.java
@@ -82,7 +82,7 @@ public class SupermateProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
position.set("commandId", parser.next());
- position.set("command", parser.next());
+ position.set(Position.KEY_COMMAND, parser.next());
position.setValid(parser.next().equals("A"));
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index 77211b7ab..e55d354cf 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -67,7 +67,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_TYPE, buf.readUnsignedByte());
- position.set("command", buf.readBytes(buf.readInt()).toString(StandardCharsets.US_ASCII));
+ position.set(Position.KEY_COMMAND, buf.readBytes(buf.readInt()).toString(StandardCharsets.US_ASCII));
}