laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31031 )
Change subject: Add more L1 signals to common part ......................................................................
Add more L1 signals to common part
Change-Id: I295dc340d3d3a7cbb5aba5afe807746acbcde33f --- M include/osmocom/abis/e1_input.h M src/e1_input.c 2 files changed, 31 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 91bf181..ebf94bd 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -166,6 +166,17 @@ E1INP_LINE_R_MAX };
+/* Notes on setting/getting Sa bits (TABLE 5A and 5B of ITU-T G.704) + * The sa_bits byte contains the Sa bits in TS 0, if multi frame is used: + * bit 7 = Sa8, bit 6 = Sa7, bit 5 = Sa5, bit 4 = Sa4, bit 3 = Sa64, bit 2 = Sa63, bit 1 = Sa62, bit 0 = Sa61. + * The sa_bits byte contains the Sa bits in TS 0, if double frame is used: + * bit 7 = Sa8, bit 6 = Sa7, bit 5 = Sa5, bit 4 = Sa4, bit 0 = Sa6. + * The received Sa bits are reported whenever they change (and are stable for some frames, depending on the + * implementation). Before any report, all Sa bits are assumed to be set to 1. + * Setting sa_bits byte will change the transmitted Sa bits on TS0. + * Before setting them, all Sa bits are transmitted as 1. + */ + struct e1inp_driver { struct llist_head list; const char *name; @@ -244,6 +255,15 @@ S_L_INP_LINE_INIT, S_L_INP_LINE_ALARM, S_L_INP_LINE_NOALARM, + S_L_INP_LINE_LOS, + S_L_INP_LINE_NOLOS, + S_L_INP_LINE_AIS, + S_L_INP_LINE_NOAIS, + S_L_INP_LINE_RAI, + S_L_INP_LINE_NORAI, + S_L_INP_LINE_SLIP_RX, + S_L_INP_LINE_SLIP_TX, + S_L_INP_LINE_SA_BITS, };
extern const struct value_string e1inp_signal_names[]; @@ -360,6 +380,8 @@ uint8_t tei; uint8_t sapi; uint8_t ts_nr; + /* received Sa bits in TS0 (MSB to LSB): Sa8 Sa7 Sa5 Sa4 Sa64 Sa63 Sa62 Sa61/Sa6 */ + uint8_t sa_bits; struct gsm_bts_trx *trx; struct e1inp_line *line; }; diff --git a/src/e1_input.c b/src/e1_input.c index 6c82d08..cdf061c 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -1021,6 +1021,15 @@ { S_L_INP_LINE_INIT, "LINE-INIT" }, { S_L_INP_LINE_ALARM, "LINE-ALARM" }, { S_L_INP_LINE_NOALARM, "LINE-NOALARM" }, + { S_L_INP_LINE_LOS, "LINE-LOS" }, + { S_L_INP_LINE_NOLOS, "LINE-NOLOS" }, + { S_L_INP_LINE_AIS, "LINE-AIS" }, + { S_L_INP_LINE_NOAIS, "LINE-NOAIS" }, + { S_L_INP_LINE_RAI, "LINE-RAI" }, + { S_L_INP_LINE_NORAI, "LINE-NORAI" }, + { S_L_INP_LINE_SLIP_RX, "LINE-SLIP-RX" }, + { S_L_INP_LINE_SLIP_TX, "LINE-SLIP-TX" }, + { S_L_INP_LINE_SA_BITS, "LINE-SA-BITS" }, { 0, NULL } };