【atp地面设备状态】
This commit is contained in:
parent
5d66ac7bb5
commit
c9e89e2b02
@ -4,7 +4,6 @@ import (
|
||||
"time"
|
||||
|
||||
"joylink.club/ecs"
|
||||
"joylink.club/rtsssimulation/repository/model/proto"
|
||||
)
|
||||
|
||||
// 控制模式
|
||||
@ -32,15 +31,6 @@ type SpeedLimit struct {
|
||||
|
||||
var SpeedLimitType = ecs.NewComponentType[SpeedLimit]() // 限速组件
|
||||
|
||||
// 门状态
|
||||
type DoorStatus struct {
|
||||
Open bool // 站台门开信息
|
||||
Close bool // 站台门关信息
|
||||
Locked bool // 锁闭状态
|
||||
}
|
||||
|
||||
var DoorStatusType = ecs.NewComponentType[DoorStatus]() // 门开关闭状态组件
|
||||
|
||||
// 占用类型
|
||||
type OccupiedType uint8
|
||||
|
||||
@ -59,9 +49,9 @@ var OccupiedStatusType = ecs.NewComponentType[OccupiedStatus]() // 占用状态
|
||||
|
||||
// 位置:目标位置、占用位置
|
||||
type DevicePosition struct {
|
||||
Device *ecs.Entry // 设备
|
||||
Len int64 // 占用长度
|
||||
Port proto.Port // 占用起始端口
|
||||
Device *ecs.Entry // 设备
|
||||
Offset int64 // 在设备上的相对a位置偏移
|
||||
Direction bool // 从a到b为true;从b到a为false
|
||||
}
|
||||
|
||||
var DevicePositionType = ecs.NewComponentType[DevicePosition]()
|
||||
@ -78,13 +68,28 @@ type FaultLock struct {
|
||||
Fault any // 故障信息
|
||||
}
|
||||
|
||||
var FaultLockType = ecs.NewComponentType[FaultLock]()
|
||||
var FaultLockType = ecs.NewComponentType[FaultLock]() // 故障锁闭状态组件
|
||||
|
||||
// 封锁状态
|
||||
type BlockadeStatus struct {
|
||||
}
|
||||
|
||||
var BlockadeStatusType = ecs.NewComponentType[BlockadeStatus]() // 区段状态
|
||||
var BlockadeStatusType = ecs.NewComponentType[BlockadeStatus]() // 封锁状态组件
|
||||
|
||||
// 解锁状态
|
||||
type UnLockStatus struct {
|
||||
Delay bool // 延迟状态
|
||||
DelayTime time.Duration // 延迟解锁时间
|
||||
TriggerDevice *ecs.Entry // 触发解锁设备
|
||||
}
|
||||
|
||||
var UnLockStatusType = ecs.NewComponentType[UnLockStatus]() // 解锁状态组件
|
||||
|
||||
// 关闭状态
|
||||
type ClosedStatus struct {
|
||||
}
|
||||
|
||||
var ClosedStatusType = ecs.NewComponentType[ClosedStatus]() // 关闭状态组件
|
||||
|
||||
// 站台跳停状态
|
||||
type StandSkipStatus struct {
|
||||
@ -107,18 +112,26 @@ var StandParkStatusType = ecs.NewComponentType[StandParkStatus]() // 站台停
|
||||
type StandHoldStatus struct {
|
||||
}
|
||||
|
||||
var StandHoldStatusType = ecs.NewComponentType[StandHoldStatus]() // 站台扣车状态
|
||||
var StandHoldStatusType = ecs.NewComponentType[StandHoldStatus]() // 扣车状态组件
|
||||
|
||||
// 站台紧急关闭状态
|
||||
type StandEmpStatus struct {
|
||||
EMPJ *ecs.Entry // 紧急关闭状态
|
||||
// 信号机状态
|
||||
type SignalStatus struct {
|
||||
ApproachLock bool // 接近锁闭
|
||||
OverlapLock bool // 延续保护锁闭
|
||||
}
|
||||
|
||||
var StandEmpStatusType = ecs.NewComponentType[StandEmpStatus]() // 站台状态
|
||||
var SignalStatusType = ecs.NewComponentType[SignalStatus]() // 信号机状态组件
|
||||
|
||||
// 进路状态
|
||||
type RouteStatus struct {
|
||||
StartSignal *ecs.Entry // 起始信号机
|
||||
EndSignal *ecs.Entry // 终止信号机
|
||||
Sections []*ecs.Entry // 区段列表
|
||||
AtsControl bool // ats自动控制
|
||||
Setting bool // 进路是否排列中
|
||||
Lock bool // 已锁闭
|
||||
}
|
||||
|
||||
var RouteStatusType = ecs.NewComponentType[RouteStatus]() // 进路状态组件
|
||||
|
||||
var (
|
||||
StandTag = ecs.NewTag() // 站台标签
|
||||
SectionTag = ecs.NewTag() // 区段标签
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user