/**
 * 多语言类型
 */
export const enum LanguageType {
  ZH = 'zh',
  EN = 'en',
}

/**
 * 协议类型
 */
export const enum ProtocolType {
  ModbusRTU = 'ModbusRTU',
  ModbusTCP = 'ModbusTCP',
  S7 = 'S7',
}

/**
 * 协议配置方式
 */
export const enum ProtocolConfigMethod {
  ImportFromTemplate,
  ManuallyCreate,
}

/**
 * 协议识别结果
 */
export const enum ProtocolRecognitionResult {
  Success = '识别成功',
  Unrecognized = '无法识别',
  MultipleResults = '多个结果',
}

/**
 * 字典编码
 */
export const enum DictCode {
  AllProtocolType = 'all_protocol_type',
  ModbusProtocolType = 'modbus_protocol_type',
  S7ProtocolType = 's7_protocol_type',
  ProtocolTemplateFileName = 'protocol_template_file_name',
  BaudRate = 'baud_rate',
  ReadWriteType = 'read_write_type',
  WriteFuncCode = 'write_func_code',
  ReadFuncCode = 'read_func_code',
  ByteOrder = 'byte_order',
  AddrOrder = 'addr_order',
  ParsingType = 'parsing_type',
  IsHighFreqParam = 'is_high_freq_param',
  RegisterType = 'register_type',
  WordLength = 'word_length',
  ReadContinuousAddr = 'read_continuous_addr',
  AlarmCondition = 'alarm_condition',
  ExecutionAction = 'execution_action',
  AlarmRepeatTime = 'alarm_repeat_time',
  AlarmAlgOperator = 'alarm_alg_operator',
  AlarmDeviceState = 'alarm_device_state',
  AlarmNotifyMethod = 'alarm_notify_method',
  AlgTempCtrlMinStep = 'alg_temp_ctrl_min_step',
  AlgTempHumCollectPeriod = 'alg_temp_hum_collect_period',
  AlgWtTempCtrlMode = 'alg_wt_temp_ctrl_mode',
  AlgAlways = 'alg_always',
  AlgWtTempSetStep = 'alg_wt_temp_set_step',
  DcCsDType = 'dc_cs_d_type',
  DcCsCasType = 'dc_cs_cas_type',
  DcCsCoolingType = 'dc_cs_cooling_type',
  DcVfdType = 'dc_vfd_type',
  ParamAlgOperator = 'param_alg_operator',
  DataValidityPeriod = 'data_validity_period',
}

/**
 * 符合文件格式的内容类型（接口请求响应）
 */
export const fileContentTypeRegExp =
  /^(application\/(octet-stream|pdf|zip|x-tar|msword|vnd.openxmlformats-officedocument\.wordprocessingml\.document|vnd.ms-excel|vnd.openxmlformats-officedocument\.spreadsheetml\.sheet)|image\/|audio\/|video\/)/;

/**
 * 温湿度类型
 */
export const enum HumitureType {
  /**
   * 回风温湿度
   */
  ReturnAir,
  /**
   * 送风温湿度
   */
  SupplyAir,
  /**
   * 新风温湿度
   */
  FreshAir,
  /**
   * 室外温湿度
   */
  Outdoor,
  /**
   * 运行状态
   */
  OperatingStatus,
}

/**
 * 设备状态查询
 */
export const enum DeviceStatusQuery {
  All,
  Online,
  Offline,
}

/**
 * 设备运行状态
 */
export const enum DeviceRunningStatus {
  /**
   * 离线
   */
  Offline,
  /**
   * 停机
   */
  Stop,
  /**
   * 运行
   */
  Run,
}

/**
 * 时间范围预设
 */
export const enum TimeRangePreset {
  custom,
  recent1Day,
  recent7Day,
  recent30Day,
}

/**
 * 能效分析冷站数据类型
 */
export const enum CoolingDataType {
  /**
   * 冷站能效
   */
  ColdStationEfficiency = 1,
  /**
   * 冷量
   */
  CoolingCapacity = 2,
  /**
   * 功率
   */
  Power = 3,
  /**
   *  冷冻水流量
   */
  ChilledWaterFlow = 4,
}

/**
 * 时间尺度
 */
export const enum TimeScaleType {
  Hour,
  Day,
  Month,
}

/**
 * 可视化模板类型
 */
export const enum VisualModuleType {
  /**
   * 大屏
   */
  BigScreen,
  /**
   * 2D组态
   */
  Module2D,
  /**
   * 3D组态
   */
  Module3D,
}

/**
 * 控制柜 AI 智能启停类型
 */
export const enum CtrlCabinetStartType {
  /**
   * 全自动模式
   */
  FullAuto,
  /**
   * 半自动模式
   */
  HalfAuto,
  /**
   * 点动模式
   */
  Jog,
}
