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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19871 ) Change subject: library/Osmocom_Types: share RA generation helpers from BTS_Tests ...................................................................... library/Osmocom_Types: share RA generation helpers from BTS_Tests Change-Id: I7c9c3d243b39bbd3d521009d23c1043df729ee10 --- M bts/BTS_Tests.ttcn M library/Osmocom_Types.ttcn 2 files changed, 49 insertions(+), 49 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 34fd702..d9ad45b 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1348,55 +1348,6 @@ * RACH Handling ***********************************************************************/ -/* like L1SAP_IS_PACKET_RACH */ -private function ra_is_ps(OCT1 ra) return boolean { - if ((ra and4b 'F0'O == '70'O) and (ra and4b '0F'O != '0F'O)) { - return true; - } - return false; -} - -private function ra_is_emerg(OCT1 ra) return boolean { - /* See also: 3GPP TS 04.08, Table 9.9, ra=101xxxxx */ - if ((ra and4b 'E0'O == 'A0'O) and (ra and4b '1F'O != '1F'O)) { - return true; - } - return false; -} - -/* generate a random RACH for circuit-switched */ -private function f_rnd_ra_cs() return OCT1 { - var OCT1 ra; - do { - ra := f_rnd_octstring(1); - } while (ra_is_ps(ra)); - return ra; -} - -/* generate a random RACH for emergency */ -private function f_rnd_ra_emerg() return OCT1 { - var OCT1 ra; - do { - ra := f_rnd_octstring(1); - } while (not ra_is_emerg(ra)); - return ra; -} - -/* generate a random RACH for packet-switched */ -private function f_rnd_ra_ps() return OCT1 { - var OCT1 ra; - do { - ra := f_rnd_octstring(1); - } while (not ra_is_ps(ra)); - return ra; -} - -/* generate a random 11-bit RA (packet-switched only) */ -private function f_rnd_ra11_ps() return BIT11 { - var integer ra11 := f_rnd_int(bit2int('11111111111'B)); - return int2bit(ra11, 11); -} - /* Send 1000 RACH requests and check their RA+FN on the RSL side */ private function f_TC_rach_content(boolean emerg) runs on test_CT { f_init(); diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 994a0cc..2ee3215 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -198,5 +198,54 @@ } } +/* like L1SAP_IS_PACKET_RACH */ +function ra_is_ps(OCT1 ra) return boolean { + if ((ra and4b 'F0'O == '70'O) and (ra and4b '0F'O != '0F'O)) { + return true; + } + return false; +} + +function ra_is_emerg(OCT1 ra) return boolean { + /* See also: 3GPP TS 04.08, Table 9.9, ra=101xxxxx */ + if ((ra and4b 'E0'O == 'A0'O) and (ra and4b '1F'O != '1F'O)) { + return true; + } + return false; +} + +/* generate a random RACH for circuit-switched */ +function f_rnd_ra_cs() return OCT1 { + var OCT1 ra; + do { + ra := f_rnd_octstring(1); + } while (ra_is_ps(ra)); + return ra; +} + +/* generate a random RACH for emergency */ +function f_rnd_ra_emerg() return OCT1 { + var OCT1 ra; + do { + ra := f_rnd_octstring(1); + } while (not ra_is_emerg(ra)); + return ra; +} + +/* generate a random RACH for packet-switched */ +function f_rnd_ra_ps() return OCT1 { + var OCT1 ra; + do { + ra := f_rnd_octstring(1); + } while (not ra_is_ps(ra)); + return ra; +} + +/* generate a random 11-bit RA (packet-switched only) */ +function f_rnd_ra11_ps() return BIT11 { + var integer ra11 := f_rnd_int(bit2int('11111111111'B)); + return int2bit(ra11, 11); +} + } with { encode "RAW"; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19871 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7c9c3d243b39bbd3d521009d23c1043df729ee10 Gerrit-Change-Number: 19871 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200828/6fd1f7cd/attachment.htm>