aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/TotemProtocol.java
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2022-01-04 20:20:21 +0100
committerMatjaž Črnko <m.crnko@txt.si>2022-01-04 20:20:21 +0100
commitd00eb7ebfdaf15bb9ec32011fc7953325f568e0a (patch)
tree5450546ca9a8111ffde6b549b813aa507eec0986 /src/main/java/org/traccar/protocol/TotemProtocol.java
parent36202715301e365af212112d22059125adaea92a (diff)
downloadtrackermap-server-d00eb7ebfdaf15bb9ec32011fc7953325f568e0a.tar.gz
trackermap-server-d00eb7ebfdaf15bb9ec32011fc7953325f568e0a.tar.bz2
trackermap-server-d00eb7ebfdaf15bb9ec32011fc7953325f568e0a.zip
feat: Totem - basic support for SMS and GPRS commands
Diffstat (limited to 'src/main/java/org/traccar/protocol/TotemProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/TotemProtocol.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/TotemProtocol.java b/src/main/java/org/traccar/protocol/TotemProtocol.java
index 7cf30475b..ecf7c858a 100644
--- a/src/main/java/org/traccar/protocol/TotemProtocol.java
+++ b/src/main/java/org/traccar/protocol/TotemProtocol.java
@@ -25,7 +25,7 @@ import org.traccar.model.Command;
public class TotemProtocol extends BaseProtocol {
public TotemProtocol() {
- setSupportedDataCommands(
+ String[] supportedCommands = new String[]{
Command.TYPE_CUSTOM,
Command.TYPE_REBOOT_DEVICE,
Command.TYPE_FACTORY_RESET,
@@ -33,7 +33,12 @@ public class TotemProtocol extends BaseProtocol {
Command.TYPE_POSITION_SINGLE,
Command.TYPE_ENGINE_RESUME,
Command.TYPE_ENGINE_STOP
- );
+ };
+ setSupportedDataCommands(supportedCommands);
+
+ setTextCommandEncoder(new TotemProtocolSmsEncoder(this));
+ setSupportedTextCommands(supportedCommands);
+
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {