This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/10982
Change subject: GSM_Types: Add CBCH_Block definition of TS 04.12
......................................................................
GSM_Types: Add CBCH_Block definition of TS 04.12
Change-Id: Ib034aba11a0219959c4224238e559ba36e95cacf
---
M library/GSM_Types.ttcn
M library/General_Types.ttcn
2 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/10982/1
diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 53208e5..88be975 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -207,6 +207,48 @@
}
}
+
+/* TS 04.12 Section 3.3.1 Block type */
+type record CBCH_BlockType {
+ BIT1 spare,
+ BIT2 lpd,
+ boolean last_block,
+ uint4_t seq_nr
+};
+template (value) CBCH_BlockType ts_CBCH_BlockType(template (value) uint4_t seq_nr, template (value) boolean last_block) := {
+ spare := '0'B,
+ lpd := '01'B,
+ last_block := last_block,
+ seq_nr := seq_nr
+};
+template CBCH_BlockType tr_CBCH_BlockType(template uint4_t seq_nr := ?, template boolean last_block := ?) := {
+ spare := '0'B,
+ lpd := '01'B,
+ last_block := last_block,
+ seq_nr := seq_nr
+};
+
+/* TS 04.12 Section 3.3 */
+type record CBCH_Block {
+ CBCH_BlockType block_type,
+ OCT22 payload
+};
+template (value) CBCH_Block ts_CBCH_Block(template (value) uint4_t seq_nr, template (value) boolean last_block, template (value) OCT22 payload) := {
+ block_type := ts_CBCH_BlockType(seq_nr, last_block),
+ payload := payload
+};
+template CBCH_Block tr_CBCH_Block(template uint4_t seq_nr := ?, template boolean last_block := ?, template OCT22 payload := ?) := {
+ block_type := tr_CBCH_BlockType(seq_nr, last_block),
+ payload := payload
+};
+
+
+external function enc_CBCH_Block(in CBCH_Block msg) return octetstring
+ with { extension "prototype(convert) encode(RAW)" };
+external function dec_CBCH_Block(in octetstring stream) return CBCH_Block
+ with { extension "prototype(convert) decode(RAW)" };
+
+
/* Convert RF signal level in dBm to RxLev (TS 45.008 Chapter 8.1.4) */
function dbm2rxlev(integer dbm) return uint6_t {
var integer rxlev := dbm + 110;
diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn
index 83b2a42..612d5c7 100644
--- a/library/General_Types.ttcn
+++ b/library/General_Types.ttcn
@@ -233,6 +233,7 @@
type octetstring OCT18 length(18) with { variant "FIELDLENGTH(18)" };
type octetstring OCT19 length(19) with { variant "FIELDLENGTH(19)" };
type octetstring OCT20 length(20) with { variant "FIELDLENGTH(20)" };
+ type octetstring OCT22 length(22) with { variant "FIELDLENGTH(22)" };
type octetstring OCT32 length(32) with { variant "FIELDLENGTH(32)" };
type octetstring OCT34 length(34) with { variant "FIELDLENGTH(34)" };
type octetstring OCT46 length(46) with { variant "FIELDLENGTH(46)" };
--
To view, visit https://gerrit.osmocom.org/10982
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib034aba11a0219959c4224238e559ba36e95cacf
Gerrit-Change-Number: 10982
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180916/2645ede0/attachment.htm>