Review at https://gerrit.osmocom.org/6286
Add macros for all ACC bit flags in the rach control IE.
Add macros which document the purpose of each bit in the rach_control.t2
and rach_control.t3 octets. These macros might also be useful for later
work on BTS cell ramping.
This change keeps the existing struct definition intact (t2 and t3 both
remain uint8_t) which means it doesn't affect existing users of this API.
There is at least one line of code, in osmo-bsc's gsm_bts_alloc_register(),
which could already make use of these macros to avoid a magic number:
bts->si_common.rach_control.t2 = 4; /* no emergency calls */
Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163
Related: OS#2591
---
M include/osmocom/gsm/protocol/gsm_04_08.h
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/6286/1
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h
b/include/osmocom/gsm/protocol/gsm_04_08.h
index c785d9f..ede424c 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -461,7 +461,23 @@
tx_integer :4,
max_trans :2;
uint8_t t2;
+#define GSM48_RACH_CTRL_ACC15_BARRED 0x80
+#define GSM48_RACH_CTRL_ACC14_BARRED 0x40
+#define GSM48_RACH_CTRL_ACC13_BARRED 0x20
+#define GSM48_RACH_CTRL_ACC12_BARRED 0x10
+#define GSM48_RACH_CTRL_ACC11_BARRED 0x08
+#define GSM48_RACH_CTRL_EMERGENCY_CALLS_BARRED 0x04 /* applies to ACCs below
this line only */
+#define GSM48_RACH_CTRL_ACC9_BARRED 0x02
+#define GSM48_RACH_CTRL_ACC8_BARRED 0x01
uint8_t t3;
+#define GSM48_RACH_CTRL_ACC7_BARRED 0x80
+#define GSM48_RACH_CTRL_ACC6_BARRED 0x40
+#define GSM48_RACH_CTRL_ACC5_BARRED 0x20
+#define GSM48_RACH_CTRL_ACC4_BARRED 0x10
+#define GSM48_RACH_CTRL_ACC3_BARRED 0x08
+#define GSM48_RACH_CTRL_ACC2_BARRED 0x04
+#define GSM48_RACH_CTRL_ACC1_BARRED 0x02
+#define GSM48_RACH_CTRL_ACC0_BARRED 0x01
} __attribute__ ((packed));
--
To view, visit https://gerrit.osmocom.org/6286
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <[email protected]>