diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-29 16:15:11 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-29 16:15:11 +1200 |
commit | 4dc04ca89ccdc4a63a4c454baa3bb4bc58829951 (patch) | |
tree | 86413fe3f51f1f66374aad7f56db03e8a4d483e3 /src | |
parent | 87d893cb122ea94e57e91a46b71278e5ba886d7c (diff) | |
download | trackermap-server-4dc04ca89ccdc4a63a4c454baa3bb4bc58829951.tar.gz trackermap-server-4dc04ca89ccdc4a63a4c454baa3bb4bc58829951.tar.bz2 trackermap-server-4dc04ca89ccdc4a63a4c454baa3bb4bc58829951.zip |
Add more command types
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/model/Command.java | 5 | ||||
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolEncoder.java | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index 4558d31ce..842cceac4 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -27,10 +27,11 @@ public class Command implements Factory { public static final String TYPE_POSITION_STOP = "positionStop"; public static final String TYPE_ENGINE_STOP = "engineStop"; public static final String TYPE_ENGINE_RESUME = "engineResume"; - + public static final String TYPE_ALARM_ARM = "alarmArm"; + public static final String TYPE_ALARM_DISARM = "alarmDisarm"; + public static final String KEY_UNIQUE_ID = "uniqueId"; public static final String KEY_FREQUENCY = "frequency"; public static final String KEY_DEVICE_PASSWORD = "devicePassword"; - } diff --git a/src/org/traccar/protocol/Gps103ProtocolEncoder.java b/src/org/traccar/protocol/Gps103ProtocolEncoder.java index df0b50954..147451e3b 100644 --- a/src/org/traccar/protocol/Gps103ProtocolEncoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolEncoder.java @@ -51,6 +51,10 @@ public class Gps103ProtocolEncoder extends StringProtocolEncoder implements Stri return formatCommand(command, "**,imei:{%s},J;", Command.KEY_UNIQUE_ID); case Command.TYPE_ENGINE_RESUME: return formatCommand(command, "**,imei:{%s},K;", Command.KEY_UNIQUE_ID); + case Command.TYPE_ALARM_ARM: + return formatCommand(command, "**,imei:{%s},L;", Command.KEY_UNIQUE_ID); + case Command.TYPE_ALARM_DISARM: + return formatCommand(command, "**,imei:{%s},M;", Command.KEY_UNIQUE_ID); } return null; |