summaryrefslogtreecommitdiff
path: root/cesar/bsu/bsu.h
diff options
context:
space:
mode:
authorlaranjeiro2010-05-17 09:38:42 +0000
committerlaranjeiro2010-05-17 09:38:42 +0000
commit124c58f4dd32f5185fe165a16dfd1969da894e06 (patch)
tree5cae35cc69abaae585a52039749cd90c0aad2f6f /cesar/bsu/bsu.h
parent8c7a01c0052495f7887c36f862f7ae834aaafe49 (diff)
cesar/bsu: changed callback to send beacon to CP
bsu_beacon_params_t is now bsu_params_t which contains: * direction, TO PLC or FROM PLC. * frequency error as a 32bits with fixed point (30 bits after the dot). * tick offset corresponding to the offset of the NTB clock with the phy_date clock. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7035 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu/bsu.h')
-rw-r--r--cesar/bsu/bsu.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/cesar/bsu/bsu.h b/cesar/bsu/bsu.h
index 126b6838ba..92c8e03666 100644
--- a/cesar/bsu/bsu.h
+++ b/cesar/bsu/bsu.h
@@ -26,6 +26,26 @@ typedef struct bsu_t bsu_t;
typedef struct bsu_avln_t bsu_avln_t;
typedef struct bsu_avln_ntb_t bsu_avln_ntb_t;
+enum bsu_beacon_direction_t
+{
+ BSU_BEACON_DIRECTION_TO_PLC,
+ BSU_BEACON_DIRECTION_FROM_PLC,
+ BSU_BEACON_DIRECTION_NB
+};
+typedef enum bsu_beacon_direction_t bsu_beacon_direction_t;
+
+/** BSU computed parameters. */
+struct bsu_params_t
+{
+ /** Direction */
+ bsu_beacon_direction_t direction;
+ /** Frequency error. */
+ s32 frequency_error;
+ /** Tick offset, difference between the NTB and PHY Date clock. */
+ u32 tick_offset;
+};
+typedef struct bsu_params_t bsu_params_t;
+
/** Function to call on beacon reception or beacon sending.
* \param ctx upper layer context.
* \param beacon the beacon sent or received.
@@ -37,7 +57,7 @@ typedef struct bsu_avln_ntb_t bsu_avln_ntb_t;
typedef void
(*bsu_beacon_processed_t) (void *ctx, pb_beacon_t *beacon,
pbproc_rx_beacon_params_t *params,
- bsu_beacon_params_t *bparams);
+ bsu_params_t bparams);
BEGIN_DECLS