Revert "library/GSM_Types: fix encoding of BcdMccMnc (3 octets)"

This is a partial revert of e9858efb90a2997e2a54161d7b5213d8bac51b6e.

I was confused by weird MCC/MNC values in the Destination RAI generated
by the NACC testcases from the PCU_Tests.ttcn.  As I figured out, these
values are not from the INFO.ind, but some hard-coded literals:

* SRC RAI: MCC=262/MNC=42/LAC=13135/RAC=0 (from ts_PCUIF_INFO_default);
* DST RAI: MCC=023/MNC=43/LAC=00423/RAC=2 (resolved by test itself);

so actually they're not incorrect: they're sent by the testsuite itself
in response to the Neighbor Address Resolution Request, and then
expected to be received in the Destination RAI from the PCU.

Another important point is that TITAN produces different results when:

a) converting BcdMccMnc to bytes using the hex2oct() function,
b) converting BcdMccMnc to bytes using the RAW encoder.

The key difference is that TITAN does swap nibbles in each byte when
using the RAW encoder, but does not when using the hex2oct() function.

Use the proper hexorder (low-to-high) in f_enc_BcdMccMnc().
Add a selftest to make sure we're encoding the input properly.

This change makes the NACC testcases pass again.

Change-Id: I6f497b97c4f1e270803e01530be8355beea740bb
Related: SYS#5602
Fixes: OS#5901
1 file changed