rts-sim-module/component/signal_3xh4.go

37 lines
987 B
Go
Raw Normal View History

2023-10-08 18:03:07 +08:00
package component
import "joylink.club/ecs"
// Signal3XH4Electronic 电路状态信号机3XH-4(红-绿-黄) 出站兼道岔防护信号机(三显示不封灯、有单黄显示、无引导)
type Signal3XH4Electronic struct {
// 点灯继电器true-吸合,常态落下表示逻辑点灯
Z3XH4_DDJ *ecs.Entry
//灯丝继电器true-吸合
Z3XH4_DJ *ecs.Entry
//列车信号继电器true-吸合
Z3XH4_LXJ *ecs.Entry
//开通正线信号继电器true-吸合
Z3XH4_ZXJ *ecs.Entry
}
// Signal3XH4Filament 信号机3XH-4 灯丝状态
type Signal3XH4Filament struct {
// 物理黄灯true-灯丝正常
Uf bool
// 物理绿灯true-灯丝正常
Lf bool
// 物理红灯true-灯丝正常
Hf bool
// 物理黄灯true-亮
U bool
// 物理绿灯true-亮
L bool
// 物理红灯true-亮
H bool
}
var (
Signal3XH4ElectronicType = ecs.NewComponentType[Signal3XH4Electronic]()
Signal3XH4FilamentType = ecs.NewComponentType[Signal3XH4Filament]()
)