rts-sim-module/component/iscs.go
2023-12-19 11:11:27 +08:00

40 lines
1.2 KiB
Go

package component
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/consts"
)
// DeviceException 设备异常
type DeviceException struct {
Exception consts.DeviceExceptionEnum //具体异常
}
// DevicePlacing 设备置牌
type DevicePlacing struct {
Placing consts.DevicePlacingEnum
}
var (
DeviceExceptionType = ecs.NewComponentType[DeviceException]() //设备异常组件
DevicePlacingType = ecs.NewComponentType[DevicePlacing]() //设备置牌组件
)
// 设备例外标签定义
var (
DeviceCommunicationInterruptTag = ecs.NewTag() //通信中断
DeviceAbnormalTag = ecs.NewTag() //异常
DeviceFaultTag = ecs.NewTag() //故障 有预告信号产生
DeviceAlarmTag = ecs.NewTag() //报警 有事故信号产生
DeviceStartTimeoutTag = ecs.NewTag() //启动超时
DeviceModuleFaultTag = ecs.NewTag() //模块故障
)
// 设备置牌标签定义
var (
DevicePlacingOverhaulCardTag = ecs.NewTag() //设备置牌:检修
DevicePlacingLandingCardTag = ecs.NewTag() //设备置牌:接地
DevicePlacingHandTag = ecs.NewTag() //设备置牌:就地(手型牌)
DevicePlacingOtherCardTag = ecs.NewTag() //设备置牌:其他
)