aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Command.java1
-rw-r--r--src/org/traccar/model/Device.java4
-rw-r--r--src/org/traccar/model/Event.java1
-rw-r--r--src/org/traccar/model/Extensible.java6
4 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java
index 99525a02b..abca811a2 100644
--- a/src/org/traccar/model/Command.java
+++ b/src/org/traccar/model/Command.java
@@ -25,6 +25,7 @@ public class Command extends Extensible implements Factory {
public static final String TYPE_ALARM_ARM = "alarmArm";
public static final String TYPE_ALARM_DISARM = "alarmDisarm";
public static final String TYPE_SET_TIMEZONE = "setTimezone";
+ public static final String TYPE_REQUEST_PHOTO = "requestPhoto";
public static final String KEY_UNIQUE_ID = "uniqueId";
public static final String KEY_FREQUENCY = "frequency";
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 698505983..fd62cc691 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -54,6 +54,10 @@ public class Device implements Factory {
this.uniqueId = uniqueId;
}
+ public static final String STATUS_UNKNOWN = "unknown";
+ public static final String STATUS_ONLINE = "online";
+ public static final String STATUS_OFFLINE = "offline";
+
private String status;
public String getStatus() {
diff --git a/src/org/traccar/model/Event.java b/src/org/traccar/model/Event.java
index 172203a86..832e0e7c5 100644
--- a/src/org/traccar/model/Event.java
+++ b/src/org/traccar/model/Event.java
@@ -50,6 +50,7 @@ public abstract class Event extends Extensible {
public static final String KEY_DOOR = "door";
public static final String KEY_RPM = "rpm";
public static final String KEY_HOURS = "hours";
+ public static final String KEY_VIN = "vin";
public static final String KEY_OBD_SPEED = "obd-speed";
public static final String KEY_OBD_ODOMETER = "obd-odometer";
diff --git a/src/org/traccar/model/Extensible.java b/src/org/traccar/model/Extensible.java
index a821d0e43..40a286987 100644
--- a/src/org/traccar/model/Extensible.java
+++ b/src/org/traccar/model/Extensible.java
@@ -52,4 +52,10 @@ public abstract class Extensible extends Message {
}
}
+ public void add(Map.Entry<String, Object> entry) {
+ if (entry.getValue() != null) {
+ attributes.put(entry.getKey(), entry.getValue());
+ }
+ }
+
}