I am trying to understand the packing (unpacking) logic implemented by OpenLTE. Why is "optional indicator" set before the "dedicated info type" in ULInformationTransfer message? The ULInformationTransfer message structure (in ASN.1 format) and the corresponding packing code is given below:
LIBLTE_ERROR_ENUM liblte_rrc_pack_ul_information_transfer_msg(LIBLTE_RRC_UL_INFORMATION_TRANSFER_STRUCT *ul_info_transfer,
LIBLTE_BIT_MSG_STRUCT *msg)
{
LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS;
uint8 *msg_ptr = msg->msg;
if(ul_info_transfer != NULL &&
msg != NULL)
{
// Extension choice
liblte_value_2_bits(0, &msg_ptr, 1);
// C1 choice
liblte_value_2_bits(0, &msg_ptr, 2);
// Optional indicator
liblte_value_2_bits(0, &msg_ptr, 1);
// Dedicated info type choice
liblte_value_2_bits(ul_info_transfer->dedicated_info_type, &msg_ptr, 2);
if(LIBLTE_RRC_UL_INFORMATION_TRANSFER_TYPE_NAS == ul_info_transfer->dedicated_info_type)
{
liblte_rrc_pack_dedicated_info_nas_ie(&ul_info_transfer->dedicated_info,
&msg_ptr);
}else{
liblte_rrc_pack_dedicated_info_cdma2000_ie(&ul_info_transfer->dedicated_info,
&msg_ptr);
}
// Fill in the number of bits used
msg->N_bits = msg_ptr - msg->msg;
err = LIBLTE_SUCCESS;
}
return(err);
}
Also, for other messages (e.g., SystemInformationBlockType1) the fields are not set in same order as they are shown in the ASN.1 format. Would anyone please enlighten me about it?
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to understand the packing (unpacking) logic implemented by OpenLTE. Why is "optional indicator" set before the "dedicated info type" in ULInformationTransfer message? The ULInformationTransfer message structure (in ASN.1 format) and the corresponding packing code is given below:
Also, for other messages (e.g., SystemInformationBlockType1) the fields are not set in same order as they are shown in the ASN.1 format. Would anyone please enlighten me about it?
Thank you.