From 250e7f7d30c5d90e39293f67bf7553d2d3d094f6 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 13 Apr 2018 03:30:14 +0200 Subject: add gsm0808_{enc,dec}_cell_id Clarify semantics and micro-optimise for the case of single Cell Identifer IEs. Test in gsm0808_test.c So far we have gsm0808_enc_cell_id_list2(), but there also exist instances of single Cell Identifiers (3GPP TS 48.008 3.2.2.17). It is possible to decode the same using the cell identifier list API, but this forces the caller to also keep a full struct gsm0808_cell_id_list2 with all its 127 entries around. E.g. for handover, there are two Cell Identifiers (Serving and Target); I'd need two full cell id lists for each, and these would be dynamically allocated for each handover operation, whether it uses them or not. Related: OS#2283 (inter-BSC HO, BSC side) Change-Id: I9f9c528965775698ab62ac386af0516192c4b0cc --- tests/gsm0808/gsm0808_test.ok | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/gsm0808/gsm0808_test.ok') diff --git a/tests/gsm0808/gsm0808_test.ok b/tests/gsm0808/gsm0808_test.ok index a049dec5..27170f27 100644 --- a/tests/gsm0808/gsm0808_test.ok +++ b/tests/gsm0808/gsm0808_test.ok @@ -104,4 +104,11 @@ cil.id_list_len = 127 gsm0808_cell_id_list_add(&cil, &cgi2a) --> rc = -28 cil.id_list_len = 127 ------- test_cell_id_list_add done +test_gsm0808_enc_dec_cell_id_lac: encoded: 05 03 05 01 24 (rc = 5) +test_gsm0808_enc_dec_cell_id_bss: encoded: 05 01 06 (rc = 3) +test_gsm0808_enc_dec_cell_id_no_cell: encoded: 05 01 03 (rc = 3) +test_gsm0808_enc_dec_cell_id_lai_and_lac: encoded: 05 06 04 21 63 54 23 42 (rc = 8) +test_gsm0808_enc_dec_cell_id_ci: encoded: 05 03 02 04 23 (rc = 5) +test_gsm0808_enc_dec_cell_id_lac_and_ci: encoded: 05 05 01 04 23 02 35 (rc = 7) +test_gsm0808_enc_dec_cell_id_global: encoded: 05 08 00 21 63 54 23 42 04 23 (rc = 10) Done -- cgit v1.2.3