rts-sim-module/consts/iscs.go

34 lines
1.1 KiB
Go
Raw Permalink Normal View History

package consts
// DeviceExceptionEnum 设备例外枚举定义
2023-12-22 15:00:34 +08:00
type DeviceExceptionEnum int8
const (
DeviceExceptionNon DeviceExceptionEnum = iota
DeviceCommunicationInterrupt //通信中断
DeviceAbnormal //异常
DeviceFault //故障 有预告信号产生
DeviceAlarm //报警 有事故信号产生
DeviceStartTimeout //启动超时
2023-12-14 13:33:18 +08:00
DeviceModuleFault //模块故障
)
2023-12-19 11:11:27 +08:00
2023-12-22 15:29:57 +08:00
func (e *DeviceExceptionEnum) Non() bool {
return *e == DeviceExceptionNon
}
2023-12-19 11:11:27 +08:00
// DevicePlacingEnum 设备置牌枚举定义
2023-12-22 15:00:34 +08:00
type DevicePlacingEnum int8
2023-12-19 11:11:27 +08:00
const (
DevicePlacingNon DevicePlacingEnum = iota
DevicePlacingOverhaulCard //设备置牌:检修
DevicePlacingLandingCard //设备置牌:接地
DevicePlacingHand //设备置牌:就地(手型牌)
DevicePlacingOtherCard //设备置牌:其他
)
2023-12-22 15:29:57 +08:00
func (p *DevicePlacingEnum) Non() bool {
return *p == DevicePlacingNon
}