tbf: Constify some methods

Change-Id: I2681a98583f4fb26a274c75d0279084239f76a68
This commit is contained in:
Pau Espin Pedrol 2021-02-01 18:14:23 +01:00
parent b71aab5646
commit 57dcde4242
2 changed files with 4 additions and 4 deletions

View File

@ -544,7 +544,7 @@ void gprs_rlcmac_tbf::t_start(enum tbf_timers t, int T, const char *reason, bool
}
int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts,
uint32_t *poll_fn_, unsigned int *rrbp_)
uint32_t *poll_fn_, unsigned int *rrbp_) const
{
uint32_t new_poll_fn = next_fn(fn, 13);
@ -1066,7 +1066,7 @@ int gprs_rlcmac_tbf::establish_dl_tbf_on_pacch()
return 0;
}
const char *tbf_name(gprs_rlcmac_tbf *tbf)
const char *tbf_name(const gprs_rlcmac_tbf *tbf)
{
return tbf ? tbf->name() : "(no TBF)";
}

View File

@ -190,7 +190,7 @@ enum tbf_counters { /* TBF counters from 3GPP TS 44.060 §13.4 */
extern "C" {
#endif
struct gprs_rlcmac_tbf;
const char *tbf_name(struct gprs_rlcmac_tbf *tbf);
const char *tbf_name(const struct gprs_rlcmac_tbf *tbf);
enum gprs_rlcmac_tbf_state tbf_state(const struct gprs_rlcmac_tbf *tbf);
enum gprs_rlcmac_tbf_direction tbf_direction(const struct gprs_rlcmac_tbf *tbf);
void tbf_set_ms(struct gprs_rlcmac_tbf *tbf, struct GprsMs *ms);
@ -262,7 +262,7 @@ struct gprs_rlcmac_tbf {
int establish_dl_tbf_on_pacch();
int check_polling(uint32_t fn, uint8_t ts,
uint32_t *poll_fn, unsigned int *rrbp);
uint32_t *poll_fn, unsigned int *rrbp) const;
void set_polling(uint32_t poll_fn, uint8_t ts, enum gprs_rlcmac_tbf_poll_type t);
void poll_timeout();