aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MeiligaoProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-01-13 22:06:03 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-01-13 22:06:03 +1300
commit59b108d8e06e5ee54087d43ec08bf4744cb58680 (patch)
tree9ef22663a4ab19dfe88724918f22e910e20a729f /src/org/traccar/protocol/MeiligaoProtocolEncoder.java
parent0b0236a81c9c3579293f342810867da31ee2a7a2 (diff)
downloadtrackermap-server-59b108d8e06e5ee54087d43ec08bf4744cb58680.tar.gz
trackermap-server-59b108d8e06e5ee54087d43ec08bf4744cb58680.tar.bz2
trackermap-server-59b108d8e06e5ee54087d43ec08bf4744cb58680.zip
Implement Meiligao output control commands
Diffstat (limited to 'src/org/traccar/protocol/MeiligaoProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolEncoder.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocolEncoder.java b/src/org/traccar/protocol/MeiligaoProtocolEncoder.java
index 84b9b642d..e8c62e502 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolEncoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolEncoder.java
@@ -31,6 +31,7 @@ public class MeiligaoProtocolEncoder extends BaseProtocolEncoder {
public static final int MSG_TRACK_ON_DEMAND = 0x4101;
public static final int MSG_TRACK_BY_INTERVAL = 0x4102;
public static final int MSG_MOVEMENT_ALARM = 0x4106;
+ public static final int MSG_OUTPUT_CONTROL = 0x4115;
public static final int MSG_TIME_ZONE = 0x4132;
public static final int MSG_REBOOT_GPS = 0x4902;
@@ -69,6 +70,12 @@ public class MeiligaoProtocolEncoder extends BaseProtocolEncoder {
case Command.TYPE_POSITION_PERIODIC:
content.writeShort(((Number) attributes.get(Command.KEY_FREQUENCY)).intValue() / 10);
return encodeContent(command.getDeviceId(), MSG_TRACK_BY_INTERVAL, content);
+ case Command.TYPE_ENGINE_STOP:
+ content.writeByte(0x00);
+ return encodeContent(command.getDeviceId(), MSG_OUTPUT_CONTROL, content);
+ case Command.TYPE_ENGINE_RESUME:
+ content.writeByte(0x01);
+ return encodeContent(command.getDeviceId(), MSG_OUTPUT_CONTROL, content);
case Command.TYPE_MOVEMENT_ALARM:
content.writeShort(((Number) attributes.get(Command.KEY_RADIUS)).intValue());
return encodeContent(command.getDeviceId(), MSG_MOVEMENT_ALARM, content);