package com.jiayue.ipfcst.common.data.constant.enums;

import com.jiayue.ipfcst.common.data.entity.BaseTunnelInfo;
import com.jiayue.ipfcst.common.data.entity.gathertunnelinfo.*;
import com.jiayue.ipfcst.common.data.entity.sendertunnelinfo.Sender104TcpTunnelInfo;
import com.jiayue.ipfcst.common.data.entity.sendertunnelinfo.SenderCdtRtuTunnelInfo;
import com.jiayue.ipfcst.common.data.entity.sendertunnelinfo.SenderModbusRtuTunnelInfo;
import com.jiayue.ipfcst.common.data.entity.sendertunnelinfo.SenderModbusTcpTunnelInfo;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 通道的类型
 *
 * @author 修唯xiuwei
 * @version 3.0
 */
@Getter
@AllArgsConstructor
public enum TunnelType {


  /**
   * 通道类型枚举
   */
  MODBUSTCPMASTER("modbusTCP采集", "in", GatherModbusTcpTunnelInfo.class),
  /**
   * modbusRTU采集
   */
  MODBUSRTUMASTER("modbusRTU采集", "in", GatherModbusRtuTunnelInfo.class),
  /**
   * IEC104TCP采集
   */
  IEC104TCPMASTER("IEC104TCP采集", "in", Gather104TcpTunnelInfo.class),
  /**
   * CDTRTU采集
   */
  CDTRTUMASTER("CDTRTU采集", "in",GatherCdtRtuTunnelInfo.class),
  /**
   * modbusTCP转发
   */
  MODBUSTCPSLAVE("modbusTCP转发", "out", SenderModbusTcpTunnelInfo.class),
  /**
   * modbusRTU转发
   */
  MODBUSRTUSLAVE("modbusRTU转发", "out", SenderModbusRtuTunnelInfo.class),
  /**
   * IEC104TCP转发
   */
  IEC104TCPSLAVE("IEC104TCP转发", "out", Sender104TcpTunnelInfo.class),
  /**
   * CDTRTU转发
   */
  CDTRTUSLAVE("CDTRTU转发", "out", SenderCdtRtuTunnelInfo.class),

  /**
   * 隔离文件解析 暂时将这种传输方式视为一种通道
   * 因为如果视为另一种数据源 点表页面将很难展示
   */
  FILEPARSE("穿隔离文件解析", "in", FileParseTunnelInfo.class),


  TCPSERVERASMODBUSMASTER("TcpServer扮演RtuMaster","in",GatherModbusRtuWithTcpServerTunnelInfo.class),

  TCPCLIENTASMODBUSMASTER("TcpClient扮演RtuMaster","in",GatherModbusRtuWithTcpClientTunnelInfo.class);


  /**
   * 通道的类型描述
   */
  private String cnDescribe;


  /**
   * 流向
   */
  private String flow;


  private  Class<? extends BaseTunnelInfo>  tunnelInfoClazz;


}
