From 1030c7515344550850a96b7b253c1ba09b6f580a Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Thu, 23 Nov 2023 10:43:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E5=BA=94=E7=AD=94=E5=99=A8?= =?UTF-8?q?=E5=A4=A9=E7=BA=BF=E6=8E=A2=E6=B5=8B=E8=BD=A8=E6=97=81=E5=BA=94?= =?UTF-8?q?=E7=AD=94=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/train.go | 14 +++++++++++--- sys/device_sys/balise_detection.go | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/component/train.go b/component/train.go index 71912a2..014fb91 100644 --- a/component/train.go +++ b/component/train.go @@ -28,14 +28,22 @@ func (t *TrainPositionInfo) ToString() string { // TrainBtm 列车应答器传输模块 type TrainBtm struct { - //车载应答器天线功率放大器开关,true-开,false-关 - PowerAmplifierSwitch bool //应答器计数(每过一个应答器加一,在同一个应答器内不变) BaliseCounter int //报文计数器(每解出一个应答器报文加一) MessageCounter int - //BTM此时是否在应答器上方 + //车载应答器天线功率放大器开关,true-开,false-关 + PowerAmplifierSwitch bool + //天线此时是否在应答器上方 AboveBalise bool + //列车在运行方向顺序扫描到的应答器 + ScannedBalises []*TrainBaliseTelegram +} + +// TrainBaliseTelegram 应答器报文 +type TrainBaliseTelegram struct { + BaliseId string //应答器ID + Telegram []byte //一个应答器同一时刻只有一条报文处于激活有效状态 } var ( diff --git a/sys/device_sys/balise_detection.go b/sys/device_sys/balise_detection.go index c8a29fc..71f9c31 100644 --- a/sys/device_sys/balise_detection.go +++ b/sys/device_sys/balise_detection.go @@ -9,6 +9,8 @@ import ( ) // BaliseDetectSystem 列车应答器天线探测轨旁应答器 +// 一条应答器报文长830bits;单个应答器对应多条报文; +// 固定应答器对应1条报文;默认报文对应1条; type BaliseDetectSystem struct { trainQuery *ecs.Query }