Commit Graph

28 Commits

Author SHA1 Message Date
Pau Espin cb00c52b07 pcu: Specify (M)CS to use when sending UL rlcmac data blocks
Apply padding and spare bits in the encoder according to CS/MCS format.

Change-Id: I918acac81f550077daeda3374b3de9b426ff3572
2020-11-16 09:14:28 +00:00
Pau Espin 081b168060 RLCMAC_EncDec: Implement encoding for RlcmacUlEgprsDataHeader HeaderType 1 and 2
Change-Id: I4e0b0e0960634fd2e5f09073a1ef093200dbe707
2020-11-10 12:55:33 +00:00
Pau Espin 5abfded61e RLCMAC_EncDec: Provide decoded (m)cs in (E)GPRS data blocks
Let's provide this information to higher layer since CS is mostly
discovered by original bitstring size which is available during
decoding.

Call the size2mcs converter in each function to avoid having to pass it
as a parameter and have it selfcontained, meaning one can simply call
decode(bitstring) from TTCN3 code and be done with it.

Change-Id: I80ed44e575cc0a11510832e5bbfc07173e7b75b8
2020-11-06 14:20:37 +01:00
Pau Espin 27d6af5edb RLCMAC_Templates: Add functions to convert HeaderType<->MCS<->CPS
They will be used by tests, templates and RLCMAC_EncDec.cc itself.

MCS HEader Type 1 and 2 to CPS conversion lefts as a TODO with
placeholder functions to easily implement when needed.

Change-Id: I18ff55a8067165bf081bf21473b4f88af955bf5b
2020-04-30 20:22:25 +02:00
Pau Espin e8d7d16f13 Split templates in RLCMAC_{CSN1_}Types into their own _Templates file
RLCMAC blocks have a lot of fields and we will potentially require lots
of different templates, as well as functions to handle related structs.

Change-Id: I9c6597178168aa3848b21930f33be698dd2ce545
2020-04-29 19:07:38 +02:00
Pau Espin 372af7a116 library/RLCMAC: Add partial support for EGPRS data block encoding/decoding
* RlcmacUlBlock and RlcmacDlBlock gain a new union field "egprs_data",
  which is chosen when msg contains an egprs data block. Hence one can
  use same structure for both gprs/egprs data and simply check
  "ischosen(block.data_egprs)" to know whether it contains egprs or gprs
  data block.
* C++ code in RLCMAC_EncDec.cc takes care of encoding and decoding of
  each data header type and exposes a generic ttcn3 struct
  "UlMacDataHeader" and "DlMacDataHeader". Decoded header type can be
  found in mac_hdr.header_type. This can be used t5ogether with CPS to
  get the MCS of the message received. Similarly, the encoder will use the
  same field to know how to encode the ttcn3 structure.
* In RLCMAC_EncDec.cc order of functions has been ordered to split
  between encoding and decoding, and inside these split between Ul and
  Dl messages.
* Only encoding of UL HeaderType3 and decoding of Dl HeaderType3 is
  implemented so far in RLCMAC_EncDec.cc. However, all code is already
  arranged and functions prepared (with FIXME fprintf) to easily add the
  missing header types once needed.
* Actually only the decoding of DL HeaderType3 has been tested to work so far.
  Encoding may still be missing to octet-align the data block after the header.
  All these wil lbe fixed once a test using them exists.

Change-Id: I2bc4f877a5e17c57ffa8cf05565dc8593b45aae8
2020-04-29 09:06:34 +00:00
Pau Espin fe3ae511e2 cosmetic: RLCMAC_Types.ttcn: Make different PTCCH types section more visible
On top there's a lot of types related to data blocks. Having more
stylish section header helps orientating one self while looking through
the data blocks.

Change-Id: I87d4694031ea6874b233626818824cdc4f3505c6
2020-04-29 09:06:34 +00:00
Pau Espin 8f24571e56 pcu: Introduce test TC_mo_ping_pong_with_ul_racap
Test sending MS RA capabilities through Packet Resource Request to
update GPRS multislot class.
EGPRS multislot will come in a later commit.

Change-Id: I5026d8b78a3fb82093956b65989d18fa6f6d5424
2020-04-28 16:01:18 +00:00
Pau Espin dc9666ff9c pcu: Verify CodingScheme of received data blocks
Change-Id: I0a5247650548f8a03f7b025aae65652fb424c156
2020-03-20 20:03:59 +01:00
Oliver Smith 8f9daab414 pcu: add TC_paging_cs_from_bts
1. BTS send a CS paging Request over pcu socket
2. Expect a CS paging frame

