2023-08-14 18:06:26 +08:00
|
|
|
package components
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/ecs"
|
|
|
|
"joylink.club/rtsssimulation/state"
|
|
|
|
)
|
|
|
|
|
2023-08-15 16:50:24 +08:00
|
|
|
// 系统时钟组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var SystemTimerComponent = ecs.NewComponentType[state.SystemTimer]()
|
2023-08-15 16:50:24 +08:00
|
|
|
|
2023-08-14 18:06:26 +08:00
|
|
|
// 身份组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var DeviceIdentityComponent = ecs.NewComponentType[state.DeviceIdentity]()
|
2023-08-14 18:06:26 +08:00
|
|
|
|
2023-08-16 18:13:18 +08:00
|
|
|
// 持有实体标签的组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var EntityTagHandlerComponent = ecs.NewComponentType[state.EntityTagHandler]()
|
|
|
|
|
|
|
|
// 百分比设备组件
|
|
|
|
var PercentageDeviceComponent = ecs.NewComponentType[state.PercentageDeviceState]()
|
|
|
|
var PercentageDeviceOperatingComponent = ecs.NewComponentType[state.PercentageDeviceOperating]()
|
2023-08-16 18:13:18 +08:00
|
|
|
|
2023-08-14 18:06:26 +08:00
|
|
|
// 道岔状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var SwitchStateComponent = ecs.NewComponentType[state.SwitchState]()
|
2023-08-15 16:50:24 +08:00
|
|
|
|
2023-08-16 15:00:24 +08:00
|
|
|
// 道岔定反操继电器动作组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var SwitchNRRelayOperatingComponent = ecs.NewComponentType[state.SwitchNRRelayOperating]()
|
2023-08-16 15:00:24 +08:00
|
|
|
|
2023-08-15 16:50:24 +08:00
|
|
|
// 道岔正常转动组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var SwitchTurnOperatingComponent = ecs.NewComponentType[state.SwitchTurnOperating]()
|
2023-08-14 18:06:26 +08:00
|
|
|
|
|
|
|
// 物理区段状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var PhysicalSectionStateComponent = ecs.NewComponentType[state.PhysicalSectionState]()
|
2023-08-15 18:12:30 +08:00
|
|
|
|
|
|
|
// 信号机状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var SignalStateComponent = ecs.NewComponentType[state.SignalState]()
|
2023-08-16 15:00:24 +08:00
|
|
|
|
|
|
|
// 信号机显示操作组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var SignalDisplayOperatingComponent = ecs.NewComponentType[state.SignalDisplayOperating]()
|
2023-08-16 17:17:20 +08:00
|
|
|
|
|
|
|
// 单个屏蔽门状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var PsdCellStateComponent = ecs.NewComponentType[state.PsdCellState]()
|
2023-08-16 17:17:20 +08:00
|
|
|
|
|
|
|
// 单个屏蔽门操作组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var PsdCellOperatingComponent = ecs.NewComponentType[state.PsdCellOperating]()
|
2023-08-16 17:17:20 +08:00
|
|
|
|
|
|
|
// 站台单侧所有单个屏蔽门状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var PsdStateComponent = ecs.NewComponentType[state.PsdState]()
|
2023-08-17 17:39:57 +08:00
|
|
|
|
|
|
|
// 应答器状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var BaliseStateComponent = ecs.NewComponentType[state.BaliseState]()
|
2023-08-17 17:39:57 +08:00
|
|
|
|
|
|
|
// 列车状态组件
|
2023-08-18 10:06:17 +08:00
|
|
|
var TrainStateComponent = ecs.NewComponentType[state.TrainState]()
|