package com.wdkl.app.ncs.callingbed.helper;

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

public class DoorLightHelper {

    public static void handleDoorLight(TcpModel tcpModel) {
        if (TcpAction.SideAction.CALL == tcpModel.getAction()
            || TcpAction.SideAction.SOS_CALL == tcpModel.getAction()) {
            //门灯红色闪烁
            SerialPortHelper.setDoorLight(1, "200"); //红色闪烁
        } else if (TcpAction.SideAction.ACCEPT == tcpModel.getAction()
            || TcpAction.SideAction.CANCEL == tcpModel.getAction()
            || TcpAction.SideAction.SOS_CANCEL == tcpModel.getAction()) {
            SerialPortHelper.setDoorLight(1, "111"); //白色
        }
    }
}
