rts-sim-module/component/iscs_acs.go

28 lines
628 B
Go
Raw Normal View History

2023-12-15 17:30:15 +08:00
package component
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/consts"
)
// DoorSensor 门磁
type DoorSensor struct {
State DsState //门磁状态
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
}
// DsState 门磁状态
type DsState = uint8
const (
DsOpen DsState = iota //门打开
DsNormallyOpen //门常开
DsForceOpen //门强行打开
DsClosed //门关闭
DsNormallyClose //门常闭
)
var (
DoorSensorType = ecs.NewComponentType[DoorSensor]() //门磁
)