rts-sim-module/component/physical_section.go

28 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package component
import "joylink.club/ecs"
var (
PhysicalSectionTag = ecs.NewTag()
PhysicalSectionCircuitType = ecs.NewComponentType[PhysicalSectionCircuit]()
PhysicalSectionManagerType = ecs.NewComponentType[PhysicalSectionManager]()
)
var PhysicalSectionForceOccupied = ecs.NewTag() //区段强制占用(故障占用)
// PhysicalSectionManager 计轴管理器。我自己起的名字,计轴逻辑的载体
type PhysicalSectionManager struct {
Count int //轴数(简化版)。目前此轴数计数只与区段上有无列车有关,故障占用等状态不会影响此计数
Occupied bool //占用
PDRST bool //预复位
//RAC bool //计轴复位反馈。主要指计轴设备发送给CI系统的直接复零/预复零命令反馈表示计轴设备已收到CI系统发送的直接复零/预复零命令。
//RJO bool //运营原因拒绝直接复位/预复位。如区段空闲时下发复位命令;或车轮压住传感器时收到复位命令。
//RJT bool //技术原因拒绝直接复位/预复位。主要指计轴相关设备故障时收到复位命令如车轮传感器的导线断开、AEB之间的通信故障等。
}
// PhysicalSectionCircuit 计轴区段电路
type PhysicalSectionCircuit struct {
GJ *ecs.Entry
}