aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MeitrackProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-15 00:19:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-15 00:19:39 +1300
commitb5bd3e35f563825c9d40eaa04c02bc6397029219 (patch)
tree05684875856d3908fdec3c582ecbf2153a5bdfb8 /src/org/traccar/protocol/MeitrackProtocolDecoder.java
parent38fbc3e872717a1179abd00a48b600b489f9fead (diff)
downloadtrackermap-server-b5bd3e35f563825c9d40eaa04c02bc6397029219.tar.gz
trackermap-server-b5bd3e35f563825c9d40eaa04c02bc6397029219.tar.bz2
trackermap-server-b5bd3e35f563825c9d40eaa04c02bc6397029219.zip
Pass ServerManager to every protocol decoder
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index 6bb9a915f..87d222c37 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -21,21 +21,21 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.traccar.GenericProtocolDecoder;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.ServerManager;
import org.traccar.helper.Log;
-import org.traccar.model.DataManager;
import org.traccar.model.Position;
/**
* Meitrack protocol decoder
*/
-public class MeitrackProtocolDecoder extends GenericProtocolDecoder {
+public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
/**
* Initialize
*/
- public MeitrackProtocolDecoder(DataManager dataManager) {
- super(dataManager);
+ public MeitrackProtocolDecoder(ServerManager serverManager) {
+ super(serverManager);
}
/**
@@ -94,11 +94,11 @@ public class MeitrackProtocolDecoder extends GenericProtocolDecoder {
extendedInfo.append("<event>");
extendedInfo.append(parser.group(index++));
extendedInfo.append("</event>");
-
+
// Coordinates
position.setLatitude(Double.valueOf(parser.group(index++)));
position.setLongitude(Double.valueOf(parser.group(index++)));
-
+
// Time
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
time.clear();
@@ -109,10 +109,10 @@ public class MeitrackProtocolDecoder extends GenericProtocolDecoder {
time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++)));
time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));
position.setTime(time.getTime());
-
+
// Validity
position.setValid(parser.group(index++).compareTo("A") == 0 ? true : false);
-
+
// Satellites
extendedInfo.append("<satellites>");
extendedInfo.append(parser.group(index++));
@@ -136,7 +136,7 @@ public class MeitrackProtocolDecoder extends GenericProtocolDecoder {
// Altitude
position.setAltitude(Double.valueOf(parser.group(index++)));
-
+
// Milage
extendedInfo.append("<milage>");
extendedInfo.append(parser.group(index++));