aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MegastekProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-07 18:50:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-07 18:50:10 +1300
commitc344d4086bb2179d485c9b25af4d737e26f23221 (patch)
treef937934f07951e0ec8f8281528bd1ba9664c2d3f /src/org/traccar/protocol/MegastekProtocolDecoder.java
parent4a5961a98b0b6576e4c6553435a70a7bca3f9b44 (diff)
downloadtrackermap-server-c344d4086bb2179d485c9b25af4d737e26f23221.tar.gz
trackermap-server-c344d4086bb2179d485c9b25af4d737e26f23221.tar.bz2
trackermap-server-c344d4086bb2179d485c9b25af4d737e26f23221.zip
Rename pattern to upper case style
Diffstat (limited to 'src/org/traccar/protocol/MegastekProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MegastekProtocolDecoder.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/MegastekProtocolDecoder.java b/src/org/traccar/protocol/MegastekProtocolDecoder.java
index d3d12dd76..37bf5a0d4 100644
--- a/src/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -31,7 +31,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- private static final Pattern patternGPRMC = Pattern.compile(
+ private static final Pattern PATTERN_GPRMC = Pattern.compile(
"\\$GPRMC," +
"(\\d{2})(\\d{2})(\\d{2})\\.\\d+," + // Time (HHMMSS.SSS)
"([AV])," + // Validity
@@ -44,7 +44,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
"(\\d{2})(\\d{2})(\\d{2})" + // Date (DDMMYY)
".*"); // Checksum
- private static final Pattern patternSimple = Pattern.compile(
+ private static final Pattern PATTERN_SIMPLE = Pattern.compile(
"[FL]," + // Flag
"([^,]*)," + // Alarm
"imei:(\\d+)," + // IMEI
@@ -57,7 +57,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
"(\\p{XDigit}{4},\\p{XDigit}{4});" + // Location code
".+"); // Checksum
- private static final Pattern patternAlternative = Pattern.compile(
+ private static final Pattern PATTERN_ALTERNATIVE = Pattern.compile(
"(\\d+)," + // MCC
"(\\d+)," + // MNC
"(\\p{XDigit}{4},\\p{XDigit}{4})," + // Location code
@@ -75,7 +75,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
private boolean parseGPRMC(String gprmc, Position position) {
// Parse message
- Matcher parser = patternGPRMC.matcher(gprmc);
+ Matcher parser = PATTERN_GPRMC.matcher(gprmc);
if (!parser.matches()) {
return false;
}
@@ -181,7 +181,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
if (simple) {
- Matcher parser = patternSimple.matcher(status);
+ Matcher parser = PATTERN_SIMPLE.matcher(status);
if (parser.matches()) {
int index = 1;
@@ -225,7 +225,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
} else {
- Matcher parser = patternAlternative.matcher(status);
+ Matcher parser = PATTERN_ALTERNATIVE.matcher(status);
if (!parser.matches()) {
int index = 1;
@@ -255,7 +255,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
return position;
}
- private static final Pattern patternNew = Pattern.compile(
+ private static final Pattern PATTERN_NEW = Pattern.compile(
"\\$MGV\\d{3}," +
"(\\d+)," + // IMEI
"[^,]*," + // Name
@@ -293,7 +293,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
private Position decodeNew(Channel channel, String sentence) {
- Matcher parser = patternNew.matcher(sentence);
+ Matcher parser = PATTERN_NEW.matcher(sentence);
if (!parser.matches()) {
return null;
}