This commit is contained in:
xzb 2023-11-23 18:13:52 +08:00
parent 64ef4069be
commit a1fc0311bf

View File

@ -73,6 +73,18 @@ func (t *TrainBtm) baliseMessageCounterAdd1() {
}
}
// SetBaliseTelegramHadSentAndGet 获取未发送的应答器报文并标记已发送
// 通过Canet发送应答器报文时调用该方法来获取要发送的报文
func (t *TrainBtm) SetBaliseTelegramHadSentAndGet() *TrainBaliseTelegram {
for _, tbt := range t.ScannedBalises {
if !tbt.sent {
tbt.sent = true
return tbt
}
}
return nil
}
const scannedBalisesMax = 3
// Scanning BTM通过车载应答器天线接收到应答器报文