40 lines
1.0 KiB
Go
40 lines
1.0 KiB
Go
|
package component
|
|||
|
|
|||
|
import "joylink.club/ecs"
|
|||
|
|
|||
|
// Signal3XH2Electronic 电路状态:信号机3XH-2(红-绿-黄) 道岔防护信号机(三显示不封灯、无单黄显示、带引导)
|
|||
|
// 引导信号:红黄
|
|||
|
type Signal3XH2Electronic struct {
|
|||
|
// 点灯继电器,true-吸合,常态落下表示逻辑点灯
|
|||
|
Z3XH2_DDJ *ecs.Entry
|
|||
|
//2DJ灯丝继电器,true-吸合
|
|||
|
Z3XH2_2DJ *ecs.Entry
|
|||
|
//灯丝继电器,true-吸合
|
|||
|
Z3XH2_DJ *ecs.Entry
|
|||
|
//列车信号继电器,true-吸合
|
|||
|
Z3XH2_LXJ *ecs.Entry
|
|||
|
//引导信号继电器,true-吸合
|
|||
|
Z3XH2_YXJ *ecs.Entry
|
|||
|
}
|
|||
|
|
|||
|
// Signal3XH2Filament 信号机3XH-2 灯丝状态
|
|||
|
type Signal3XH2Filament struct {
|
|||
|
// 物理黄灯,true-灯丝正常
|
|||
|
Uf bool
|
|||
|
// 物理绿灯,true-灯丝正常
|
|||
|
Lf bool
|
|||
|
// 物理红灯,true-灯丝正常
|
|||
|
Hf bool
|
|||
|
// 物理黄灯,true-亮
|
|||
|
U bool
|
|||
|
// 物理绿灯,true-亮
|
|||
|
L bool
|
|||
|
// 物理红灯,true-亮
|
|||
|
H bool
|
|||
|
}
|
|||
|
|
|||
|
var (
|
|||
|
Signal3XH2ElectronicType = ecs.NewComponentType[Signal3XH2Electronic]()
|
|||
|
Signal3XH2FilamentType = ecs.NewComponentType[Signal3XH2Filament]()
|
|||
|
)
|