Skip to content

Commit 267bf69

Browse files
committed
fdl: tests: Add test for single active station GAP polling
Catch any self-polling issues when an active station is alone on the bus and polls the full address space itself.
1 parent 1a8d59b commit 267bf69

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/fdl/test_active.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,25 @@ fn two_rotations_before_ready() {
535535
fdl_ut.wait_for_matching(|t| t == fdl::Telegram::Token(fdl::TokenTelegram { da: 15, sa: 7 }));
536536
}
537537

538+
/// Test that an active station polls all its GAP fine
539+
#[test]
540+
fn active_station_full_gap_scanned() {
541+
crate::test_utils::prepare_test_logger();
542+
let mut fdl_ut = FdlActiveUnderTest::new(7);
543+
544+
for addr in [8, 3, 6, 8, 11] {
545+
fdl_ut.wait_for_matching(|t| {
546+
if let fdl::Telegram::Data(data_telegram) = t {
547+
data_telegram.is_fdl_status_request().is_some()
548+
&& data_telegram.h.da == addr
549+
&& data_telegram.h.sa == 7
550+
} else {
551+
false
552+
}
553+
});
554+
}
555+
}
556+
538557
/// Test that an active station discovers another active neighbor station.
539558
#[test]
540559
fn active_station_discovers_neighbor() {

0 commit comments

Comments
 (0)