aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CellocatorProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-18 16:28:17 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-18 16:28:17 +1300
commitd5bd395f19ef5ed6732b32a0e8d0eb5e6a25c33e (patch)
tree8f19594583dbff0a2198d68751a05d9dee779d69 /src/org/traccar/protocol/CellocatorProtocol.java
parent4753e462767812712bafbc8e9985f355021c6f16 (diff)
downloadtrackermap-server-d5bd395f19ef5ed6732b32a0e8d0eb5e6a25c33e.tar.gz
trackermap-server-d5bd395f19ef5ed6732b32a0e8d0eb5e6a25c33e.tar.bz2
trackermap-server-d5bd395f19ef5ed6732b32a0e8d0eb5e6a25c33e.zip
Implement Cellocator output control
Diffstat (limited to 'src/org/traccar/protocol/CellocatorProtocol.java')
-rw-r--r--src/org/traccar/protocol/CellocatorProtocol.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CellocatorProtocol.java b/src/org/traccar/protocol/CellocatorProtocol.java
index bfaf03692..7c8510204 100644
--- a/src/org/traccar/protocol/CellocatorProtocol.java
+++ b/src/org/traccar/protocol/CellocatorProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@ import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.nio.ByteOrder;
import java.util.List;
@@ -28,6 +29,8 @@ public class CellocatorProtocol extends BaseProtocol {
public CellocatorProtocol() {
super("cellocator");
+ setSupportedCommands(
+ Command.TYPE_OUTPUT_CONTROL);
}
@Override
@@ -36,6 +39,7 @@ public class CellocatorProtocol extends BaseProtocol {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CellocatorFrameDecoder());
+ pipeline.addLast("objectEncoder", new CellocatorProtocolEncoder());
pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(CellocatorProtocol.this));
}
};
@@ -45,6 +49,7 @@ public class CellocatorProtocol extends BaseProtocol {
server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectEncoder", new CellocatorProtocolEncoder());
pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(CellocatorProtocol.this));
}
};