bsc: Fix encoding of 2-digit MNC (paging tests)
The TTCN-3 data types are abstract data types, Encoding artefacts like 'F' for padding shouldn't be seen by the user. Hence, let's pass a 2-digit-long or 3-digit-long hexstring into the encoder functions and let them determine if they should introduce any 'F' for padding or not. Change-Id: If4d3dfc16381493d7e710be746ed963975051fc1
This commit is contained in:
parent
2caa106251
commit
24135bd27f
|
@ -949,7 +949,7 @@ type record Cell_Identity {
|
|||
GsmLac lac,
|
||||
GsmCellId ci
|
||||
};
|
||||
private const Cell_Identity cid := { '001'H, 'f01'H, 1, 0 };
|
||||
private const Cell_Identity cid := { '001'H, '01'H, 1, 0 };
|
||||
|
||||
type set of integer BtsIdList;
|
||||
|
||||
|
|
|
@ -665,8 +665,8 @@ template BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_noCell := {
|
|||
}
|
||||
|
||||
private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 {
|
||||
if (mnc[0] == 'f'H) {
|
||||
return hex2oct(mcc[1] & mcc[0] & mnc[0] & mcc[2] & mnc[2] & mnc[1]);
|
||||
if (lengthof(mnc) == 2) {
|
||||
return hex2oct(mcc[1] & mcc[0] & 'F'H & mcc[2] & mnc[1] & mnc[0]);
|
||||
} else {
|
||||
return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue