library/PCUIF_Types: version 10: add Mobile Allocation length field

My initial assumption was that we can skip redundant '0'B bits or
even '00'O octets in the Mobile Allocation IE, and thus reduce
the overall size of this element.  Unfortunately, this is wrong.

3GPP TS 44.018, section 10.5.2.21 clearly states that the Mobile
Allocation IE contains a bit-string of size NF, where NF is the
number of frequencies in the cell allocation.  If NF % 8 != 0,
then '0'B padding bits must be appended to make it octet-aligned.

In other words, if the cell allocation contains let's say 13
frequencies, but a hopping timeslot makes use of only a small
fraction of it (e.g. 4 first channels), we would still need to
transmit at least 13 bits (+padding), including all redundant
bits and octets.

In RLC/MAC frames though it's not required to make the bit-string
octet aligned, so we need to send exactly NF bits without padding.

In order to achieve that:

  a) add MA length field to INFO.ind (record PCUIF_InfoTrxTs);
  b) ajust the existing test cases to use this field.

It's safe to merge this change as the related patches have not
been merged to osmo-pcu and osmo-bts yet.

Change-Id: I2709673c90a0cd7d76de9db8b8ad82ac59ca84a0
Related: SYS#4868, OS#4547
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 8144d97..f0200af 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -145,6 +145,7 @@
 	uint8_t			hopping,
 	uint8_t			hsn,
 	uint8_t			maio,
+	uint8_t			ma_bit_len,
 	bitstring		ma length(64)
 } with { variant (ma) "BYTEORDER(first), BITORDER(msb)" };
 private type record length(8) of PCUIF_InfoTrxTs PCUIF_InfoTrxTsList;
@@ -709,12 +710,14 @@
 	tsc := tsc,
 	hopping := 0,
 	hsn := 0, maio := 0,
+	ma_bit_len := 0,
 	ma := f_pad_bit(''B, 64, '0'B)
 };
 template PCUIF_InfoTrxTs tr_PCUIF_InfoTrxTsH0(template uint3_t tsc := ?) := {
 	tsc := tsc,
 	hopping := 0,
 	hsn := ?, maio := ?,
+	ma_bit_len := ?,
 	ma := ?
 };
 
@@ -726,16 +729,19 @@
 	hopping := 1,
 	hsn := hsn,
 	maio := maio,
+	ma_bit_len := lengthof(valueof(ma)),
 	ma := f_pad_bit(valueof(ma), 64, '0'B)
 };
 template PCUIF_InfoTrxTs tr_PCUIF_InfoTrxTsH1(template uint3_t tsc := ?,
 					      template uint6_t hsn := ?,
 					      template uint6_t maio := ?,
-					      template bitstring ma := ?) := {
+					      template bitstring ma := ?,
+					      template uint8_t ma_bit_len := ?) := {
 	tsc := tsc,
 	hopping := 1,
 	hsn := hsn,
 	maio := maio,
+	ma_bit_len := ma_bit_len,
 	ma := ma
 };