btm
This commit is contained in:
parent
64ef4069be
commit
a1fc0311bf
@ -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
|
const scannedBalisesMax = 3
|
||||||
|
|
||||||
// Scanning BTM通过车载应答器天线接收到应答器报文
|
// Scanning BTM通过车载应答器天线接收到应答器报文
|
||||||
|
Loading…
Reference in New Issue
Block a user