Implement Phase 1 tasks 1.5-1.7 + 1.9 (Codec 8/8E/16 parsers + fixture suite)
- Codec 8 parser (1-byte IO IDs, no NX/Generation Type) - Codec 8 Extended parser (2-byte IO IDs + variable-length NX section) - Codec 16 parser (mixed widths + Generation Type, supports IO IDs > 255) - Shared GPS element / timestamp helpers in gps-element.ts - Fixture loader with bigint/Buffer sentinel encoding and auto-discovery - 12 fixture pairs across codec8/8E/16 (canonical doc + synthetic edge cases) - Cross-checked Codec 8 against Traccar's TeltonikaProtocolDecoder (no discrepancies) 26 new tests. Total 62 passing across 10 test files. typecheck/lint/test/build all clean.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"positions": [
|
||||
{
|
||||
"device_id": "FIXTURE",
|
||||
"timestamp": "2019-06-10T11:36:32.000Z",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"altitude": 0,
|
||||
"angle": 0,
|
||||
"speed": 0,
|
||||
"satellites": 0,
|
||||
"priority": 1,
|
||||
"attributes": {
|
||||
"__event": 1,
|
||||
"1": 1,
|
||||
"17": 29,
|
||||
"16": 22949000,
|
||||
"11": "__bigint:893700218",
|
||||
"14": "__bigint:500686954"
|
||||
}
|
||||
}
|
||||
],
|
||||
"ack_record_count": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
8E010000016B412CEE000100000000000000000000000000000000010005000100010100010011001D00010010015E2C880002000B000000003544C87A000E000000001DD7E06A000001
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"positions": [
|
||||
{
|
||||
"device_id": "FIXTURE",
|
||||
"timestamp": "2019-06-10T10:04:46.000Z",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"altitude": 0,
|
||||
"angle": 0,
|
||||
"speed": 0,
|
||||
"satellites": 0,
|
||||
"priority": 1,
|
||||
"attributes": {
|
||||
"__event": 0,
|
||||
"1": "__buffer_b64:qw==",
|
||||
"2": "__buffer_b64:3q2+7wECAwQ=",
|
||||
"3": "__buffer_b64:YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foA=="
|
||||
}
|
||||
}
|
||||
],
|
||||
"ack_record_count": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
8E010000016B40D8EA3001000000000000000000000000000000000000030000000000000000000300010001AB00020008DEADBEEF01020304000300406162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA001
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"positions": [
|
||||
{
|
||||
"device_id": "FIXTURE",
|
||||
"timestamp": "2019-06-10T10:04:46.000Z",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"altitude": 0,
|
||||
"angle": 0,
|
||||
"speed": 0,
|
||||
"satellites": 0,
|
||||
"priority": 0,
|
||||
"attributes": {
|
||||
"__event": 0,
|
||||
"5": "__buffer_b64:"
|
||||
}
|
||||
}
|
||||
],
|
||||
"ack_record_count": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
8E010000016B40D8EA300000000000000000000000000000000000000001000000000000000000010005000001
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"positions": [
|
||||
{
|
||||
"device_id": "FIXTURE",
|
||||
"timestamp": "2019-06-10T10:04:46.000Z",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"altitude": 0,
|
||||
"angle": 0,
|
||||
"speed": 0,
|
||||
"satellites": 0,
|
||||
"priority": 0,
|
||||
"attributes": {
|
||||
"__event": 0,
|
||||
"7": "__buffer_b64:AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSor"
|
||||
}
|
||||
}
|
||||
],
|
||||
"ack_record_count": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
8E010000016B40D8EA300000000000000000000000000000000000000001000000000000000000010007012C000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B01
|
||||
Reference in New Issue
Block a user