library/PCUIF_Types: use PADDING attribute for 'PCUIF_Message'
PCUIFv9 compatibility has been dropped in [1], so now we can tell
TITAN's RAW codec what kind of padding to expect in received
messages and to append to encoded messages. This eliminates
thousands of warnings about unhandled tail octets.
Change-Id: Id5ab587f7984a91f3603efc5d427aa4cb4fa6757
Related: [1] Ia9f366ca1fdad700a90ca3367e43523f7bac39a1
Related: OS#5083
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 2216a0e..b259cfc 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -18,8 +18,6 @@
modulepar {
/* PCUIF version supported by the IUT */
PCUIF_Version mp_pcuif_version := 10;
- /* Whether to pad outgoing messages */
- boolean mp_pcuif_padding := true;
};
const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts";
@@ -282,6 +280,8 @@
time_ind, msg_type = PCU_IF_MSG_TIME_IND;
pag_req, msg_type = PCU_IF_MSG_PAG_REQ;
app_info_req, msg_type = PCU_IF_MSG_APP_INFO_REQ)"
+ /* PCUIFv10: 1006 * 8 = 8048 bits */
+ variant "PADDING(8048)"
};
external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring
@@ -289,26 +289,6 @@
external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message
with { extension "prototype(convert) decode(RAW)" };
-function enc_pad_PCUIF_Message(in PCUIF_Message pdu)
-return octetstring {
- var octetstring stream;
- var integer len;
-
- stream := enc_PCUIF_Message(pdu);
- if (not mp_pcuif_padding) {
- return stream;
- }
-
- select (mp_pcuif_version) {
- case (9) { len := 212; }
- /* FIXME: 1006 % 4 > 0 (alignment) */
- case (10) { len := 1006; }
- case else { len := 0; }
- }
-
- return f_pad_oct(stream, len, '00'O);
-}
-
/* Generic template for matching messages by type and/or the BTS number */
template PCUIF_Message tr_PCUIF_MSG(template PCUIF_MsgType msg_type := ?,