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
This commit is contained in:
Vadim Yanitskiy 2020-04-27 22:04:01 +07:00 committed by pespin
parent f400151003
commit 1175b5e509
1 changed files with 1 additions and 1 deletions

View File

@ -1029,4 +1029,4 @@ module GSM_RR_Types {
}
};
} with { encode "RAW" ; variant "FIELDORDER(msb)" }
} with { encode "RAW" ; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" }