diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2019-03-07 16:32:02 +0100 |
---|---|---|
committer | tnt <tnt@246tNt.com> | 2019-03-14 08:31:58 +0000 |
commit | 4d3a21269b25e7164a94fa8ce3ad67ff80904aee (patch) | |
tree | 3542ca15253e0519e6801474ca224640566f7392 /include/osmocom/bsc/gsm_data.h | |
parent | a58e10c1b62c9b757a37697da3d986e3e0d0e9de (diff) |
assignment_fsm: Properly support assigning signalling mode TCH/x
To support the 3 possible preferences, the changes needed were:
- Replace 'full_rate' bool with a 3 option enum to represent
the channels types for signalling
- Switch from _pref/_alt to using an array sorted in preference
order
Change-Id: I4c7499c8c866ea3ff7b1327edb3615d003d927d3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'include/osmocom/bsc/gsm_data.h')
-rw-r--r-- | include/osmocom/bsc/gsm_data.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index c4315c07f..fb0735aee 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -98,9 +98,15 @@ enum subscr_sccp_state { SUBSCR_SCCP_ST_CONNECTED }; +enum channel_rate { + CH_RATE_SDCCH, + CH_RATE_HALF, + CH_RATE_FULL, +}; + struct channel_mode_and_rate { enum gsm48_chan_mode chan_mode; - bool full_rate; + enum channel_rate chan_rate; uint16_t s15_s0; }; @@ -115,12 +121,9 @@ struct assignment_request { char msc_rtp_addr[INET_ADDRSTRLEN]; uint16_t msc_rtp_port; - /* Prefered rate/codec setting (mandatory) */ - struct channel_mode_and_rate ch_mode_rate_pref; - - /* Alternate rate/codec setting (optional) */ - bool ch_mode_rate_alt_present; - struct channel_mode_and_rate ch_mode_rate_alt; + /* Rate/codec setting in preference order (need at least 1 !) */ + int n_ch_mode_rate; + struct channel_mode_and_rate ch_mode_rate[3]; }; /* State of an ongoing Assignment, while the assignment_fsm is still busy. This serves as state separation to keep the |