Hi my friend
I have a new device (Portman NT1000) this is the string
$PTMLA,865609020890069,A,170428163331,N2726.7180W09938.4055,90,194,NA,09820020,NA,108,9,47765.98,16,GNA
what listener can i use?
this is the parse
// 0 $PTMLA
// 1 ID = 860998025525449
// 2 GPS Valid = A,B,L
// 3 Date = 160729165920
// 4 Lat/Long = N2541.5278W10027.1167
// 5 Speed = 0
// 6 Orientation = 114
// 7 Temp = NA
// 8 Entradas = 00820000
// 9 RFID = NA
// 10 Event = 253
// 11 Satelites = 0
// 12 Odometer = 3.00
// 13 GS Signal = 15
// 14 OIL High = GNA
And this is how i'm parsing now but its fail with his error:
WARN: [7B106717] error - No match found - IllegalStateException (... < Parser:61 < NT1000ProtocolDecoder:134 < ExtendedObjectDecoder:58 < ...)
private static final Pattern PATTERN = new PatternBuilder()
.text("$PTMLA,")
.number("(d+),")
.expression("([AV]),")
.number("(d+),")
.expression("([NS])")
.number("(dd)(dd.d+)")
.expression("([EW])")
.number("(ddd)(dd.d+),")
.number("(d+.?d*)?,?")
.number("(d+.?d*)?,?")
.text("NA,")
.text("(d+),")
.text("NA,")
.number("(d+),")
.text("(d+),")
.number("(d+.?d*)?,?")
.number("(d+),")
.any().optional()
.compile();
Can you help me?
What im doing wrong?
thanks a lot
GR
Hi my friend
I have a new device (Portman NT1000) this is the string
this is the parse
And this is how i'm parsing now but its fail with his error:
private static final Pattern PATTERN = new PatternBuilder() .text("$PTMLA,") .number("(d+),") // imei .expression("([AV]),") // validity .number("(d+),") // DateTime .expression("([NS])") .number("(dd)(dd.d+)") // latitude .expression("([EW])") .number("(ddd)(dd.d+),") // longitude .number("(d+.?d*)?,?") // speed .number("(d+.?d*)?,?") // course .text("NA,") // Thermo .text("(d+),") // Inputs .text("NA,") // rfid .number("(d+),") // Event .text("(d+),") // satellite .number("(d+.?d*)?,?") // odo .number("(d+),") // signal .any().optional() .compile();
Can you help me?
What im doing wrong?
thanks a lot
GR