diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-14 16:41:04 +0300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-14 16:41:04 +0300 |
commit | 8030d39ca0522bc8be69e017fa9fc06900d1a7bc (patch) | |
tree | cb3fcf7125c09c291dba92dab340147dac4b7525 /src/org/traccar/protocol | |
parent | 15b5ac0768ee7236d1af025460a3bdd4f8fa6994 (diff) | |
download | traccar-server-8030d39ca0522bc8be69e017fa9fc06900d1a7bc.tar.gz traccar-server-8030d39ca0522bc8be69e017fa9fc06900d1a7bc.tar.bz2 traccar-server-8030d39ca0522bc8be69e017fa9fc06900d1a7bc.zip |
Use lower camel-case for attributes
Diffstat (limited to 'src/org/traccar/protocol')
6 files changed, 40 insertions, 40 deletions
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java index ff5a1aa20..23397b51c 100644 --- a/src/org/traccar/protocol/AplicomProtocolDecoder.java +++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java @@ -133,52 +133,52 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { switch (buf.readInt()) { case 0x20D: position.set(Position.KEY_RPM, ChannelBuffers.swapShort(value.readShort())); - position.set("diesel-temperature", ChannelBuffers.swapShort(value.readShort()) * 0.1); - position.set("battery-voltage", ChannelBuffers.swapShort(value.readShort()) * 0.01); - position.set("supply-air-temp-dep1", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("dieselTemperature", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("batteryVoltage", ChannelBuffers.swapShort(value.readShort()) * 0.01); + position.set("supplyAirTempDep1", ChannelBuffers.swapShort(value.readShort()) * 0.1); break; case 0x30D: - position.set("active-alarm", ChannelBuffers.hexDump(value)); + position.set("activeAlarm", ChannelBuffers.hexDump(value)); break; case 0x40C: - position.set("air-temp-dep1", ChannelBuffers.swapShort(value.readShort()) * 0.1); - position.set("air-temp-dep2", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("airTempDep1", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("airTempDep2", ChannelBuffers.swapShort(value.readShort()) * 0.1); break; case 0x40D: - position.set("cold-unit-state", ChannelBuffers.hexDump(value)); + position.set("coldUnitState", ChannelBuffers.hexDump(value)); break; case 0x50C: - position.set("defrost-temp-dep1", ChannelBuffers.swapShort(value.readShort()) * 0.1); - position.set("defrost-temp-dep2", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("defrostTempDep1", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("defrostTempDep2", ChannelBuffers.swapShort(value.readShort()) * 0.1); break; case 0x50D: - position.set("condenser-pressure", ChannelBuffers.swapShort(value.readShort()) * 0.1); - position.set("suction-pressure", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("condenserPressure", ChannelBuffers.swapShort(value.readShort()) * 0.1); + position.set("suctionPressure", ChannelBuffers.swapShort(value.readShort()) * 0.1); break; case 0x58C: value.readByte(); value.readShort(); // index switch (value.readByte()) { case 0x01: - position.set("setpoint-zone1", ChannelBuffers.swapInt(value.readInt()) * 0.1); + position.set("setpointZone1", ChannelBuffers.swapInt(value.readInt()) * 0.1); break; case 0x02: - position.set("setpoint-zone2", ChannelBuffers.swapInt(value.readInt()) * 0.1); + position.set("setpointZone2", ChannelBuffers.swapInt(value.readInt()) * 0.1); break; case 0x05: - position.set("unit-type", ChannelBuffers.swapInt(value.readInt())); + position.set("unitType", ChannelBuffers.swapInt(value.readInt())); break; case 0x13: - position.set("diesel-hours", ChannelBuffers.swapInt(value.readInt()) / 60 / 60); + position.set("dieselHours", ChannelBuffers.swapInt(value.readInt()) / 60 / 60); break; case 0x14: - position.set("electric-hours", ChannelBuffers.swapInt(value.readInt()) / 60 / 60); + position.set("electricHours", ChannelBuffers.swapInt(value.readInt()) / 60 / 60); break; case 0x17: - position.set("service-indicator", ChannelBuffers.swapInt(value.readInt())); + position.set("serviceIndicator", ChannelBuffers.swapInt(value.readInt())); break; case 0x18: - position.set("software-version", ChannelBuffers.swapInt(value.readInt()) * 0.01); + position.set("softwareVersion", ChannelBuffers.swapInt(value.readInt()) * 0.01); break; default: break; @@ -223,7 +223,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { int event = buf.readUnsignedByte(); position.set(Position.KEY_EVENT, event); - position.set("event-info", buf.readUnsignedByte()); + position.set("eventInfo", buf.readUnsignedByte()); if ((selector & 0x0008) != 0) { position.setValid((buf.readUnsignedByte() & 0x40) != 0); diff --git a/src/org/traccar/protocol/FoxProtocolDecoder.java b/src/org/traccar/protocol/FoxProtocolDecoder.java index fa14e7029..0a47f7ed1 100644 --- a/src/org/traccar/protocol/FoxProtocolDecoder.java +++ b/src/org/traccar/protocol/FoxProtocolDecoder.java @@ -117,7 +117,7 @@ public class FoxProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_OUTPUT, parser.nextInt(2)); position.set(Position.KEY_ODOMETER, parser.nextInt()); - position.set("status-data", parser.next()); + position.set("statusData", parser.next()); return position; diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index 670b9fa96..cadc188d6 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -329,11 +329,11 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_RPM, parser.next()); position.set(Position.KEY_OBD_SPEED, parser.next()); position.set(Position.PREFIX_TEMP + 1, parser.next()); - position.set("fuel-consumption", parser.next()); - position.set("dtcs-cleared-distance", parser.next()); - position.set("odb-connect", parser.next()); - position.set("dtcs-number", parser.next()); - position.set("dtcs-codes", parser.next()); + position.set("fuelConsumption", parser.next()); + position.set("dtcsClearedDistance", parser.next()); + position.set("odbConnect", parser.next()); + position.set("dtcsNumber", parser.next()); + position.set("dtcsCodes", parser.next()); position.set(Position.KEY_THROTTLE, parser.next()); position.set(Position.KEY_FUEL, parser.next()); position.set(Position.KEY_OBD_ODOMETER, parser.next()); diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java index 81b6b8f76..f2208984c 100644 --- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java +++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java @@ -146,7 +146,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_RFID, eventData); break; default: - position.set("event-data", eventData); + position.set("eventData", eventData); break; } } diff --git a/src/org/traccar/protocol/TzoneProtocolDecoder.java b/src/org/traccar/protocol/TzoneProtocolDecoder.java index be4919dc2..9caf77b0c 100644 --- a/src/org/traccar/protocol/TzoneProtocolDecoder.java +++ b/src/org/traccar/protocol/TzoneProtocolDecoder.java @@ -174,8 +174,8 @@ public class TzoneProtocolDecoder extends BaseProtocolDecoder { if (blockLength > 0) { - position.set("passengers-on", buf.readUnsignedMedium()); - position.set("passengers-off", buf.readUnsignedMedium()); + position.set("passengersOn", buf.readUnsignedMedium()); + position.set("passengersOff", buf.readUnsignedMedium()); } diff --git a/src/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/org/traccar/protocol/UlbotechProtocolDecoder.java index 36fb23f9a..d97e8b339 100644 --- a/src/org/traccar/protocol/UlbotechProtocolDecoder.java +++ b/src/org/traccar/protocol/UlbotechProtocolDecoder.java @@ -90,28 +90,28 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { int value = buf.readUnsignedByte(); if (BitUtil.check(value, 0)) { - position.set("rapid-acceleration", true); + position.set("rapidAcceleration", true); } if (BitUtil.check(value, 1)) { - position.set("rough-braking", true); + position.set("roughBraking", true); } if (BitUtil.check(value, 2)) { - position.set("harsh-course", true); + position.set("harshCourse", true); } if (BitUtil.check(value, 3)) { - position.set("no-warm-up", true); + position.set("noWarmUp", true); } if (BitUtil.check(value, 4)) { - position.set("long-idle", true); + position.set("longIdle", true); } if (BitUtil.check(value, 5)) { - position.set("fatigue-driving", true); + position.set("fatigueDriving", true); } if (BitUtil.check(value, 6)) { - position.set("rough-terrain", true); + position.set("roughTerrain", true); } if (BitUtil.check(value, 7)) { - position.set("high-rpm", true); + position.set("highRpm", true); } } @@ -215,8 +215,8 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { break; case DATA_GEOFENCE: - position.set("geofence-in", buf.readUnsignedInt()); - position.set("geofence-alarm", buf.readUnsignedInt()); + position.set("geofenceIn", buf.readUnsignedInt()); + position.set("geofenceAlarm", buf.readUnsignedInt()); break; case DATA_OBD2: @@ -224,7 +224,7 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { break; case DATA_FUEL: - position.set("fuel-consumption", buf.readUnsignedInt() / 10000.0); + position.set("fuelConsumption", buf.readUnsignedInt() / 10000.0); break; case DATA_OBD2_ALARM: @@ -255,7 +255,7 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { case DATA_EVENT: position.set(Position.KEY_EVENT, buf.readUnsignedByte()); if (length > 1) { - position.set("event-mask", buf.readUnsignedInt()); + position.set("eventMask", buf.readUnsignedInt()); } break; |