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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17996 ) Change subject: BTS: refactor f_si3_has_gprs_indicator(): use SI3RestOctets ...................................................................... BTS: refactor f_si3_has_gprs_indicator(): use SI3RestOctets Change-Id: I2dc970d3d34a7d70c6845558544259e387f1d6fc Signed-off-by: Vadim Yanitskiy <axilirator at gmail.com> --- M bts/BTS_Tests.ttcn 1 file changed, 4 insertions(+), 59 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/96/17996/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 794d604..774f08f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -29,6 +29,7 @@ import from GSM_RR_Types all; import from Osmocom_Types all; import from GSM_Types all; +import from GSM_RestOctets all; import from GSM_SystemInformation all; import from L1CTL_PortType all; import from L1CTL_Types all; @@ -4904,65 +4905,9 @@ return si.payload.si3; } -/* CSN.1 L/H logic: is the bit at the current position using "inverted logic" (true) or not? */ -private function f_bitpos_is_inv(integer idx) return boolean { - select (idx mod 8) { - case ((2, 4, 6, 7)) { return true; } /* 1-bits of 0x2B */ - case else { return false; } /* 0-bits of 0x2B */ - } -} -/* determine if the bit at position 'idx' in 'str' is a CSN.1 'H' (true) or 'L' (false) */ -private function f_bit_is_high(bitstring str, integer idx) return boolean { - var boolean invert := f_bitpos_is_inv(idx); - if (invert) { - if (str[idx] == '1'B) { - return false; - } else { - return true; - } - } else { - if (str[idx] == '1'B) { - return true; - } else { - return false; - } - } -} -/* As the TITAN RAW codec cannot expres the CSN.1 L/H concept yet, we have to do this - manually. Let's hope https://www.eclipse.org/forums/index.php/t/1099087/ takes off and - we can replace this piece of code soon ... */ -private function f_si3_has_gprs_indicator(OCT4 si3_restoctets) return boolean { - var bitstring bits := oct2bit(si3_restoctets); - var integer idx := 0; - - if (f_bit_is_high(bits, idx)) { - /* skip Optional selection parameters */ - idx := idx + 16; - } else { - idx := idx + 1; - } - - if (f_bit_is_high(bits, idx)) { - /* skip Optional power offset */ - idx := idx + 3; - } else { - idx := idx + 1; - } - - /* skip SI2ter Indicator */ - idx := idx + 1; - - /* skip Early CM Sending Control */ - idx := idx + 1; - - /* skip Scheduling if and where */ - if (f_bit_is_high(bits, idx)) { - idx := idx + 4; - } else { - idx := idx + 1; - } - - return f_bit_is_high(bits, idx); +private function f_si3_has_gprs_indicator(Si3RestOctets ro) return boolean { + var SI3RestOctets rest := dec_SI3RestOctets(ro); + return rest.gprs_ind.presence == '1'B; } testcase TC_pcu_socket_noconnect_nosi3gprs() runs on test_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17996 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: I2dc970d3d34a7d70c6845558544259e387f1d6fc Gerrit-Change-Number: 17996 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200502/4c0853ec/attachment.htm>