RAW coder: Handle a variable-length payload + fixed footer [message #1768774] |
Sun, 23 July 2017 15:06  |
Eclipse User |
|
|
|
I'm trying to express the 3GPP TS 04.064 (GPRS-LLC) message format using the TITAN RAW codec.
One peculiarity of the message structure is that there is:
* a header (Address + Control field) that I can express without problems in TTCN-3 with TITAN RAW "variant"s
* a variable-length payload field (without an explciit length field!)
* a 3-byte footer (the Frame Check Sequence)
If I express this as
type integer uint24_t (0..16777215) with { variant "unsigned 24 bit" };
type uint24_t LlcFcs;
type record LlcPdu {
LlcAddressField addr,
LlcCtrlUnion ctrl,
octetstring payload,
LlcFcs fcs
} with { variant "" };
then the "payload" variable-length octetstrign field always grabs the FCS, too, and the TITAN runtime complains about 0 bits being left for FCS:
20:47:25.157225 Test.ttcn:163: Dynamic test case error: While RAW-decoding type '@LLC_Types.LlcPdu': There are not enough bits in the buffer to decode type @LLC_Types.LlcPdu.fcs (needed: 24, found: 0).
The full module can be found at http://git.osmocom.org/osmo-ttcn3-hacks/tree/gprs_gb/LLC_Types.ttcn
What am I missing here? How can I express this?
Thanks in advance!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04497 seconds