# 16 - 20 March 2020 ###### tags: `Study Note` ## Daily Report 16 March 2020 - finishing the amber release part of F1 interface mssages [F1 Interfaces](https://hackmd.io/@JonathanOranDocs/SJdw_Yp7L/%2F_MAHs71dQX2UlqM0mfblAQ) ## Daily Report 17 March 2020 - learn about bronze release part of F1 interface messages.[F1 Interfaces](https://hackmd.io/@JonathanOranDocs/SJdw_Yp7L/%2F_MAHs71dQX2UlqM0mfblAQ) - retry the conversion (doxygen->breathe->exhale->sphinx method) ## Daily Report 18 March 2020 - sucessfully convert sample C files to RST/HTML with doxygen->breathe->exhale->sphinx method - retry the conversion on oduphy files. ![](https://i.imgur.com/Pli579m.png) Got problem for the conversion, the conversion need the source to be encoded in UTF-8. Turns out Intel's source code is not encoded in UTF-8. Will check it in Windows. :::spoiler From the fhi_lib/app folder. hasn't check the other folder ``` . -- inode/directory; charset=binary ./dpdk.sh -- text/x-shellscript; charset=us-ascii ./usecase -- inode/directory; charset=binary ./usecase/mu3_100mhz -- inode/directory; charset=binary ./usecase/mu3_100mhz/config_file_o_ru.dat -- text/plain; charset=us-ascii ./usecase/mu3_100mhz/config_file_o_du.dat -- text/plain; charset=us-ascii ./usecase/mu0_10mhz -- inode/directory; charset=binary ./usecase/mu0_10mhz/config_file_o_ru.dat -- text/plain; charset=us-ascii ./usecase/mu0_10mhz/config_file_o_du.dat -- text/plain; charset=us-ascii ./usecase/mu0_10mhz/12 -- inode/directory; charset=binary ./usecase/mu0_10mhz/12/config_file_o_ru.dat -- text/plain; charset=us-ascii ./usecase/mu0_10mhz/12/config_file_o_du.dat -- text/plain; charset=us-ascii ./usecase/mu1_100mhz -- inode/directory; charset=binary ./usecase/mu1_100mhz/config_file_o_ru.dat -- text/plain; charset=unknown-8bit ./usecase/mu1_100mhz/config_file_o_du.dat -- text/plain; charset=unknown-8bit ./usecase/mu0_5mhz -- inode/directory; charset=binary ./usecase/mu0_5mhz/config_file_o_ru.dat -- text/plain; charset=us-ascii ./usecase/mu0_5mhz/config_file_o_du.dat -- text/plain; charset=us-ascii ./usecase/mu0_20mhz -- inode/directory; charset=binary ./usecase/mu0_20mhz/config_file_o_ru.dat -- text/plain; charset=us-ascii ./usecase/mu0_20mhz/config_file_o_du.dat -- text/plain; charset=us-ascii ./gen_test.m -- text/plain; charset=us-ascii ./Makefile -- text/plain; charset=us-ascii ./ifft_in.txt -- text/plain; charset=us-ascii ./run_o_ru.sh -- text/x-shellscript; charset=us-ascii ./src -- inode/directory; charset=binary ./src/xran_mlog_task_id.h -- text/x-c; charset=us-ascii ./src/common.h -- text/x-c; charset=us-ascii ./src/debug.h -- text/x-c; charset=us-ascii ./src/common.c -- text/x-c; charset=unknown-8bit ./src/sample-app.c -- text/x-c; charset=us-ascii ./src/config.h -- text/x-c; charset=us-ascii ./src/config.c -- text/x-c; charset=us-ascii ./run_o_du.sh -- text/x-shellscript; charset=us-ascii ``` files with charset=unknown-8bit need to be fixed to us-ascii or utf-8. the charset=binary means folder. ::: :::info Please tell the developers to fix the encoding standard ::: ## Daily Report 19 March 2020 - Learn about the F1 messages - Learn about the PDU / struct for F1 messages in Radisys' F1AP-PDU ``` /* InitiatingMessage */ typedef struct InitiatingMessage { ProcedureCode_t procedureCode; Criticality_t criticality; struct InitiatingMessage__value { InitiatingMessage__value_PR present; union InitiatingMessage__value_u { Reset_t Reset; F1SetupRequest_t F1SetupRequest; GNBDUConfigurationUpdate_t GNBDUConfigurationUpdate; GNBCUConfigurationUpdate_t GNBCUConfigurationUpdate; UEContextSetupRequest_t UEContextSetupRequest; UEContextReleaseCommand_t UEContextReleaseCommand; UEContextModificationRequest_t UEContextModificationRequest; UEContextModificationRequired_t UEContextModificationRequired; WriteReplaceWarningRequest_t WriteReplaceWarningRequest; PWSCancelRequest_t PWSCancelRequest; GNBDUResourceCoordinationRequest_t GNBDUResourceCoordinationRequest; ErrorIndication_t ErrorIndication; UEContextReleaseRequest_t UEContextReleaseRequest; DLRRCMessageTransfer_t DLRRCMessageTransfer; ULRRCMessageTransfer_t ULRRCMessageTransfer; UEInactivityNotification_t UEInactivityNotification; PrivateMessage_t PrivateMessage; InitialULRRCMessageTransfer_t InitialULRRCMessageTransfer; SystemInformationDeliveryCommand_t SystemInformationDeliveryCommand; Paging_t Paging; Notify_t Notify; PWSRestartIndication_t PWSRestartIndication; PWSFailureIndication_t PWSFailureIndication; GNBDUStatusIndication_t GNBDUStatusIndication; RRCDeliveryReport_t RRCDeliveryReport; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } InitiatingMessage_t; /* * This type provides the context information for various ASN.1 routines, * primarily ones doing decoding. A member _asn_ctx of this type must be * included into certain target language's structures, such as compound types. */ typedef struct asn_struct_ctx_s { short phase; /* Decoding phase */ short step; /* Elementary step of a phase */ int context; /* Other context information */ void *ptr; /* Decoder-specific stuff (stack elements) */ ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ } asn_struct_ctx_t; /* Dependencies */ typedef enum F1AP_PDU_PR { F1AP_PDU_PR_NOTHING, /* No components present */ F1AP_PDU_PR_initiatingMessage, F1AP_PDU_PR_successfulOutcome, F1AP_PDU_PR_unsuccessfulOutcome, F1AP_PDU_PR_choice_extension } F1AP_PDU_PR; /* F1AP-PDU */ typedef struct F1AP_PDU { F1AP_PDU_PR present; union F1AP_PDU_u { InitiatingMessage_t *initiatingMessage; SuccessfulOutcome_t *successfulOutcome; UnsuccessfulOutcome_t *unsuccessfulOutcome; struct ProtocolIE_SingleContainer *choice_extension; } choice; #if 0 union F1AP_PDU_u { struct InitiatingMessage *initiatingMessage; struct SuccessfulOutcome *successfulOutcome; struct UnsuccessfulOutcome *unsuccessfulOutcome; struct ProtocolIE_SingleContainer *choice_extension; } choice; #endif /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } F1AP_PDU_t; ``` the choice variable use union type. Means only one type can be used at a time. ## Daily Report 20 March 2020 - Trace BuildF1SetupReq(), the function that create F1 message Setup Request. odu.l2/src/du_app/f1ap/fap_msg_hdl.c line 51 - 205 ``` 1. Variable Declaration : line 67 2. Memory Allocation for F1AP-PDU : line 76 1. Set as initiating message : line 83 2. memory allocation for the message : line 84 3. filling the message : line 93 1. memory allocation for elements (3 elements) called as F1 Setup members : line 103 2. list of elements: 1. Transaction ID 2. DU_ID 3. DU_Name 4. Encode the message : line 185 ==> the message **will be carried by public variable** named encBuf (? Unsure ?) ``` - Trace BuildF1SetupRsp(), the function that create F1 message Setup Response. odu.l2/src/du_app/f1ap/fap_msg_hdl.c line 207 - 368 ``` 1. Variable Declaration : line 227 2. Memory Allocation for F1AP-PDU : line 238 1. Set as succesfull message : line 245 2. memory allocation for the message : line 247 3. filling the message : line 256 1. memory allocation for elements (3 elements) called as F1 Setup members : line 266 2. list of elements: 1. Transaction ID : 293 2. CU_Name : 300 3. RRC_version : 321 4. Encode the message : line 348 ==> the message **will be carried by public variable** named encBuf (? Unsure ?) ``` :::info based on comparison between the BuildF1SetupReq() and BuildF1SetupRsp(): - difference on the F1AP-PDU message type. - BuildF1SetupReq is set as initiating message - BuildF1SetupRsp is set as succesfull message - the difference is probably in the ASN - The elements - BuildF1SetupReq containing: 1. Transaction ID 2. DU_ID 3. DU_Name - BuildF1SetupReq containing: 1. Transaction ID 2. CU_Name 3. RRC_version ::: - Try to trace F1InmsgHdlr(), but I think this function is kind of "dummy" function, It receive the (any) messages and then reply the message with the correct answer. for example, the function can handle F1AP Setup Request and reply with F1AP Setup Response then when receive Setup Response it will reply with DU Config Update. When receive Du Config Update, it will reply with DU Config ACK. When Reeive the ACK it will /* TODO :Check the deallocation */. **so, maybe this function is just for debugging.** **TODO : Check from the DU side. The CU side is completly dummy**