30 lines
872 B
Go
30 lines
872 B
Go
package axle_device
|
|
|
|
import (
|
|
"fmt"
|
|
"joylink.club/bj-rtsts-server/config"
|
|
"joylink.club/bj-rtsts-server/third_party/message"
|
|
"log/slog"
|
|
)
|
|
|
|
//联锁集中站计轴与联锁通信管理
|
|
|
|
type AxleMessageManager interface {
|
|
GetLineAllRsspAxleCfgs() []config.RsspAxleConfig
|
|
//HandleSectionCmdMsg 计轴设备接收到联锁发送来的控制命令
|
|
HandleSectionCmdMsg(city string, lineId string, centralizedStation string, msg *message.SectionCmdMsgPack)
|
|
//CollectSectionStatus 收集仿真中计轴区段状态
|
|
CollectSectionStatus(city string, lineId string, centralizedStation string) ([]*message.SectionStatusMsg, error)
|
|
}
|
|
|
|
func StartLineAllRsspAxleServices(ram AxleMessageManager) {
|
|
cfgs := ram.GetLineAllRsspAxleCfgs()
|
|
for _, cfg := range cfgs {
|
|
if len(cfg.RsspCfgs) > 0 {
|
|
InitRsspAxle(&cfg).Start(ram)
|
|
} else {
|
|
slog.Debug(fmt.Sprintf(""))
|
|
}
|
|
}
|
|
}
|