package com.imdroid.sideslope.service;

import com.imdroid.secapi.dto.GnssStatus;
import com.imdroid.sideslope.message.D342LocationMessage;
import com.imdroid.sideslope.message.D3F0SelfCheckMessage;
import com.imdroid.sideslope.message.D3F2StopIndicationMessage;
import com.imdroid.sideslope.sal.Device;

/**
 * 设备数据持久化接口，保存：
 * 1）消息内容：自检消息、停止消息、配置消息和应答
 * 2）设备状态：解析自检消息
 * 3）收发统计：解析停止消息，以及channel收发统计
 *
 * @author LiGang
 */
public interface DataPersistService {

    GnssStatus getDeviceState(String deviceId);
    void updateDeviceState(GnssStatus gnssStatus);
    void saveDeviceState(D3F0SelfCheckMessage d3F0SelfCheckMessage);
    void saveDeviceTrxStat(D3F2StopIndicationMessage d3F2StopIndicationMessage, boolean isUploading, Device device);

    void saveD342Stat(D342LocationMessage message, Device device);
}
