summaryrefslogtreecommitdiff
path: root/cesar/cp2/cco/bw/inc/bw.h
diff options
context:
space:
mode:
authorboure2008-06-25 14:45:08 +0000
committerboure2008-06-25 14:45:08 +0000
commit1e8a4456477e4f1f94ed089ece0e2822e8417616 (patch)
tree69b2d737d329853b01a82236437e352e3e88e85f /cesar/cp2/cco/bw/inc/bw.h
parent3dffb49719563d084a474d01d196aed1334ab4fa (diff)
complete allocation function done and tested
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2434 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2/cco/bw/inc/bw.h')
-rw-r--r--cesar/cp2/cco/bw/inc/bw.h40
1 files changed, 27 insertions, 13 deletions
diff --git a/cesar/cp2/cco/bw/inc/bw.h b/cesar/cp2/cco/bw/inc/bw.h
index 72109ea5ff..f542a2e206 100644
--- a/cesar/cp2/cco/bw/inc/bw.h
+++ b/cesar/cp2/cco/bw/inc/bw.h
@@ -17,6 +17,9 @@
#include "lib/set.h"
#include "cp2/cco/bw/bw.h"
#include "cp2/conn/link.h"
+
+#define FORWARD true
+#define BACKWARD false
/**
* Bandwidth Manager Module. - Create the schedule - Allocate a specific
* connection - finalise and return a schedule (used by the Beacon module
@@ -38,7 +41,7 @@ typedef struct cp_cco_bw_private_t cp_cco_bw_private_t;
/**
- * Release the schedule after finaliseing it and sending it.
+ * Release the schedule after finalising it and sending it.
* \param sched schedule to release
* \return \todo fill this
*
@@ -100,19 +103,30 @@ cp_cco_bw_set_next_free_allocation_time(cp_t *ctx, cp_cco_bw_alloc_t *alloc,
*
*/
bool
-cp_cco_bw_get_last_ble(cp_link_ble_interval_t *first_ble,
- cp_link_ble_interval_t * last_ble,
- u16 nb_pb,
- cp_cco_bw_alloc_t *alloc,
- cp_cco_bw_alloc_t *next_alloc);
+cp_cco_bw_get_alloc_ble(cp_link_ble_interval_t *first_ble,
+ cp_link_ble_interval_t *last_ble,
+ u16 nb_pb,
+ cp_cco_bw_alloc_t *alloc,
+ cp_cco_bw_alloc_t *next_alloc);
-bool
+/**
+ * Calculate the best allocation time between 2 BLE
+ * \param first_ble First BLE
+ * \param last_ble Last BLE
+ * \param nb_pb Number of PB to allocate
+ * \param alloc_st Allocation Start Time
+ * \param alloc_et Allocation End Time
+ * \param alloc Previous allocaton
+ * \param next_alloc Next_allocation
+ *
+ */
+void
cp_cco_bw_calculation_of_alloc_time(cp_link_ble_interval_t *first_ble,
- cp_link_ble_interval_t *last_ble,
- u16 nb_pb,
- u16 *alloc_st,
- u16 *alloc_et,
- cp_cco_bw_alloc_t *alloc,
- cp_cco_bw_alloc_t *next_alloc);
+ cp_link_ble_interval_t *last_ble,
+ u16 nb_pb,
+ u16 *alloc_st,
+ u16 *alloc_et,
+ cp_cco_bw_alloc_t *alloc,
+ cp_cco_bw_alloc_t *next_alloc);
#endif /* cp_cco_bw_private_h */