aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GatorProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 12:10:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 12:10:58 +1300
commit2e69800d0d83e3d0486b0ca0cecde7d2a451c105 (patch)
tree25307a6528d081d43de0c13e7a2f044a4dd7b7e3 /src/org/traccar/protocol/GatorProtocolDecoder.java
parent3f5aef83e284a1c4f4e608d57d7f3330af6ea12a (diff)
downloadtrackermap-server-2e69800d0d83e3d0486b0ca0cecde7d2a451c105.tar.gz
trackermap-server-2e69800d0d83e3d0486b0ca0cecde7d2a451c105.tar.bz2
trackermap-server-2e69800d0d83e3d0486b0ca0cecde7d2a451c105.zip
Make protocol message types public
Diffstat (limited to 'src/org/traccar/protocol/GatorProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GatorProtocolDecoder.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/org/traccar/protocol/GatorProtocolDecoder.java b/src/org/traccar/protocol/GatorProtocolDecoder.java
index 7bf0a2633..2dfc2e56a 100644
--- a/src/org/traccar/protocol/GatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/GatorProtocolDecoder.java
@@ -34,17 +34,17 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- private static final int PACKET_HEARTBEAT = 0x21;
- private static final int PACKET_POSITION_DATA = 0x80;
- private static final int PACKET_ROLLCALL_RESPONSE = 0x81;
- private static final int PACKET_ALARM_DATA = 0x82;
- private static final int PACKET_TERMINAL_STATUS = 0x83;
- private static final int PACKET_MESSAGE = 0x84;
- private static final int PACKET_TERMINAL_ANSWER = 0x85;
- private static final int PACKET_BLIND_AREA = 0x8E;
- private static final int PACKET_PICTURE_FRAME = 0x54;
- private static final int PACKET_CAMERA_RESPONSE = 0x56;
- private static final int PACKET_PICTURE_DATA = 0x57;
+ public static final int MSG_HEARTBEAT = 0x21;
+ public static final int MSG_POSITION_DATA = 0x80;
+ public static final int MSG_ROLLCALL_RESPONSE = 0x81;
+ public static final int MSG_ALARM_DATA = 0x82;
+ public static final int MSG_TERMINAL_STATUS = 0x83;
+ public static final int MSG_MESSAGE = 0x84;
+ public static final int MSG_TERMINAL_ANSWER = 0x85;
+ public static final int MSG_BLIND_AREA = 0x8E;
+ public static final int MSG_PICTURE_FRAME = 0x54;
+ public static final int MSG_CAMERA_RESPONSE = 0x56;
+ public static final int MSG_PICTURE_DATA = 0x57;
@Override
protected Object decode(
@@ -63,10 +63,10 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(), buf.readUnsignedByte());
id = id.replaceFirst("^0+(?!$)", "");
- if (type == PACKET_POSITION_DATA ||
- type == PACKET_ROLLCALL_RESPONSE ||
- type == PACKET_ALARM_DATA ||
- type == PACKET_BLIND_AREA) {
+ if (type == MSG_POSITION_DATA ||
+ type == MSG_ROLLCALL_RESPONSE ||
+ type == MSG_ALARM_DATA ||
+ type == MSG_BLIND_AREA) {
// Create new position
Position position = new Position();