Files
lingniu-vehicle-ingest/protocol-gb32960/src/test/resources/samples/gb32960
lingniu-dev 064ecc479c chore: initial import of lingniu-vehicle-ingest
Multi-module Spring Boot ingest service for vehicle telemetry. Modules:

- ingest-api / ingest-core / ingest-codec-common: shared SPI, dispatcher,
  Disruptor event bus, BCC/BCD codec helpers
- protocol-gb32960: GB/T 32960.3 inbound (Netty + per-version parser
  packages v2016/v2025), platform login auth, VIN whitelist, idle handler
- protocol-jt808 / protocol-jt1078 / protocol-jsatl12: JT/T inbound
- inbound-mqtt / inbound-xinda-push: alternative ingest channels
- session-core: per-channel session state
- sink-archive / sink-mq: persistence sinks (local file / Kafka)
- command-gateway: terminal control command gateway
- bootstrap-all: aggregator Spring Boot app
- observability: Micrometer / Actuator wiring

Includes hex-dump golden samples under protocol-gb32960/src/test/resources
and the GB/T 32960.3-2016 / 2025 reference PDFs under reference/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 16:08:57 +08:00
..

GB/T 32960 黄金样本集

本目录用于回放测试与双跑对账。所有样本从旧服务 lingniu-vehicle-data-reception 线上抓包后脱敏VIN 替换为 LTEST<序号>XXXXXXXX)。

文件命名

<命令类型>_<场景>_<序号>.hex

命令类型取自 CommandType 枚举:

  • vehicle_login (0x01)
  • realtime_report (0x02)
  • resend_report (0x03)
  • vehicle_logout (0x04)
  • heartbeat (0x07)

文件格式

每个 .hex 文件是一行紧凑十六进制,字节之间无分隔符。 行首允许以 # 开头写注释,测试代码忽略注释行与空行。

示例 realtime_report_basic_001.hex:

# 2017-05-21 10:00:00 宇通 YT01SOC 70%,车速 52.3 km/h
2323020000010203040506070809101112131415160100352016051510000001010012350000037102710000A064010505050A0005010A00102003E8...

新增样本步骤

  1. 从生产抓包工具tcpdump / rg-samples导出一帧完整字节0x23 0x23 起始和 BCC 尾)
  2. VIN 替换为测试段:LTEST0000<9位序号>
  3. 放入本目录,文件名按规范
  4. Gb32960DecoderGoldenTest 中添加断言(期望 VIN / 命令 / 关键字段)
  5. 运行 mvn -pl protocol-gb32960 test

验证目标

  • 100% 解析一致性(新服务解析结果 === 旧服务解析结果)
  • BCC 校验通过
  • 事件映射字段单位一致(车速 km/h、里程 km、经纬度十进制度