aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-29 11:27:46 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-29 11:27:46 -0800
commitd97c43c29e96503d1ba943ec780cd6f8d419a0dd (patch)
tree8cd2be61ecd202afda031822ec555e6e64ff45d2 /src/main/java/org/traccar/config
parentc0dee04079cb2edb855e6eeeab9cb6f1b43fa465 (diff)
downloadtrackermap-server-d97c43c29e96503d1ba943ec780cd6f8d419a0dd.tar.gz
trackermap-server-d97c43c29e96503d1ba943ec780cd6f8d419a0dd.tar.bz2
trackermap-server-d97c43c29e96503d1ba943ec780cd6f8d419a0dd.zip
Migrate remaining int keys
Diffstat (limited to 'src/main/java/org/traccar/config')
-rw-r--r--src/main/java/org/traccar/config/Config.java5
-rw-r--r--src/main/java/org/traccar/config/Keys.java28
2 files changed, 28 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/config/Config.java b/src/main/java/org/traccar/config/Config.java
index 54e6efd06..815a6e86a 100644
--- a/src/main/java/org/traccar/config/Config.java
+++ b/src/main/java/org/traccar/config/Config.java
@@ -112,11 +112,6 @@ public class Config {
}
}
- @Deprecated
- public int getInteger(String key) {
- return getInteger(key, 0);
- }
-
public int getInteger(ConfigKey<Integer> key, int defaultValue) {
return getInteger(key.getKey(), defaultValue);
}
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java
index f1efa7515..3f09190a1 100644
--- a/src/main/java/org/traccar/config/Keys.java
+++ b/src/main/java/org/traccar/config/Keys.java
@@ -45,6 +45,20 @@ public final class Keys {
Collections.singletonList(KeyType.GLOBAL));
/**
+ * Default protocol mask to use. Currently used only by Skypatrol protocol.
+ */
+ public static final ConfigSuffix<Integer> PROTOCOL_MASK = new ConfigSuffix<>(
+ ".mask",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * Custom message length. Currently used only by H2 protocol for specifying binary message length.
+ */
+ public static final ConfigSuffix<Integer> PROTOCOL_MESSAGE_LENGTH = new ConfigSuffix<>(
+ ".messageLength",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
* Server wide connection timeout value in seconds. See protocol timeout for more information.
*/
public static final ConfigKey<Integer> SERVER_TIMEOUT = new ConfigKey<>(
@@ -751,6 +765,20 @@ public final class Keys {
Collections.singletonList(KeyType.GLOBAL));
/**
+ * Default MCC value to use if device doesn't report MCC.
+ */
+ public static final ConfigKey<Integer> GEOLOCATION_MCC = new ConfigKey<>(
+ "geolocation.mcc",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * Default MNC value to use if device doesn't report MNC.
+ */
+ public static final ConfigKey<Integer> GEOLOCATION_MNC = new ConfigKey<>(
+ "geolocation.mnc",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
* Boolean flag to enable speed limit API to get speed limit values depending on location. Default value is false.
*/
public static final ConfigKey<Boolean> SPEED_LIMIT_ENABLE = new ConfigKey<>(