r64_endec_test.c

来自「wimax bs模拟器」· C语言 代码 · 共 1,962 行 · 第 1/5 页

C
1,962 行
字号
    R64_DATA_PATH_RELEASE_REQUEST_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "dataPathRelReq";

    p_msg = &p_r64_msg->u.dataPathRelReq;

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");

    R64_SET_TLV(p_msg->present.pagingInfoPresent,
                   r64_set_tlv_paging_info,
                   &p_msg->pagingInfo,
                   p_name,
                   "pagingInfo");

    return;
}

void r64_set_ft_data_path_msg_release_response(R64_MSG_S * p_r64_msg)
{
    R64_DATA_PATH_RELEASE_RESPONSE_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "dataPathRelRsp";

    p_msg = &p_r64_msg->u.dataPathRelRsp;

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");

    return;
}

void r64_set_ft_data_path_msg_release_ack(R64_MSG_S * p_r64_msg)
{
    R64_DATA_PATH_RELEASE_ACK_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "dataPathRelAck";

    p_msg = &p_r64_msg->u.dataPathRelAck;

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");
	return;
}

void r64_set_ft_data_path_msg_de_registration_ack(R64_MSG_S * p_r64_msg)
{
    R64_DATA_PATH_DEREGISTER_ACK_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "dataPathDeregRsp";

    p_msg = &p_r64_msg->u.dataPathDeregAck;

    R64_SET_TLV(p_msg->present.deregTypePresent,
                   r64_set_tlv_registration_type,
                   &p_msg->deregType,
                   p_name,
                   "deregType");

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    return;
}

void r64_set_ft_data_path_msg_setup_ack(R64_MSG_S * p_r64_msg)
{
    R64_DATA_PATH_ESTABLISH_ACK_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "dataPathEstAck";

    p_msg = &p_r64_msg->u.dataPathEstAck;

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");
	return;
}

void r64_set_ft_context_msg_request(R64_MSG_S * p_r64_msg)
{
    R64_MS_CONTEXT_REQUEST_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "msContextReq";

    p_msg = &p_r64_msg->u.msContextReq;

    R64_SET_TLV(p_msg->present.purposePresent,
                   r64_set_tlv_context_purpose_indicator,
                   &p_msg->purpose,
                   p_name,
                   "purpose");

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");

    R64_SET_TLV(p_msg->present.csTypePresent,
                   r64_set_tlv_cs_type,
                   &p_msg->csType,
                   p_name,
                   "csType");

    R64_SET_TLV(p_msg->present.dlCidNumPresent,
                   r64_set_tlv_number_of_downlink_cids,
                   &p_msg->dlCidNum,
                   p_name,
                   "dlCidNum");

    R64_SET_TLV(p_msg->present.ulCidNumPresent,
                   r64_set_tlv_number_of_uplink_cids,
                   &p_msg->ulCidNum,
                   p_name,
                   "ulCidNum");

    R64_SET_TLV(p_msg->present.classifierNumPresent,
                   r64_set_tlv_number_of_classifiers,
                   &p_msg->classifierNum,
                   p_name,
                   "classifierNum");

    R64_SET_TLV(p_msg->present.idleModeTimerPresent,
                   r64_set_tlv_idle_mode_timer,
                   &p_msg->idleModeTimer,
                   p_name,
                   "idleModeTimer");

    R64_SET_TLV(p_msg->present.authPolicyPresent,
                   r64_set_tlv_auth_policy,
                   &p_msg->authPolicy,
                   p_name,
                   "authPolicy");

    return;
}

