| | |
| | | package com.flightfeather.uav.socket.decoder |
| | | |
| | | import com.flightfeather.uav.socket.bean.DataUnit |
| | | import com.flightfeather.uav.socket.eunm.ObdCommandUnit |
| | | import com.flightfeather.uav.socket.eunm.AirCommandUnit |
| | | import java.util.* |
| | | |
| | | /** |
| | | * uav 第一层数据包解码器 |
| | |
| | | * 数据第一层结构定义如下: |
| | | * 起始字节 定义 |
| | | * 0 起始符 |
| | | * 2 命令单元 类型@see [ObdCommandUnit] |
| | | * 3 车辆识别号 |
| | | * 4 终端软件版本号 |
| | | * 21 数据加密方式 |
| | | * 22 数据单元长度 |
| | | * 24 数据单元 解码器@see [DataUnitDecoder] |
| | | * 倒数第1 校验码 |
| | | * 1 命令单元 类型@see [AirCommandUnit] |
| | | * 2 数据单元长度 |
| | | * 倒数第2 校验码 |
| | | */ |
| | | interface DataPackageDecoder { |
| | | |
| | |
| | | |
| | | fun getCommandUnit(b: List<String>): Int? |
| | | |
| | | fun getVinCode(b: List<String>): String? |
| | | fun getDeviceCode(b: List<String>): String? |
| | | |
| | | fun getSoftwareVersion(b: List<String>): Int? |
| | | |
| | | fun getEncryptionWay(b: List<String>): Int? |
| | | fun getDataTime(b: List<String>): Date |
| | | |
| | | fun getDataLength(b: List<String>): Int |
| | | |