From 1948e0f63202dddca607dcb51fa9a92a83e49154 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Fri, 10 Oct 2014 19:23:21 -0400 Subject: Eliminated the need for hardcoded protocol strings in the src/org/traccar/protocol/*ProtocolDecoder.java files. --- src/org/traccar/protocol/CellocatorProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol/CellocatorProtocolDecoder.java') diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java index 7e55a6865..8cce47bd5 100644 --- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java +++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java @@ -34,6 +34,10 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder { super(serverManager); } + public CellocatorProtocolDecoder(ServerManager serverManager, String protocol) { + super(serverManager, protocol); + } + private String readImei(ChannelBuffer buf) { int b = buf.readUnsignedByte(); StringBuilder imei = new StringBuilder(); @@ -103,7 +107,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder { // Parse location if (type == MSG_CLIENT_STATUS) { Position position = new Position(); - ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("cellocator"); + ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter(getProtocol()); // Device identifier try { -- cgit v1.2.3