aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-04-11 09:56:59 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-04-11 09:56:59 +1200
commit662b552ba75c874ca1f1d67310f7004eb5da1991 (patch)
tree9ded9ac15160cd90a3d816b393eaceebf78ba10f /src/org/traccar/ServerManager.java
parent956e0c36b779ebe5b4cd753d6eca2d47caae9670 (diff)
downloadtrackermap-server-662b552ba75c874ca1f1d67310f7004eb5da1991.tar.gz
trackermap-server-662b552ba75c874ca1f1d67310f7004eb5da1991.tar.bz2
trackermap-server-662b552ba75c874ca1f1d67310f7004eb5da1991.zip
Add support for CalAmp protocol
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 23a587340..238cd808e 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -182,6 +182,7 @@ public class ServerManager {
initAutoFon45Server("autofon45");
initBceServer("bce");
initXirgoServer("xirgo");
+ initCalAmpServer("calamp");
initProtocolDetector();
@@ -1353,4 +1354,15 @@ public class ServerManager {
}
}
+ private void initCalAmpServer(final String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectDecoder", new CalAmpProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}