From 0a12b325970079079946ad895d1a5a11265b3fe4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 10 Jan 2015 10:12:30 +1300 Subject: Add Ulbotech unit tests --- src/org/traccar/protocol/UlbotechProtocolDecoder.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/org/traccar/protocol/UlbotechProtocolDecoder.java index cf152ebc5..c5f63812e 100644 --- a/src/org/traccar/protocol/UlbotechProtocolDecoder.java +++ b/src/org/traccar/protocol/UlbotechProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.traccar.BaseProtocolDecoder; @@ -26,10 +25,8 @@ import org.traccar.helper.Log; import org.traccar.model.ExtendedInfoFormatter; import org.traccar.model.Position; -import java.util.Calendar; import java.util.Date; import java.util.Properties; -import java.util.TimeZone; public class UlbotechProtocolDecoder extends BaseProtocolDecoder { @@ -37,18 +34,6 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { super(dataManager, protocol, properties); } - private String readImei(ChannelBuffer buf) { - int b = buf.readUnsignedByte(); - StringBuilder imei = new StringBuilder(); - imei.append(b & 0x0F); - for (int i = 0; i < 7; i++) { - b = buf.readUnsignedByte(); - imei.append((b & 0xF0) >> 4); - imei.append(b & 0x0F); - } - return imei.toString(); - } - private static final short DATA_GPS = 0x01; private static final short DATA_LBS = 0x02; private static final short DATA_STATUS = 0x03; -- cgit v1.2.3