jolly has uploaded this change for review.
Add LAPDm Bter frames to LAPDm_Types.ttcn and BTS_Tests.ttcn
The new type LapdmFrameBter and its send and receive template is used to
send and receive Bter frames, which has a short L2 header and uses all
23 octets for payload.
Bter frames are DCCH UI frames with SAPI 0 and 23 octets sent on
downlink only.
Change-Id: I07a4fd9879dfd9de441c0348a84b7dd5c9864eb4
---
M bts/BTS_Tests.ttcn
M library/LAPDm_Types.ttcn
2 files changed, 40 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/33814/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2a56a25..37d15b8 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -7325,6 +7325,8 @@
lapdm.b4 := dec_LapdmFrameB4(l2);
} else if (ischosen(exp.bbis)) {
lapdm.bbis := dec_LapdmFrameBbis(l2);
+ } else if (ischosen(exp.bter)) {
+ lapdm.bter := dec_LapdmFrameBter(l2);
}
log("Rx LAPDm ", lapdm);
if (match(lapdm, exp)) {
diff --git a/library/LAPDm_Types.ttcn b/library/LAPDm_Types.ttcn
index baa2b7e..4d02863 100644
--- a/library/LAPDm_Types.ttcn
+++ b/library/LAPDm_Types.ttcn
@@ -211,10 +211,20 @@
external function dec_LapdmFrameBbis(in octetstring stream) return LapdmFrameBbis
with { extension "prototype(convert) decode(RAW)" };
+ type record LapdmFrameBter {
+ octetstring payload
+ } with { variant "" };
+
+ external function enc_LapdmFrameBter(in LapdmFrameBter si) return octetstring
+ with { extension "prototype(convert) encode(RAW)" };
+ external function dec_LapdmFrameBter(in octetstring stream) return LapdmFrameBter
+ with { extension "prototype(convert) decode(RAW)" };
+
type union LapdmFrame {
LapdmFrameAB ab,
LapdmFrameBbis bbis,
- LapdmFrameB4 b4
+ LapdmFrameB4 b4,
+ LapdmFrameBter bter
} with { variant "" };
external function enc_LapdmFrame(in LapdmFrame si) return octetstring
@@ -361,6 +371,17 @@
}
}
+ template LapdmFrame ts_LAPDm_Bter_UI(octetstring l3) := {
+ bter := {
+ payload := l3
+ }
+ }
+ template LapdmFrame tr_LAPDm_Bter_UI(template octetstring l3) := {
+ bter := {
+ payload := l3
+ }
+ }
+
template LapdmFrame tr_LAPDm_I(template LapdmSapi sapi, template boolean c_r,
template boolean p, template uint3_t nr,
template uint3_t ns, template octetstring l3,
To view, visit change 33814. To unsubscribe, or for help writing mail filters, visit settings.