diff options
author | Max <msuraev@sysmocom.de> | 2017-05-12 17:00:30 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-05-15 13:11:48 +0000 |
commit | f39d03ad21d8120af847603d9b2ead71b8c4ba43 (patch) | |
tree | c684ad88060f40d0df224cbe9aac7897fd936652 /openbsc/include/openbsc/gsm_data_shared.h | |
parent | 1ebf23b7fe631dbafcc2dc4a1e8a8beced4ecc0d (diff) |
Restructure SI2quater generation
In preparation for extended SI2q messages:
* add SI2q-specific accessor macro
* add *_offset variables to gsm_bts struct
* internalize memory check while generating rest octets - introduce
budget concept (number of bits available in a given message)
* internalize *arfcn_size() functions as they are not needed outside of
si2q_num() anymore
* change rest octets generation to work with gsm_bts struct directly
* do not generate rest octets if no SI2q is necessary
* adjust unit tests accordingly (cosmetic changes only to avoid
regressions)
Requires: I92e12e91605bdab9916a3f665705287572434f74 in libosmocore
Change-Id: Ib554cf7ffc949a321571e1ae2ada1160e1b35fa6
Related: RT#8792
Diffstat (limited to 'openbsc/include/openbsc/gsm_data_shared.h')
-rw-r--r-- | openbsc/include/openbsc/gsm_data_shared.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index edc550ee5..0e5bc91d9 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -25,6 +25,7 @@ #endif #include <openbsc/common_cs.h> +#include <openbsc/rest_octets.h> struct osmo_bsc_data; @@ -485,6 +486,7 @@ struct gsm_bts_trx { struct gsm_bts_trx_ts ts[TRX_NR_TS]; }; +#define GSM_BTS_SI2Q(bts) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater]) #define GSM_BTS_SI(bts, i) (void *)((bts)->si_buf[i]) #define GSM_LCHAN_SI(lchan, i) (void *)((lchan)->si.buf[i]) @@ -717,10 +719,13 @@ struct gsm_bts { /* bitmask of all SI that are present/valid in si_buf */ uint32_t si_valid; /* 3GPP TS 44.018 Table 10.5.2.33b.1 INDEX and COUNT for SI2quater */ - uint8_t si2q_index; - uint8_t si2q_count; + uint8_t si2q_index; /* distinguish individual SI2quater messages */ + uint8_t si2q_count; /* si2q_index for the last (highest indexed) individual SI2quater message */ /* buffers where we put the pre-computed SI */ sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE]; + /* offsets used while generating SI2quater */ + size_t e_offset; + size_t u_offset; /* ip.accesss Unit ID's have Site/BTS/TRX layout */ union { |