RLCMAC_EncDec: Implement encoding for RlcmacUlEgprsDataHeader HeaderType 1 and 2
Change-Id: I4e0b0e0960634fd2e5f09073a1ef093200dbe707
This commit is contained in:
parent
563bcd6cb5
commit
081b168060
|
@ -1140,13 +1140,48 @@ OCTETSTRING enc__RlcmacUlDataBlock(const RlcmacUlDataBlock& si)
|
|||
static
|
||||
void enc__RlcmacUlEgprsDataHeader_type1(const EgprsUlMacDataHeader& si, TTCN_Buffer& ttcn_buffer)
|
||||
{
|
||||
fprintf(stderr, "FIXME: Not implemented! %s (%s:%u)\n", __func__, __FILE__, __LINE__);
|
||||
struct gprs_rlc_ul_header_egprs_1 egprs1;
|
||||
|
||||
egprs1.r = bs2uint8(si.r__ri());
|
||||
egprs1.si = bs2uint8(si.foi__si());
|
||||
egprs1.cv = si.countdown();
|
||||
egprs1.tfi_hi = si.tfi() >> 0;
|
||||
egprs1.tfi_lo = si.tfi() >> 2;
|
||||
egprs1.bsn1_hi = si.bsn1() >> 0;
|
||||
egprs1.bsn1_lo = si.bsn1() >> 5;
|
||||
egprs1.bsn2_hi = si.bsn2__offset() >> 0;
|
||||
egprs1.bsn2_lo = si.bsn2__offset() >> 2;
|
||||
egprs1.cps = si.cps();
|
||||
egprs1.rsb = bs2uint8(si.rsb());
|
||||
egprs1.pi = si.pfi__ind();
|
||||
egprs1.spare_hi = 0;
|
||||
egprs1.spare_lo = 0;
|
||||
egprs1.dummy = 0;
|
||||
|
||||
ttcn_buffer.put_s(sizeof(egprs1), (const unsigned char *)&egprs1);
|
||||
}
|
||||
|
||||
static
|
||||
void enc__RlcmacUlEgprsDataHeader_type2(const EgprsUlMacDataHeader& si, TTCN_Buffer& ttcn_buffer)
|
||||
{
|
||||
fprintf(stderr, "FIXME: Not implemented! %s (%s:%u)\n", __func__, __FILE__, __LINE__);
|
||||
struct gprs_rlc_ul_header_egprs_2 egprs2;
|
||||
|
||||
egprs2.r = bs2uint8(si.r__ri());
|
||||
egprs2.si = bs2uint8(si.foi__si());
|
||||
egprs2.cv = si.countdown();
|
||||
egprs2.tfi_hi = si.tfi() >> 0;
|
||||
egprs2.tfi_lo = si.tfi() >> 2;
|
||||
egprs2.bsn1_hi = si.bsn1() >> 0;
|
||||
egprs2.bsn1_lo = si.bsn1() >> 5;
|
||||
egprs2.cps_hi = si.cps() >> 0;
|
||||
egprs2.cps_lo = si.cps() >> 2;
|
||||
egprs2.rsb = bs2uint8(si.rsb());
|
||||
egprs2.pi = si.pfi__ind();
|
||||
egprs2.spare_hi = 0;
|
||||
egprs2.spare_lo = 0;
|
||||
egprs2.dummy = 0;
|
||||
|
||||
ttcn_buffer.put_s(sizeof(egprs2), (const unsigned char *)&egprs2);
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
@ -421,7 +421,7 @@ module RLCMAC_Templates {
|
|||
/* Template for uplink Data block */
|
||||
template RlcmacUlBlock t_RLCMAC_UL_EGPRS_DATA(CodingScheme mcs,
|
||||
template uint5_t tfi, template uint4_t cv,
|
||||
template uint11_t bsn1, template EgprsLlcBlocks blocks := {}) := {
|
||||
template uint11_t bsn1, template uint8_t bsn2_offset := 0, template EgprsLlcBlocks blocks := {}) := {
|
||||
data_egprs := {
|
||||
mcs := mcs,
|
||||
mac_hdr := {
|
||||
|
@ -431,6 +431,7 @@ module RLCMAC_Templates {
|
|||
foi_si := '0'B,
|
||||
r_ri := '0'B,
|
||||
bsn1 := bsn1,
|
||||
bsn2_offset := bsn2_offset,
|
||||
cps := f_rlcmac_mcs_to_cps(mcs, 1, false),
|
||||
pfi_ind := false,
|
||||
rsb := '0'B,
|
||||
|
|
|
@ -223,7 +223,7 @@ module RLCMAC_Types {
|
|||
MacRrbp rrbp,
|
||||
BIT2 esp,
|
||||
uint3_t usf,
|
||||
uint14_t bsn1,
|
||||
uint11_t bsn1,
|
||||
uint8_t bsn2_offset,
|
||||
uint2_t pr, /* power reduction */
|
||||
uint2_t spb,
|
||||
|
@ -279,6 +279,7 @@ module RLCMAC_Types {
|
|||
BIT1 foi_si,
|
||||
BIT1 r_ri,
|
||||
uint11_t bsn1,
|
||||
uint8_t bsn2_offset,
|
||||
uint4_t cps,
|
||||
boolean pfi_ind,
|
||||
BIT1 rsb,
|
||||
|
|
Loading…
Reference in New Issue