#ifndef cl_data_rate_h #define cl_data_rate_h /* Cesar project {{{ * * Copyright (C) 2009 Spidcom * * <<>> * * }}} */ /** * \file cl/data_rate.h * \brief data rate common declarations. * \ingroup cl * * This data rate info are shared between CP and CL. */ /* This value in the data_rate field of the cl_data_rate_t * structure indicate that the whole structure needs to be initialized. */ #define CL_DATA_RATE_REQ_INIT 0xFFFFFFFF /** * Structure used to store data rate informations. * It stores the data rate value the moment when * this value was evaluated. */ struct cl_data_rate_t { /** data rate value expressed in octets/sec. */ u32 data_rate; /** time (in ecos clock ticks 10ms) when the value was calculated. */ u64 data_rate_rtc_date; /** time (in phy clock ticks 40ns) when the value was calculated. */ u32 data_rate_date; }; typedef struct cl_data_rate_t cl_data_rate_t; /** * Update the data rate info with the new data data size * \param p_dr pointer to the data rate structure. * \param new_data_size data quantity in octets. */ void data_rate_update_info (cl_data_rate_t *p_dr, uint data_size); #endif /* cl_data_rate_h */