From b4a655445b6ad7a0ef96193a616f8bdec182ca54 Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Mon, 21 Jan 2019 23:17:04 +0300 Subject: Naming convention fix --- src/org/traccar/protocol/NavisProtocolDecoder.java | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'src/org/traccar/protocol/NavisProtocolDecoder.java') diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java index 93e751012..ed2562125 100644 --- a/src/org/traccar/protocol/NavisProtocolDecoder.java +++ b/src/org/traccar/protocol/NavisProtocolDecoder.java @@ -91,7 +91,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { } } - private ParseResult parseNTCBPosition(DeviceSession deviceSession, ByteBuf buf) { + private ParseResult parseNtcbPosition(DeviceSession deviceSession, ByteBuf buf) { Position position = new Position(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); @@ -278,13 +278,13 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { return new ParseResult(index, position); } - private Object processNTCBSingle(DeviceSession deviceSession, Channel channel, ByteBuf buf) { - ParseResult result = parseNTCBPosition(deviceSession, buf); + private Object processNtcbSingle(DeviceSession deviceSession, Channel channel, ByteBuf buf) { + ParseResult result = parseNtcbPosition(deviceSession, buf); ByteBuf response = Unpooled.buffer(7); response.writeCharSequence("* positions = new LinkedList<>(); int count = buf.readUnsignedByte(); for (int i = 0; i < count; i++) { - Position position = parseNTCBPosition(deviceSession, buf).getPosition(); + Position position = parseNtcbPosition(deviceSession, buf).getPosition(); if (position.getFixTime() != null) { positions.add(position); } @@ -307,7 +307,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { ByteBuf response = Unpooled.buffer(7); response.writeCharSequence("* positions = new LinkedList<>(); int count = buf.readUnsignedByte(); @@ -563,7 +563,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { ByteBuf response = Unpooled.buffer(6); response.writeCharSequence(flexHeader, StandardCharsets.US_ASCII); response.writeByte(count); - sendFLEXReply(channel, response); + sendFlexReply(channel, response); if (positions.isEmpty()) { return null; @@ -572,7 +572,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { return positions; } - private Object processFLEXNegotiation(Channel channel, ByteBuf buf) { + private Object processFlexNegotiation(Channel channel, ByteBuf buf) { if ((byte) buf.readUnsignedByte() != (byte) 0xB0) { return null; } @@ -604,7 +604,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { response.writeByte(0xB0); response.writeByte(flexProtocolVersion); response.writeByte(flexStructVersion); - sendNTCBReply(channel, response); + sendNtcbReply(channel, response); return null; } @@ -612,7 +612,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { private Object processHandshake(Channel channel, SocketAddress remoteAddress, ByteBuf buf) { buf.skipBytes(1); // Colon symbol if (getDeviceSession(channel, remoteAddress, buf.toString(StandardCharsets.US_ASCII)) != null) { - sendNTCBReply(channel, Unpooled.copiedBuffer("*A" - return processNTCBArray(deviceSession, channel, buf); + return processNtcbArray(deviceSession, channel, buf); case 0x543E2A: // "*>T" - return processNTCBSingle(deviceSession, channel, buf); + return processNtcbSingle(deviceSession, channel, buf); case 0x463E2A: // "*>F" (*>FLEX) buf.skipBytes(3); - return processFLEXNegotiation(channel, buf); + return processFlexNegotiation(channel, buf); default: break; } @@ -735,7 +735,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { return null; } - public int getFLEXDataSize() { + public int getFlexDataSize() { return flexDataSize; } } -- cgit v1.2.3