aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CalAmpProtocolDecoder.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-05-26 09:30:43 +0500
committerAbyss777 <abyss@fox5.ru>2016-05-26 09:30:43 +0500
commitaa12e5c750e771016545269ffa39409b06b47eee (patch)
treed21b4414b532bfc53c9a905f3caa09f70b43b59e /src/org/traccar/protocol/CalAmpProtocolDecoder.java
parentac2405f0d57fac51fe95aa755f90fe82f26f73bc (diff)
downloadtrackermap-server-aa12e5c750e771016545269ffa39409b06b47eee.tar.gz
trackermap-server-aa12e5c750e771016545269ffa39409b06b47eee.tar.bz2
trackermap-server-aa12e5c750e771016545269ffa39409b06b47eee.zip
- Simplification of the hierarchy of models classes
- Removed automatically founded unnecessary imports
Diffstat (limited to 'src/org/traccar/protocol/CalAmpProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CalAmpProtocolDecoder.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/CalAmpProtocolDecoder.java b/src/org/traccar/protocol/CalAmpProtocolDecoder.java
index 292666c31..69fca3914 100644
--- a/src/org/traccar/protocol/CalAmpProtocolDecoder.java
+++ b/src/org/traccar/protocol/CalAmpProtocolDecoder.java
@@ -21,7 +21,6 @@ import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
import org.traccar.helper.UnitsConverter;
-import org.traccar.model.Event;
import org.traccar.model.Position;
import java.net.SocketAddress;
@@ -86,35 +85,35 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder {
}
if (type == MSG_MINI_EVENT_REPORT) {
- position.set(Event.KEY_SATELLITES, buf.getUnsignedByte(buf.readerIndex()) & 0xf);
+ position.set(Position.KEY_SATELLITES, buf.getUnsignedByte(buf.readerIndex()) & 0xf);
position.setValid((buf.readUnsignedByte() & 0x20) == 0);
} else {
- position.set(Event.KEY_SATELLITES, buf.readUnsignedByte());
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
position.setValid((buf.readUnsignedByte() & 0x08) == 0);
}
if (type != MSG_MINI_EVENT_REPORT) {
position.set("carrier", buf.readUnsignedShort());
- position.set(Event.KEY_GSM, buf.readShort());
+ position.set(Position.KEY_GSM, buf.readShort());
}
position.set("modem", buf.readUnsignedByte());
if (type != MSG_MINI_EVENT_REPORT) {
- position.set(Event.KEY_HDOP, buf.readUnsignedByte());
+ position.set(Position.KEY_HDOP, buf.readUnsignedByte());
}
- position.set(Event.KEY_INPUT, buf.readUnsignedByte());
+ position.set(Position.KEY_INPUT, buf.readUnsignedByte());
if (type != MSG_MINI_EVENT_REPORT) {
- position.set(Event.KEY_STATUS, buf.readUnsignedByte());
+ position.set(Position.KEY_STATUS, buf.readUnsignedByte());
}
if (type == MSG_EVENT_REPORT || type == MSG_MINI_EVENT_REPORT) {
if (type != MSG_MINI_EVENT_REPORT) {
buf.readUnsignedByte(); // event index
}
- position.set(Event.KEY_EVENT, buf.readUnsignedByte());
+ position.set(Position.KEY_EVENT, buf.readUnsignedByte());
}
int accType = BitUtil.from(buf.getUnsignedByte(buf.readerIndex()), 6);