summaryrefslogtreecommitdiff
path: root/cesar/bsu/aclf
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/bsu/aclf')
-rw-r--r--cesar/bsu/aclf/aclf.h8
-rw-r--r--cesar/bsu/aclf/src/aclf.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/cesar/bsu/aclf/aclf.h b/cesar/bsu/aclf/aclf.h
index beb6e1146a..e6ea17693c 100644
--- a/cesar/bsu/aclf/aclf.h
+++ b/cesar/bsu/aclf/aclf.h
@@ -257,6 +257,14 @@ bsu_aclf_track_powerline (bsu_aclf_t *ctx);
void
bsu_aclf_clear_sync (bsu_aclf_t *ctx);
+/**
+ * Get the date at the one the beacon should be considered as invalid.
+ * \param ctx the module context.
+ * \return the expiration date.
+ */
+u32
+bsu_aclf_beacon_expiration_date (bsu_aclf_t *ctx);
+
END_DECLS
#endif /* bsu_aclf_aclf_h */
diff --git a/cesar/bsu/aclf/src/aclf.c b/cesar/bsu/aclf/src/aclf.c
index 6f531167cc..a43e6618c8 100644
--- a/cesar/bsu/aclf/src/aclf.c
+++ b/cesar/bsu/aclf/src/aclf.c
@@ -381,3 +381,10 @@ bsu_aclf_clear_sync (bsu_aclf_t *ctx)
for (i = 2; i < BSU_ACLF_BPSD_NB; i++)
ctx->bpsd[i] = ctx->bpsd[i - 1] + ctx->beacon_period_theo_tck;
}
+
+u32
+bsu_aclf_beacon_expiration_date (bsu_aclf_t *ctx)
+{
+ dbg_claim (ctx);
+ return ctx->bpsd[2];
+}