rts-sim-module/component/ckm.go

37 lines
892 B
Go

package component
import (
"joylink.club/ecs"
)
var (
CkmTag = ecs.NewTag()
CkmCircuitType = ecs.NewComponentType[CkmCircuit]()
CkmPslType = ecs.NewComponentType[CkmPsl]()
CkmForceOpenTag = ecs.NewTag()
CkmForceCloseTag = ecs.NewTag()
)
type CkmCircuit struct {
MKJ *ecs.Entry //门开继电器
MGJ *ecs.Entry //门关继电器
MGZJ *ecs.Entry //门故障继电器
MPLJ *ecs.Entry //门旁路继电器
MMSJ *ecs.Entry //门模式继电器(吸合:远程/断开:本地)(初始状态:吸合)
KMJ *ecs.Entry //开门继电器
GMJ *ecs.Entry //关门继电器
}
func (c *CkmCircuit) RelayList() []*ecs.Entry {
return []*ecs.Entry{c.MKJ, c.MGJ, c.MGZJ, c.MPLJ, c.MMSJ, c.KMJ, c.GMJ}
}
type CkmPsl struct {
KMA *ecs.Entry //开门按钮
GMA *ecs.Entry //关门按钮
MPLA *ecs.Entry //门旁路按钮
MMSA *ecs.Entry //门模式按钮
}