Related: OS#3927
Change-Id: Ia3ad503c243c9b3b162e204683fa4fa5447bbab3
2019-12-17 13:53:44 +00:00
Pau Espin ff8da1901b pcu: Introduce test TC_t3193
Change-Id: Ib11cd1793d985ff609b10b0e60bddadd5fcfa6d2
2019-12-17 13:53:44 +00:00
Pau Espin 65bab9e3bc pcu: Support sending message to PCU at specific FN
Change-Id: I81a29b4885f3fc6b753a1612d5fd369cd18f5dc6
2019-12-06 09:51:31 +00:00
Pau Espin a3f0a85eb2 pcu: TC_mo_ping_pong: Check DL block is sent and ACK it
Function f_rx_rlcmac_dl_block_exp_data() still misses proper
verification of data. Apparently the received message has 2 blocks,
first with expected 10 bytes, but next one contains 18 bytes with 4
actual bytes and other bits are padding.

Last DL ACK/NACK sent is not yet working correctly. osmo-pcu seems to be
unable to match it against sent DL block (I think due to non-matching
FN), and instead drops it and schedules after timeout an IMM ASS to try
to send DL block again.

Change-Id: Icf66dd5c07690368722c586632c38fb7e770053c
2019-12-04 16:33:31 +00:00
Pau Espin 216596340a pcu: Fix RLCMAC template naming
There's also DL_ACK_NACK message for which a template will be introduced
soon, so let's rename and fix typos/wrong descriptions to avoid
confusion later.

Change-Id: I4a2025ad282006953fcfadf429c980b77cb94371
2019-12-02 19:12:10 +01:00
Pau Espin 596faa40dc pcu: Introduce test TC_t3169
Related: OS#3928
Change-Id: I587413a7de7956daee3423057530e4052a55ba88
2019-10-07 13:27:25 +02:00
Vadim Yanitskiy 1bd8ec5239 library/RLCMAC_Types.ttcn: implement PTCCH/D message coding
Change-Id: I0e3dc3f4853799f1467a5f6726dac0d43c2eb93d
Related: SYS#4606
2019-10-01 05:45:01 +07:00
Vadim Yanitskiy 0eb26621d8 PCU_Tests_RAW.ttcn: add test case for UL link quality adaptation
This change introduces a new test case TC_cs_lqual_ul_tbf, which
is aimed to test the feedback of OsmoPCU on changing link quality
measurements in Uplink Data blocks during an active TBF.

Change-Id: Ia78d93e43a3c41b0b30e70df20a2da31077fd05f
Related: SYS#4607
2019-09-27 03:17:50 +00:00
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
Some of our files didn't have a copyright notice at all, let's add
it.  Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.

Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2019-05-27 10:00:06 +00:00
Harald Welte cc5c1152cc WIP: Work towards a more real DL TBF receiver implementation
Change-Id: I300312734d99f2b8a406f39e04b4f738940f7579
2018-03-12 16:04:15 +01:00
Harald Welte b669ee029e pcu: First DL TBF hack
Change-Id: Ib3f09e125a7a4492d9072f8e9f5896eaac7ed03b
2018-03-12 15:50:03 +01:00
Harald Welte 060e27a476 gprs_gb: working UL TBF with segmentation
Change-Id: I0f93246f02e1bee2e1e9db62af5e1e3559c415e9
2018-03-12 14:23:57 +00:00
Harald Welte 7024baa66c gprs_gb: working Uplink PACKET_CONTROL_ACK against OsmoPCU
Change-Id: I2c7d0eb9371911e28f328caeaed63cb8ec311ac1
2018-03-12 14:23:57 +00:00
Harald Welte 1cd673dd01 rlcmac: Fix name of RRBP_Nplus21_or_22_mod_2715648
It's RRBP_Nplus12_or_22_mod_2715648 not RRBP_Nplus22_or_22_mod_2715648

Change-Id: Idb2ab447611a0571292b8cb31e9f279d0e98966f
2018-03-03 22:40:01 +01:00
Harald Welte 9d3485243a RLCMAC: Integrate encoding/decoding of Control Message Payload
Rlcmac{Dl,Ul}CtrlBlock now contain Rlcmac{Dl,Ul}CtrlMsg rather
than an octetstring payload.
2017-08-01 00:27:39 +02:00
Harald Welte 78a1af6782 RLCMAC: Fix encoding/decoding of 'union' types
We must supply hand-written C++ functions for encoding/decoding
the union types.
2017-07-31 17:33:56 +02:00
Harald Welte efbc2fca24 RLCMAC: Add Rlcmac{Ul,Dl}Block unions to cover both Control + Data blocks 2017-07-31 00:19:13 +02:00
Harald Welte 43e060a50d Add hand-written encoder/decoder for RLC/MAC UL/DL data blocks
Their format is simply too complex to be used with the automatic RAW
encoder/decoder.  Let's implement it by hand, using the automatic
coder whenever possible.
2017-07-30 22:38:03 +02:00
Harald Welte 484160bf21 library: Initial work on GPRS RLC/MAC encoder/decoder
For Downlink and Uplink RLC/MAC Control blocks this is already working
quite nicely.  Data blocks is not working, as their encoding cannot be
expressed in TTCN-3 RAW syntax, and a mixture of C++/native and
RAW-generated coder will be required.
2017-07-28 13:30:24 +02:00