aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2014-10-21 15:00:55 -0400
committerjon-stumpf <jon.stumpf@gmail.com>2014-10-21 16:02:45 -0400
commit0d59336ac1fbe9934260e56811c3bcafa0aeaeca (patch)
tree57aea8c58bbd8d197d61e6b7013937c44f950de7 /src/org/traccar/protocol/GlobalSatProtocolDecoder.java
parentf0790eba6f3194daf4677c27e8259f783aae3207 (diff)
downloadtrackermap-server-0d59336ac1fbe9934260e56811c3bcafa0aeaeca.tar.gz
trackermap-server-0d59336ac1fbe9934260e56811c3bcafa0aeaeca.tar.bz2
trackermap-server-0d59336ac1fbe9934260e56811c3bcafa0aeaeca.zip
Updated BaseProtocolDecoder constructor to take three parameters (DataManager, String, Properties); Removed second constructor;
Diffstat (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index de49d0b85..5e86c1ce3 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -20,10 +20,11 @@ import java.util.Properties;
import java.util.TimeZone;
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.BaseProtocolDecoder;
-import org.traccar.ServerManager;
import org.traccar.database.DataManager;
import org.traccar.helper.Log;
import org.traccar.model.ExtendedInfoFormatter;
@@ -31,23 +32,19 @@ import org.traccar.model.Position;
public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
+ // Default values
private String format0 = "TSPRXAB27GHKLMnaicz*U!";
private String format1 = "SARY*U!";
- public GlobalSatProtocolDecoder(DataManager dataManager) {
- super(dataManager);
- }
-
- public GlobalSatProtocolDecoder(ServerManager serverManager, String protocol) {
- super(serverManager, protocol);
+ public GlobalSatProtocolDecoder(DataManager dataManager, String protocol, Properties properties) {
+ super(dataManager, protocol, properties);
- if (getServerManager() != null) {
- Properties p = getServerManager().getProperties();
- if (p.containsKey(protocol + ".format0")) {
- format0 = p.getProperty(protocol + ".format0");
+ if (properties != null) {
+ if (properties.containsKey(protocol + ".format0")) {
+ format0 = properties.getProperty(protocol + ".format0");
}
- if (p.containsKey(protocol + ".format1")) {
- format1 = p.getProperty(protocol + ".format1");
+ if (properties.containsKey(protocol + ".format1")) {
+ format1 = properties.getProperty(protocol + ".format1");
}
}
}