riku
2019-09-18 259512005923831d1221bd49568751bf519dc020
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.flightfeather.obd.socket.decoder
 
import com.flightfeather.obd.socket.bean.*
import com.flightfeather.obd.socket.eunm.ObdCommandUnit
import java.util.*
 
/**
 * obd 第二层数据单元解码器
 * @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?
 
}