library/GSM_RR_Types.ttcn: fix: apply BYTEORDER(last) globally
By default, the BYTEORDER for BIT1..N sub-types is set to 'first'.
This may result in incorrect decoding of bit-fields located on the
boundary of two octets. For example:
IA Rest Octets
L... .... = First Discriminator Bit: Low
.H.. .... = Second Discriminator Bit: High
..0. .... = Discriminator bit: EGPRS Packet Uplink Assignment
...0 .... = Downlink/Uplink: EGPRS Packet Uplink Assignment
EGPRS Packet Uplink Assignment
.... 0001 1... .... = Extended_RA: 3 // <------------ (!)
.0.. .... = Access Technologies Request: Not Present
..1. .... = TFI/Multiblock: TFI Assignment Present
...0 0000 = TFI_Assignment: 0
As can be seen, the field 'Extended_RA' in this particular case
occupies 4 LSBs of the first octet and 1 MSB of the second. So
instead of '00011'B, TITAN's RAW codec decodes '10001'B.
For more details, see:
https://www.eclipse.org/forums/index.php/m/1826511/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488
Change-Id: I481a40daef3eed4a3daa687ad87c4128a13181b4
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 9d71f80..a7d927a 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -1029,4 +1029,4 @@
}
};
-} with { encode "RAW" ; variant "FIELDORDER(msb)" }
+} with { encode "RAW" ; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" }