package com.wdkl.ncs.android.middleware.tcp.channel;

import android.os.Build;

import com.wdkl.ncs.android.middleware.BuildConfig;
import com.wdkl.ncs.android.middleware.tcp.dto.DeviceConnectDTO;
import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel;
import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction;
import com.wdkl.ncs.android.middleware.tcp.enums.TcpType;

public class DeviceUtil {
    public static TcpModel deviceConnect(String mac){
        TcpModel tcpModel = new TcpModel();
        DeviceConnectDTO connectDTO = new DeviceConnectDTO();
        connectDTO.setIdentification(mac);
        connectDTO.setHardware_version(Build.PRODUCT.toLowerCase());
        connectDTO.setSoftware_version("V"+ BuildConfig.VERSION_NAME);
        connectDTO.setModel(Build.MODEL);
        connectDTO.setCode(Build.SERIAL);
        tcpModel.setType(TcpType.DEVICE);
        tcpModel.setAction(TcpAction.DeviceAction.CONNECT);
        tcpModel.setData(connectDTO);
        return tcpModel;
    }
}