void r64_set_ft_context_msg_report(R64_MSG_S * p_r64_msg)
{
    R64_MS_CONTEXT_REPORT_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "msContextRep";

    p_msg = &p_r64_msg->u.msContextRep;

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");

    R64_SET_TLV(p_msg->present.authPolicyPresent,
                   r64_set_tlv_auth_policy,
                   &p_msg->authPolicy,
                   p_name,
                   "authPolicy");

    R64_SET_TLV(p_msg->present.authCompletePresent,
                   r64_set_tlv_auth_complete,
                   &p_msg->authComplete,
                   p_name,
                   "authComplete");

    R64_SET_TLV(p_msg->present.authResultPresent,
                   r64_set_tlv_auth_result,
                   &p_msg->authResult,
                   p_name,
                   "authResult");

    R64_SET_TLV(p_msg->present.eapMsgPresent,
                   r64_set_tlv_eap_message,
                   &p_msg->eapMsg,
                   p_name,
                   "eap_message");

    R64_SET_TLV(p_msg->present.akContextPresent,
                   r64_set_tlv_ak_context,
                   &p_msg->akContext,
                   p_name,
                   "akContext");

    R64_SET_TLV(p_msg->present.saDescriptorPresent,
                   r64_set_tlv_sa_descriptor,
                   &p_msg->saDescriptor,
                   p_name,
                   "saDescriptor");

    R64_SET_TLV(p_msg->present.csTypePresent,
                   r64_set_tlv_cs_type,
                   &p_msg->csType,
                   p_name,
                   "csType");

    R64_SET_TLV(p_msg->present.dlCidNumPresent,
                   r64_set_tlv_number_of_downlink_cids,
                   &p_msg->dlCidNum,
                   p_name,
                   "dlCidNum");

    R64_SET_TLV(p_msg->present.ulCidNumPresent,
                   r64_set_tlv_number_of_uplink_cids,
                   &p_msg->ulCidNum,
                   p_name,
                   "ulCidNum");

    R64_SET_TLV(p_msg->present.classifierNumPresent,
                   r64_set_tlv_number_of_classifiers,
                   &p_msg->classifierNum,
                   p_name,
                   "classifierNum");

    R64_SET_TLV(p_msg->present.contextPurposeIndicatorPresent,
                   r64_set_tlv_context_purpose_indicator,
                   &p_msg->contextPurposeIndicator,
                   p_name,
                   "contextPurposeIndicator");

    R64_SET_TLV(p_msg->present.causeCodePresent,
                   r64_set_tlv_cause_code,
                   &p_msg->causeCode,
                   p_name,
                   "causeCode");

    return;
}

void r64_set_ft_context_msg_ack(R64_MSG_S * p_r64_msg)
{
    R64_MS_CONTEXT_REPORT_ACK_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "msContextRepAck";

    p_msg = &p_r64_msg->u.msContextRepAck;


    R64_SET_TLV(p_msg->present.purposeIndPresent,
                   r64_set_tlv_context_purpose_indicator,
                   &p_msg->purposeInd,
                   p_name,
                   "purposeInd");

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");

    R64_SET_TLV(p_msg->present.causeCodePresent,
                   r64_set_tlv_cause_code,
                   &p_msg->causeCode,
                   p_name,
                   "causeCode");

    return;
}

void r64_set_ft_context_msg_rsp(R64_MSG_S * p_r64_msg)
{
    R64_MS_CONTEXT_RSP_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "msContextRsp";

    p_msg = &p_r64_msg->u.msContextRsp;

    R64_SET_TLV(p_msg->present.msIdPresent,
                   r64_set_tlv_ms_id,
                   &p_msg->msId,
                   p_name,
                   "msId");

    R64_SET_TLV(p_msg->present.eventCodePresent,
                   r64_set_tlv_im_event_code,
                   &p_msg->eventCode,
                   p_name,
                   "eventCode");

    R64_SET_TLV(p_msg->present.bsIdPresent,
                   r64_set_tlv_bs_id,
                   &p_msg->bsId,
                   p_name,
                   "bsId");

    R64_SET_TLV(p_msg->present.akContextPresent,
                   r64_set_tlv_ak_context,
                   &p_msg->akContext,
                   p_name,
                   "akContext");
    return;
}

void r64_set_ft_context_msg_ms_info_request(R64_MSG_S * p_r64_msg)
{
    R64_MS_INFO_REQUEST_S * p_msg;

    WORD w_one_tlv_value_len = 0;
    WORD w_tlvs_len = 0;
    char * p_name = "msInfoReq";

    p_msg = &p_r64_msg->u.msInfoReq;

    R64_SET_TLV(p_msg->present.msInfoPresent,
                   r64_set_tlv_ms_info,
                   &p_msg->msInfo,
                   p_name,
                   "msInfo");

    R64_SET_TLV(p_msg->present.eventCodePresent,
                   r64_set_tlv_im_event_code,
                   &p_msg->eventCode,
                   p_name,
                   "eventCode");

    R64_SET_TLV(p_msg->present.bsInfoPresent,
                   r64_set_tlv_bs_info,
                   &p_msg->bsInfo,
                   p_name,
                   "bsInfo");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?