diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-18 10:27:24 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-18 10:27:24 -0700 |
commit | 97a189c51817a6b1d7a86aece8a91ff378488799 (patch) | |
tree | 9f47127dafa956ae6a8f98c818a9fbcef5432a5b /src/main/java/org/traccar/config/Keys.java | |
parent | 22bd8bcc80b850dc2308be50cf2886c39b0655da (diff) | |
download | trackermap-server-97a189c51817a6b1d7a86aece8a91ff378488799.tar.gz trackermap-server-97a189c51817a6b1d7a86aece8a91ff378488799.tar.bz2 trackermap-server-97a189c51817a6b1d7a86aece8a91ff378488799.zip |
Refactor attribute lookup
Diffstat (limited to 'src/main/java/org/traccar/config/Keys.java')
-rw-r--r-- | src/main/java/org/traccar/config/Keys.java | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java index 410947079..5909ae517 100644 --- a/src/main/java/org/traccar/config/Keys.java +++ b/src/main/java/org/traccar/config/Keys.java @@ -124,7 +124,8 @@ public final class Keys { */ public static final ConfigSuffix<Boolean> PROTOCOL_ACK = new BooleanConfigSuffix( ".ack", - List.of(KeyType.CONFIG)); + List.of(KeyType.CONFIG, KeyType.DEVICE), + false); /** * Ignore device reported fix time. Useful in case some devices report invalid time. Currently only available for @@ -269,6 +270,22 @@ public final class Keys { List.of(KeyType.CONFIG)); /** + * Use alternative format for the protocol of commands. + */ + public static final ConfigSuffix<Boolean> PROTOCOL_ALTERNATIVE = new BooleanConfigSuffix( + ".alternative", + List.of(KeyType.CONFIG, KeyType.DEVICE), + false); + + /** + * Protocol format includes a language field. + */ + public static final ConfigSuffix<Boolean> PROTOCOL_LANGUAGE = new BooleanConfigSuffix( + ".language", + List.of(KeyType.CONFIG, KeyType.DEVICE), + false); + + /** * Server wide connection timeout value in seconds. See protocol timeout for more information. */ public static final ConfigKey<Integer> SERVER_TIMEOUT = new IntegerConfigKey( @@ -945,6 +962,14 @@ public final class Keys { List.of(KeyType.CONFIG)); /** + * Ignore odometer value reported by the device and use server-calculated total distance instead. This is useful + * if device reports invalid or zero odometer values. + */ + public static final ConfigKey<Boolean> REPORT_IGNORE_ODOMETER = new BooleanConfigKey( + "report.ignoreOdometer", + List.of(KeyType.CONFIG)); + + /** * Boolean flag to enable or disable position filtering. */ public static final ConfigKey<Boolean> FILTER_ENABLE = new BooleanConfigKey( @@ -1120,6 +1145,14 @@ public final class Keys { List.of(KeyType.CONFIG)); /** + * List of attributes to copy. Attributes should be separated by a comma without any spacing. + * For example: alarm,ignition + */ + public static final ConfigKey<String> PROCESSING_COPY_ATTRIBUTES = new StringConfigKey( + "processing.copyAttributes", + List.of(KeyType.CONFIG, KeyType.DEVICE)); + + /** * Enable computed attributes processing. */ public static final ConfigKey<Boolean> PROCESSING_COMPUTED_ATTRIBUTES_DEVICE_ATTRIBUTES = new BooleanConfigKey( |