aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/model/Position.java1
-rw-r--r--src/org/traccar/protocol/CellocatorProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/TmgProtocolDecoder.java2
4 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 96dc1d2ad..54c97c373 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -61,6 +61,7 @@ public class Position extends Message {
public static final String KEY_GEOFENCE = "geofence";
public static final String KEY_ACCELERATION = "acceleration";
public static final String KEY_DEVICE_TEMP = "deviceTemp";
+ public static final String KEY_OPERATOR = "operator";
public static final String KEY_DTCS = "dtcs";
public static final String KEY_OBD_SPEED = "obdSpeed";
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
index c0f871f80..ce43cce37 100644
--- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
@@ -126,7 +126,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder {
operator <<= 8;
operator += buf.readUnsignedByte();
- position.set("operator", operator);
+ position.set(Position.KEY_OPERATOR, operator);
position.set(Position.PREFIX_ADC + 1, buf.readUnsignedInt()); // ADC
position.set(Position.KEY_ODOMETER, buf.readUnsignedMedium()); // Odometer
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index a9679f764..77211b7ab 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -178,7 +178,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(locationMask, 7)) {
- position.set("operator", buf.readUnsignedInt());
+ position.set(Position.KEY_OPERATOR, buf.readUnsignedInt());
}
} else {
diff --git a/src/org/traccar/protocol/TmgProtocolDecoder.java b/src/org/traccar/protocol/TmgProtocolDecoder.java
index 40ce04c5b..a0459a161 100644
--- a/src/org/traccar/protocol/TmgProtocolDecoder.java
+++ b/src/org/traccar/protocol/TmgProtocolDecoder.java
@@ -129,7 +129,7 @@ public class TmgProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_HDOP, parser.nextDouble());
position.set(Position.KEY_SATELLITES, parser.nextInt());
position.set(Position.KEY_SATELLITES_VISIBLE, parser.nextInt());
- position.set("operator", parser.next());
+ position.set(Position.KEY_OPERATOR, parser.next());
position.set(Position.KEY_RSSI, parser.nextInt());
position.set(Position.KEY_IGNITION, parser.nextInt() == 1);
position.set(Position.KEY_BATTERY, parser.nextDouble());