summaryrefslogtreecommitdiff
path: root/cesar/bsu
diff options
context:
space:
mode:
authorNélio Laranjeiro2010-09-02 09:29:21 +0200
committerNélio Laranjeiro2010-09-02 09:44:19 +0200
commitbd50340ab63865082b70e1e4f7e4060715f415b7 (patch)
treedb0cb3eb3536717ab46efbf14c03f6f0f10c2cff /cesar/bsu
parent349128f20034e53995c01c6c3f1ce45f0372fa0a (diff)
cesar/bsu: add beacon listening allocation instead of a hole, refs #1848
Diffstat (limited to 'cesar/bsu')
-rw-r--r--cesar/bsu/src/bsu.c2
-rw-r--r--cesar/bsu/test/utest/src/schedules.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/cesar/bsu/src/bsu.c b/cesar/bsu/src/bsu.c
index 7fcec181e8..4e3208b003 100644
--- a/cesar/bsu/src/bsu.c
+++ b/cesar/bsu/src/bsu.c
@@ -296,6 +296,8 @@ bsu_schedules_merge (bsu_t *ctx, bsu_beacon_schedules_t *asched,
{
bsu_schedules_merge__allocation_add (ctx, schedule, alloc,
sai->start_time_atu,
+ alloc == 0 ?
+ MAC_LID_SPC_BEACON_LISTEN :
MAC_LID_SPC_HOLE);
alloc++;
}
diff --git a/cesar/bsu/test/utest/src/schedules.c b/cesar/bsu/test/utest/src/schedules.c
index 0dd73d1cd0..113044f1b4 100644
--- a/cesar/bsu/test/utest/src/schedules.c
+++ b/cesar/bsu/test/utest/src/schedules.c
@@ -42,7 +42,7 @@ test_case_ca_schedules (test_t test)
uint i, j;
ca_schedule_t scheds_cmp [3];
scheds_cmp[0].allocations[0].end_offset_tck = MAC_ATU_TO_TCK (500);
- scheds_cmp[0].allocations[0].glid = MAC_LID_SPC_HOLE;
+ scheds_cmp[0].allocations[0].glid = MAC_LID_SPC_BEACON_LISTEN;
scheds_cmp[0].allocations[1].end_offset_tck = MAC_ATU_TO_TCK (700);
scheds_cmp[0].allocations[1].glid = MAC_GLID_MIN;
scheds_cmp[0].allocations[2].end_offset_tck = MAC_ATU_TO_TCK (1000);
@@ -55,7 +55,7 @@ test_case_ca_schedules (test_t test)
scheds_cmp[0].allocations[5].glid = MAC_GLID_MIN;
/* next */
scheds_cmp[1].allocations[0].end_offset_tck = MAC_ATU_TO_TCK (500);
- scheds_cmp[1].allocations[0].glid = MAC_LID_SPC_HOLE;
+ scheds_cmp[1].allocations[0].glid = MAC_LID_SPC_BEACON_LISTEN;
scheds_cmp[1].allocations[1].end_offset_tck = MAC_ATU_TO_TCK (700);
scheds_cmp[1].allocations[1].glid = MAC_GLID_MIN;
scheds_cmp[1].allocations[2].end_offset_tck = MAC_ATU_TO_TCK (1000);
@@ -68,7 +68,7 @@ test_case_ca_schedules (test_t test)
scheds_cmp[1].allocations[5].glid = MAC_GLID_MIN;
/* next */
scheds_cmp[2].allocations[0].end_offset_tck = MAC_ATU_TO_TCK (50);
- scheds_cmp[2].allocations[0].glid = MAC_LID_SPC_HOLE;
+ scheds_cmp[2].allocations[0].glid = MAC_LID_SPC_BEACON_LISTEN;
scheds_cmp[2].allocations[1].end_offset_tck = MAC_ATU_TO_TCK (500);
scheds_cmp[2].allocations[1].glid = MAC_GLID_MIN;
scheds_cmp[2].allocations[2].end_offset_tck = MAC_ATU_TO_TCK (700);