feat: ARIB STD-T108準拠、単一送信4秒超過時のdropガード追加 - #13
Merged
Conversation
isAS923_1_JP()時、checkSend()で送信前にgetEstAirtimeFor()を確認し、 getMaxTxAirtimeMs()(JP=4000ms)を超える場合は送信せずdrop。 n_tx_dropped_airtimeカウンターで追跡。 実機テスト(T1000-E)で確認済み: - 閾値500msでの強制drop連続17回以上でクラッシュ/リーク無し(ACK含む) - 閾値4000msに戻して通常のDM/チャンネルメッセージ送受信・ACK正常動作確認
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ARIB STD-T108(平成元年郵政省告示第49号)は単一送信を4秒以内に制限している。現状、フラッドメッセージはリピーターを経由するたびにパスバイトが増え、airtimeも伸びる。メッセージ長・ホップ数の組み合わせによっては、リピーターの再送信時点で4秒を超過しうることが計算で判明(CH: 3ホップ目、DM: 18ホップ目で超過、CR4/8時)。
本PRはPhase 0として、送信直前にairtimeを計算し、4秒を超える場合は送信せずdropする最小限のガードを追加する。メッセージ長そのものの見直し(動的MAX_TEXT_LEN)は別PRで別途対応予定。
変更内容
Dispatcher::getMaxTxAirtimeMs():getCADFailMaxDuration()と同じisAS923_1_JP()分岐パターン。JP=4000ms、他地域はUINT32_MAX(無制限、既存動作に影響なし)checkSend(): raw packet長確定後・送信前にgetEstAirtimeFor()でairtime算出、上限超過時は送信せずlogTxFail()呼び出し+dropn_tx_dropped_airtimeカウンター追加(n_sent_flood等と同じパターン、resetStats()にも追加)実機テスト(T1000-E)
スコープ外(別途対応)