package com.flightfeather.uav.socket.decoder
|
|
import com.flightfeather.uav.socket.bean.*
|
import com.flightfeather.uav.socket.eunm.ObdCommandUnit
|
import java.util.*
|
|
/**
|
* uav 第二层数据单元解码器
|
* @author riku
|
* Date: 2019/9/12
|
*
|
* 数据单元按照命令单元的类型共有以下几种类型:
|
* 命令单元 @see [ObdCommandUnit]
|
* 编码(byte) 定义
|
* 0x01 车辆登入
|
* 0x02 实时信息上报
|
* 0x03 补发信息上报
|
* 0x04 车辆登出
|
* 0x05 终端校时
|
* 0x06~0x7f 上行数据系统预留
|
*/
|
interface DataUnitDecoder {
|
|
fun getCarRegisterData(b: List<String>): List<CarRegisterData>
|
|
fun getRealTimeData(b: List<String>): List<RealTimeData>
|
|
fun getReplacementData(b: List<String>): List<ReplacementData>
|
|
fun getCarLogOutData(b: List<String>): List<CarLogOutData>
|
|
fun getTimeCalibrationData(b: List<String>): List<TimeCalibrationData>
|
|
fun decodeDataTime(b: List<String>): Date?
|
|
}
|