aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-10-01 05:44:52 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-10-01 05:45:01 +0700
commit1bd8ec523942b426160f89a11e63ee7f7f9b3690 (patch)
tree8faa3164f84bce00dc5ff3702c6bf2be22b00fc6
parent759cb299f76566e67b78f920227c6fcb8a436eee (diff)
library/RLCMAC_Types.ttcn: implement PTCCH/D message coding
-rw-r--r--library/RLCMAC_Types.ttcn56
1 files changed, 56 insertions, 0 deletions
diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn
index 39c0c976..ad9d8f4a 100644
--- a/library/RLCMAC_Types.ttcn
+++ b/library/RLCMAC_Types.ttcn
@@ -385,5 +385,61 @@ uint3_t usf) := {
payload := data
}
+ /* PTCCH/D (Packet Timing Advance Control Channel) message.
+ * TODO: add a spec. reference to the message format definition. */
+ type record PTCCHTimingAdvanceIE {
+ BIT1 spare ('0'B),
+ uint7_t ta_val
+ } with { variant "" };
+ type record of PTCCHTimingAdvanceIE PTCCHTimingAdvanceIEs;
+ type record PTCCHDownlinkMsg {
+ PTCCHTimingAdvanceIEs ta_idx length(16),
+ octetstring padding length(7)
+ } with { variant "" };
+
+ external function enc_PTCCHDownlinkMsg(in PTCCHDownlinkMsg si) return octetstring
+ with { extension "prototype(convert) encode(RAW)" };
+ external function dec_PTCCHDownlinkMsg(in octetstring stream) return PTCCHDownlinkMsg
+ with { extension "prototype(convert) decode(RAW)" };
+
+ template PTCCHDownlinkMsg tr_PTCCHDownlinkMsg(
+ template (present) uint7_t tai0_ta := ?,
+ template (present) uint7_t tai1_ta := ?,
+ template (present) uint7_t tai2_ta := ?,
+ template (present) uint7_t tai3_ta := ?,
+ template (present) uint7_t tai4_ta := ?,
+ template (present) uint7_t tai5_ta := ?,
+ template (present) uint7_t tai6_ta := ?,
+ template (present) uint7_t tai7_ta := ?,
+ template (present) uint7_t tai8_ta := ?,
+ template (present) uint7_t tai9_ta := ?,
+ template (present) uint7_t tai10_ta := ?,
+ template (present) uint7_t tai11_ta := ?,
+ template (present) uint7_t tai12_ta := ?,
+ template (present) uint7_t tai13_ta := ?,
+ template (present) uint7_t tai14_ta := ?,
+ template (present) uint7_t tai15_ta := ?
+ ) := {
+ ta_idx := {
+ { spare := '0'B, ta_val := tai0_ta },
+ { spare := '0'B, ta_val := tai1_ta },
+ { spare := '0'B, ta_val := tai2_ta },
+ { spare := '0'B, ta_val := tai3_ta },
+ { spare := '0'B, ta_val := tai4_ta },
+ { spare := '0'B, ta_val := tai5_ta },
+ { spare := '0'B, ta_val := tai6_ta },
+ { spare := '0'B, ta_val := tai7_ta },
+ { spare := '0'B, ta_val := tai8_ta },
+ { spare := '0'B, ta_val := tai9_ta },
+ { spare := '0'B, ta_val := tai10_ta },
+ { spare := '0'B, ta_val := tai11_ta },
+ { spare := '0'B, ta_val := tai12_ta },
+ { spare := '0'B, ta_val := tai13_ta },
+ { spare := '0'B, ta_val := tai14_ta },
+ { spare := '0'B, ta_val := tai15_ta }
+ },
+ padding := '2B2B2B2B2B2B2B'O
+ }
+
} with { encode "RAW"; variant "FIELDORDER(msb)" }