From 096259c2fe6311bde08b993b18631053b7652c99 Mon Sep 17 00:00:00 2001 From: Enrique Villafane Date: Wed, 9 Nov 2016 18:22:33 -0400 Subject: Add acc on, acc off and door alarm to events from coban gps (gps103 protocol) --- src/org/traccar/model/Position.java | 2 ++ src/org/traccar/protocol/Gps103ProtocolDecoder.java | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'src/org/traccar') diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java index 183fab72f..b2965c89c 100644 --- a/src/org/traccar/model/Position.java +++ b/src/org/traccar/model/Position.java @@ -83,6 +83,8 @@ public class Position extends Message { public static final String ALARM_LOW_BATTERY = "lowBattery"; public static final String ALARM_FAULT = "fault"; public static final String ALARM_POWER_OFF = "powerOff"; + public static final String ALARM_POWER_ON = "powerOn"; + public static final String ALARM_DOOR = "door"; public static final String ALARM_GEOFENCE = "geofence"; public static final String ALARM_GEOFENCE_ENTER = "geofenceEnter"; public static final String ALARM_GEOFENCE_EXIT = "geofenceExit"; diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 7754bd831..57dc784d3 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -113,6 +113,12 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { return Position.ALARM_MOVEMENT; case "speed": return Position.ALARM_OVERSPEED; + case "acc on": + return Position.ALARM_POWER_ON; + case "acc off": + return Position.ALARM_POWER_OFF; + case "door alarm": + return Position.ALARM_DOOR; default: return null; } -- cgit v1.2.3