Commit cd098f39 authored by yilmazt's avatar yilmazt

develop&-nr merge

parents 954e6c64 4f55943b
enb_*.log
ue_*.log
ping_*.*
iperf_*.*
phones_list.txt
modules_list.txt
test_results*.html
This diff is collapsed.
This diff is collapsed.
......@@ -56,7 +56,6 @@
<testCase id="040302">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
</testCase>
<testCase id="040401">
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>epc-start-oai-ue</htmlTabRef>
<htmlTabName>EPC-Start-OAI-UE</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
050101 000001 060101 000001 070101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050101">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="060101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="070101">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>epc-closure</htmlTabRef>
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
050201 060201 070201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="050201">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060201">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="070201">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>terminate-enb-oai-ue</htmlTabRef>
<htmlTabName>Terminate-all-eNBs-OAI-UEs</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030201 090109
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-05-tm1-oai-ue</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-OAI-UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201 090109
030102 000001 090102 000002 040503 000002 040603 040604 040643 040644 000002 090109 000001 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep for 10 sec</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep for 3 sec</desc>
<idle_sleep_time_in_sec>3</idle_sleep_time_in_sec>
</testCase>
<testCase id="030102">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090102">
<class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 130 --ue-txgain 1 --ue-max-power -6 --ue-scan-carrier --nokrnmod 1</Initialize_OAI_UE_args>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
<testCase id="040503">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-I 192.168.248.159 -c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-05-tm1-nos1-tunnel</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-noS1-tunnel</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 090109
030101 000001 090101 000002 040501 040502 000001 040601 040602 040641 040642 000001 090109 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000003">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090101">
<class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 130 --ue-txgain 1 --ue-max-power -6 --ue-scan-carrier --nokrnmod 1 --noS1</Initialize_OAI_UE_args>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)(from eNB to OAI UE)</desc>
<ping_args>-I oaitun_enb1 -c 20 10.0.1.2</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040502">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)(from OAI UE to eNB)</desc>
<ping_args>-I oaitun_ue1 -c 20 10.0.1.1</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040601">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.2 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040602">
<class>Iperf</class>
<desc>iperf (5MHz - DL/10Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.2 -u -b 10M -t 30 -i 1 -fm -B 10.0.1.1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.1 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.2 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.1 -u -b 2M -t 30 -i 1 -fm -B 10.0.1.2 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>build-tab-enb0</htmlTabRef>
<htmlTabName>Build eNB0</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
010101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010101">
<class>Build_eNB</class>
<desc>Build eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>epc-start</htmlTabRef>
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
050102 000001 060102 000001 070102
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050102">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="060102">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="070102">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>epc-stop</htmlTabRef>
<htmlTabName>EPC-Stop</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
050201 060201 070201
040101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="050201">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060201">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="070201">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
030102 000002 040301 000002 040504 040605 040606 040645 040646 000001 040401 000002 030201
-->
<testCaseList>
<htmlTabRef>test-05-tm1</htmlTabRef>
<htmlTabName>Test-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 040101
030102 000002 040301 000002 040504 000001 040401 000002 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep for 10 sec</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep for 3 sec</desc>
<idle_sleep_time_in_sec>3</idle_sleep_time_in_sec>
</testCase>
<testCase id="030102">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040504">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-I 192.168.248.159 -c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040606">
<class>Iperf</class>
<desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040645">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040646">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>build-tab-ue0</htmlTabRef>
<htmlTabName>Build UE0</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
090101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="090101">
<class>Build_OAI_UE</class>
<desc>Build OAI UE</desc>
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
</testCase>
</testCaseList>
......@@ -184,8 +184,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
#########################
# set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2")
set(GIT_BRANCH "UNKNOWN")
......
......@@ -12,6 +12,7 @@ void usage(void)
"usage: <number of tags> <input record file> <output curated record file>\n"
"options:\n"
" -d <database file> this option is mandatory\n"
" -e <event name> trace given event (default CALIBRATION_CHANNEL_ESTIMATES)\n"
);
exit(1);
}
......@@ -88,6 +89,7 @@ int main(int n, char **v)
int number_of_tags = -1;
char *input_filename = NULL;
char *output_filename = NULL;
char *event_name = "CALIBRATION_CHANNEL_ESTIMATES";
int i;
FILE *in;
FILE *out;
......@@ -107,6 +109,8 @@ int main(int n, char **v)
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d")) { if (i > n-2) usage();
database_filename = v[++i]; continue; }
if (!strcmp(v[i], "-e")) { if (i > n-2) usage();
event_name = v[++i]; continue; }
if (number_of_tags == -1) { number_of_tags = atoi(v[i]);
if (number_of_tags <= 0) {usage();} continue; }
if (input_filename == NULL) { input_filename = v[i]; continue; }
......@@ -124,7 +128,7 @@ int main(int n, char **v)
database = parse_database(database_filename);
channel_estimate_id = event_id_from_name(database, "CALIBRATION_CHANNEL_ESTIMATES");
channel_estimate_id = event_id_from_name(database, event_name);
f = get_format(database, channel_estimate_id);
frame_arg = get_field(&f, "frame", "int");
......
......@@ -59,7 +59,7 @@ int lte_segmentation(unsigned char *input_buffer,
}
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) {
printf("%d\n",*(int*)0);
printf("%d\n",*(int *)0);
LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
return(-1);
}
......@@ -105,7 +105,7 @@ int lte_segmentation(unsigned char *input_buffer,
#endif
*Kminus = (*Kplus - 64);
} else {
printf("lte_segmentation.c: Illegal codeword size !!!\n");
LOG_E(PHY,"lte_segmentation.c: Illegal codeword size !!!\n");
return(-1);
}
......
......@@ -31,7 +31,7 @@
*/
#include "PHY/defs_eNB.h"
#ifdef DEBUG_UCI_TOOLS
#include "PHY/vars.h"
#include "PHY/vars.h"
#endif
//#define DEBUG_UCI 1
......@@ -41,15 +41,21 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_
uint16_t i;
int16_t first_free_index=-1;
AssertFatal(eNB!=NULL,"eNB is null\n");
for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) {
if ((eNB->uci_vars[i].active >0) &&
(eNB->uci_vars[i].rnti==rnti) &&
(eNB->uci_vars[i].frame==frame) &&
(eNB->uci_vars[i].subframe==subframe)) return(i);
(eNB->uci_vars[i].rnti==rnti) &&
(eNB->uci_vars[i].frame==frame) &&
(eNB->uci_vars[i].subframe==subframe)) return(i);
else if ((eNB->uci_vars[i].active == 0) && (first_free_index==-1)) first_free_index=i;
}
if (type == SEARCH_EXIST) return(-1);
else return(first_free_index);
if (first_free_index==-1)
LOG_E(MAC,"UCI table is full\n");
return(first_free_index);
}
......
......@@ -561,8 +561,8 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
else
tc = *decoder8;
if(ulsch_harq->repetition_number == 1){
memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
if(ulsch_harq->repetition_number == 1) {
memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
}
for (r=0; r<ulsch_harq->C; r++) {
......@@ -579,11 +579,10 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
(uint8_t *)&dummy_w[r][0],
(r==0) ? ulsch_harq->F : 0);
#ifdef DEBUG_ULSCH_DECODING
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, nb_rb %d, Nl %d)...\n",
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, Nl %d)...\n",
r, G,
Kr*3,
Q_m,
nb_rb,
ulsch_harq->Qm,
ulsch_harq->Nl);
#endif
start_meas(&eNB->ulsch_rate_unmatching_stats);
......@@ -608,26 +607,22 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
}
stop_meas(&eNB->ulsch_rate_unmatching_stats);
max_Ncb = 3*ulsch_harq->RTC[r]*32 ;
if(ulsch_harq->total_number_of_repetitions > 1)
{
if (ulsch_harq->rvidx==1)
{ // Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
for (int nn=0;nn<max_Ncb;nn++)
{
pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ;
}
if(ulsch_harq->total_number_of_repetitions > 1) {
if (ulsch_harq->rvidx==1) {
// Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
for (int nn=0; nn<max_Ncb; nn++) {
pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ;
}
}
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions) {
for (int nn=0; nn<max_Ncb; nn++) {
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
}
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions)
{
for (int nn=0;nn<max_Ncb;nn++)
{
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
}
}
}
}
r_offset += E;
start_meas(&eNB->ulsch_deinterleaving_stats);
......@@ -727,11 +722,13 @@ static inline unsigned int lte_gold_unscram(unsigned int *x1, unsigned int *x2,
// printf("n=%d : c %x\n",n,x1^x2);
}
unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t *proc,
uint8_t UE_id,
uint8_t control_only_flag,
uint8_t Nbundled,
uint8_t llr8_flag) {
uint8_t llr8_flag)
{
int16_t *ulsch_llr = eNB->pusch_vars[UE_id]->llr;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
......@@ -762,12 +759,13 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
int frame = proc->frame_rx;
int subframe = proc->subframe_rx;
LTE_UL_eNB_HARQ_t *ulsch_harq;
LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
if (ulsch->ue_type>0) harq_pid = 0;
else {
if (ulsch->ue_type>0)
harq_pid = 0;
else
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
// x1 is set in lte_gold_generic
......
......@@ -278,6 +278,7 @@ char phich_string[13][4] = {"","1/6","","1/2","","","one","","","","","","two"};
char duplex_string[2][4] = {"FDD","TDD"};
char prefix_string[2][9] = {"NORMAL","EXTENDED"};
int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
int32_t sync_pos,sync_pos2,sync_pos_slot;
int32_t metric_fdd_ncp=0,metric_fdd_ecp=0,metric_tdd_ncp=0,metric_tdd_ecp=0;
......@@ -557,13 +558,12 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
ue->measurements.rx_power_avg_dB[0] = dB_fixed(ue->measurements.rx_power_avg[0]);
LOG_I(PHY,"[UE%d] Initial sync : Estimated power: %d dB\n",ue->Mod_id,ue->measurements.rx_power_avg_dB[0] );
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
if (IS_SOFTMODEM_BASICSIM )
phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0);
} else {
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
if (IS_SOFTMODEM_BASICSIM )
phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0);
}
return ret;
}
......@@ -80,7 +80,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
int i, prach_len;
uint16_t first_nonzero_root_idx=0;
if ( !(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
if ( !(IS_SOFTMODEM_BASICSIM ) ) {
prach_start = (ue->rx_offset+subframe*ue->frame_parms.samples_per_tti-ue->hw_timing_advance-ue->N_TA_offset);
#ifdef PRACH_DEBUG
LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
......@@ -473,7 +473,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
AssertFatal(prach_fmt<4,
"prach_fmt4 not fully implemented" );
if (!(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
if (!(IS_SOFTMODEM_BASICSIM ) ) {
int j;
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti;
LOG_I( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
......
......@@ -25,8 +25,7 @@
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr, javier.morgad
e@ieee.org
* \email: {knopp, florian.kaltenberger, navid.nikaein}@eurecom.fr, javier.morgade@ieee.org
* \note
* \warning
*/
......@@ -184,13 +183,16 @@ unsigned int get_tx_amp(int power_dBm,
int gain_dB;
double gain_lin;
if (power_dBm<=power_max_dBm)
if ( (power_dBm<=power_max_dBm) && ! IS_SOFTMODEM_RFSIM)
gain_dB = power_dBm - power_max_dBm;
else
gain_dB = 0;
gain_lin = pow(10,.1*gain_dB);
AssertFatal((nb_rb >0) && (nb_rb <= N_RB_UL),"Illegal nb_rb/N_RB_UL combination (%d/%d)\n",nb_rb,N_RB_UL);
LOG_D(PHY," tx gain: %d = %d * sqrt ( pow(10, 0.1*max(0,%d-%d)) * %d/%d ) (gain lin=%f (dB=%d))\n",
(int)(AMP*sqrt(gain_lin*N_RB_UL/(double)nb_rb)),
AMP, power_dBm, power_max_dBm, N_RB_UL, nb_rb, gain_lin, gain_dB);
return((int)(AMP*sqrt(gain_lin*N_RB_UL/(double)nb_rb)));
}
......@@ -1152,7 +1154,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
if (!(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
if (!IS_SOFTMODEM_BASICSIM) {
ulsch_start = (ue->rx_offset+subframe_tx*frame_parms->samples_per_tti-
ue->hw_timing_advance-
ue->timing_advance-
......@@ -1183,7 +1185,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
}
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
int *Buff = (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ? &ue->common_vars.txdata[aa][ulsch_start] :dummy_tx_buffer;
int *Buff = IS_SOFTMODEM_BASICSIM ? &ue->common_vars.txdata[aa][ulsch_start] :dummy_tx_buffer;
if (frame_parms->Ncp == 1) {
PHY_ofdm_mod(&ue->common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
......@@ -1204,7 +1206,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
&ue->frame_parms);
}
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_BASICSIM) {
apply_7_5_kHz(ue,&ue->common_vars.txdata[aa][ulsch_start],0);
apply_7_5_kHz(ue,&ue->common_vars.txdata[aa][ulsch_start],1);
} else {
......@@ -1212,7 +1214,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
apply_7_5_kHz(ue,dummy_tx_buffer,1);
}
if (!(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
if (!(IS_SOFTMODEM_BASICSIM) ) {
overflow = ulsch_start - 9*frame_parms->samples_per_tti;
for (k=ulsch_start,l=0; k<cmin(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,ulsch_start+frame_parms->samples_per_tti); k++,l++) {
......@@ -1316,7 +1318,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,
ue->prach_resources[eNB_id]->ra_RNTI);
ue->tx_total_RE[subframe_tx] = 96;
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_BASICSIM) {
ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL,
......@@ -1690,7 +1692,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,
ue->tx_total_RE[subframe_tx] = nb_rb*12;
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_BASICSIM) {
tx_amp = AMP;
} else {
tx_amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
......@@ -1767,7 +1769,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,
Po_SRS = ue->tx_power_max_dBm;
}
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_BASICSIM) {
tx_amp = AMP;
} else {
if (ue->mac_enabled==1) {
......@@ -2010,7 +2012,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,
ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
ue->tx_total_RE[subframe_tx] = 12;
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_BASICSIM) {
tx_amp = AMP;
} else {
tx_amp = get_tx_amp(Po_PUCCH,
......@@ -2091,7 +2093,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,
ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
ue->tx_total_RE[subframe_tx] = 12;
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
if (IS_SOFTMODEM_BASICSIM) {
tx_amp = AMP;
} else {
tx_amp = get_tx_amp(Po_PUCCH,
......@@ -2346,7 +2348,7 @@ void ue_measurement_procedures(uint16_t l, // symbol index of each slot [0..6
// AGC
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_IN);
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
if (IS_SOFTMODEM_BASICSIM)
phy_adjust_gain (ue,dB_fixed(ue->measurements.rssi),0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
......@@ -2423,8 +2425,6 @@ void ue_pbch_procedures(uint8_t eNB_id,
dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0];
trace_pdu( DIRECTION_DOWNLINK, dummy, WS_C_RNTI, ue->Mod_id, 0, 0,
frame_rx, subframe_rx, 0, 0);
LOG_D(OPT,"[UE %d][PBCH] Frame %d trace pdu for PBCH\n",
ue->Mod_id, subframe_rx);
}
if (pbch_tx_ant>2) {
......@@ -2871,8 +2871,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
int eNB_id,
int abstraction_flag,
uint8_t fembms_flag
) {
uint8_t fembms_flag) {
int subframe_rx = proc->subframe_rx;
int frame_rx = proc->frame_rx;
int pmch_mcs=-1;
......@@ -3532,7 +3531,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
}
break;
case P_PDSCH:
......@@ -4401,6 +4399,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,
void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
}
int phy_procedures_UE_RX(PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
uint8_t eNB_id,
......@@ -4880,7 +4879,6 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,
}
void phy_procedures_UE_lte(PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
uint8_t eNB_id,
......
......@@ -142,13 +142,14 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb);
// Re13 fields
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1;
if (ra->rach_resource_type > 0) {
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
}
else{
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
} else {
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
}
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
ul_req_body->number_of_pdus++;
......@@ -269,10 +270,9 @@ void generate_Msg2(module_id_t module_idP,
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
if (ra->rach_resource_type > 0) {
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
}
else {
PUSCH_Rep_Level= 0;
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
} else {
PUSCH_Rep_Level= 0;
}
if (absSF > absSF_Msg2) {
......@@ -415,7 +415,7 @@ void generate_Msg2(module_id_t module_idP,
}
ra->pusch_repetition_levels = PUSCH_Rep_Level;
if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
/* Program PDSCH */
LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n",
......@@ -902,11 +902,10 @@ generate_Msg4(module_id_t module_idP,
ul_req_body->number_of_pdus++;
T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP),
T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize));
if (opt_enabled == 1) {
trace_pdu (1, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0], ra->msg4_rrc_sdu_length, UE_id, 3, UE_RNTI (module_idP, UE_id), mac->frame, mac->subframe, 0, 0);
LOG_D (OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", module_idP, CC_idP, frameP, UE_RNTI (module_idP, UE_id), ra->msg4_rrc_sdu_length);
}
trace_pdu (DIRECTION_DOWNLINK, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0],
ra->msg4_rrc_sdu_length,
UE_id, 3, UE_RNTI (module_idP, UE_id),
mac->frame, mac->subframe, 0, 0);
} // Msg4 frame/subframe
} // rach_resource_type > 0
else {
......@@ -1079,20 +1078,12 @@ generate_Msg4(module_id_t module_idP,
T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ),
T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].
payload[0], ra->msg4_TBsize));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *) mac->
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
rrc_sdu_length, UE_id, WS_C_RNTI,
UE_RNTI(module_idP, UE_id), mac->frame,
mac->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
module_idP, CC_idP, frameP, UE_RNTI(module_idP,
UE_id),
rrc_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *) mac->
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
rrc_sdu_length, UE_id, WS_C_RNTI,
UE_RNTI(module_idP, UE_id), mac->frame,
mac->subframe, 0, 0);
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
......
......@@ -26,7 +26,6 @@
* \email: navid.nikaein@eurecom.fr
* \version 1.0
* @ingroup _mac
*/
#include "assertions.h"
......@@ -279,16 +278,10 @@ schedule_SIB1_MBMS(module_id_t module_idP,
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
......@@ -509,16 +502,10 @@ schedule_SIB1_BR(module_id_t module_idP,
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
......@@ -696,18 +683,13 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
TX_req->segments[0].segment_length = bcch_sdu_length;
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i+1].payload;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[i + 1].payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI,
0xffff, eNB->frame, eNB->subframe, 0,
0);
LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[i + 1].payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI,
0xffff, eNB->frame, eNB->subframe, 0,
0);
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
......@@ -901,18 +883,11 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_MBMS_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff,
bcch_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_MBMS_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
LOG_D(MAC,
......@@ -1177,18 +1152,11 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff,
bcch_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
......
......@@ -1398,27 +1398,17 @@ schedule_ue_spec(module_id_t module_idP,
dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0;
}
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *) dlsch_pdu->payload[0],
TBS,
module_idP,
WS_C_RNTI,
UE_RNTI(module_idP,
UE_id),
eNB->frame,
eNB->subframe,
0,
0);
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
UE_RNTI(module_idP,
UE_id),
TBS);
}
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *) dlsch_pdu->payload[0],
TBS,
module_idP,
WS_C_RNTI,
UE_RNTI(module_idP,
UE_id),
eNB->frame,
eNB->subframe,
0,
0);
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
T_INT(module_idP),
T_INT(CC_id),
......@@ -1482,7 +1472,7 @@ schedule_ue_spec(module_id_t module_idP,
tpc = 1; //0
}
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d\n",
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d (normal case)\n",
module_idP,
frameP,
subframeP,
......@@ -2319,25 +2309,16 @@ schedule_ue_spec_br(module_id_t module_idP,
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff);
}
if (opt_enabled == 1) {
trace_pdu(1,
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS,
module_idP,
3,
UE_RNTI(module_idP,UE_id),
mac->frame,
mac->subframe,
0,
0);
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
UE_RNTI(module_idP, UE_id),
TBS);
}
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS,
module_idP,
3,
UE_RNTI(module_idP,UE_id),
mac->frame,
mac->subframe,
0,
0);
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
T_INT(module_idP),
T_INT(CC_id),
......@@ -2530,25 +2511,16 @@ schedule_ue_spec_br(module_id_t module_idP,
T_INT (subframeP),
T_INT (0 /* harq_pid always 0? */ ),
T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length));
if (opt_enabled == 1) {
trace_pdu(1,
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
TX_req->pdu_length,
UE_id,
3,
rnti,
frameP,
subframeP,
0,
0);
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
rnti,
TX_req->pdu_length);
}
trace_pdu(1,
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
TX_req->pdu_length,
UE_id,
3,
rnti,
frameP,
subframeP,
0,
0);
} // end else if ((subframeP == 7) && (round_DL < 8))
} // end loop on UE_id
}
......@@ -3145,25 +3117,16 @@ schedule_PCH(module_id_t module_idP,
continue;
}
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
pcch_sdu_length,
0xffff,
PCCH,
P_RNTI,
eNB->frame,
eNB->subframe,
0,
0);
LOG_D(OPT,"[eNB %d][PCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP,
frameP,
CC_id,
0xffff,
pcch_sdu_length);
}
trace_pdu(DIRECTION_DOWNLINK,
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
pcch_sdu_length,
0xffff,
PCCH,
P_RNTI,
eNB->frame,
eNB->subframe,
0,
0);
eNB->eNB_stats[CC_id].total_num_pcch_pdu++;
eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length;
eNB->eNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length;
......
......@@ -1681,14 +1681,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff);
}
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
eNB->frame, eNB->subframe,0,0);
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
module_idP, CC_id, frameP, UE_RNTI(module_idP, UE_id), TBS);
}
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
eNB->frame, eNB->subframe,0,0);
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
......@@ -2818,7 +2813,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
}
if (tpc!=1) {
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
LOG_D(MAC,"[eNB %d] ULSCH schedulerRR: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
module_idP,frameP,subframeP,harq_pid,tpc,
tpc_accumulated,snr,target_snr);
}
......
......@@ -60,9 +60,7 @@
extern RAN_CONTEXT_t RC;
int8_t
get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
uint8_t mbsfn_sync_area) {
int8_t get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area) {
// currently there is one-to-one mapping between sf allocation pattern and sync area
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
LOG_W(MAC,
......@@ -81,9 +79,8 @@ get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
}
}
int
schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
sub_frame_t subframeP) {
int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_frame_t subframeP) {
int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
int mbsfn_period = 0; // 1<<(RC.mac[module_idP]->mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
int mcch_period = 0; //32<<(RC.mac[module_idP]->mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
......@@ -734,15 +731,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
}
/* Tracing of PDU is done on UE side */
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff, // M_RNTI = 6 in wirehsark
RC.mac[module_idP]->frame,
RC.mac[module_idP]->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][MCH] CC_id %d Frame %d : MAC PDU with size %d\n",
module_idP, CC_id, frameP, TBS);
}
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff, // M_RNTI = 6 in wireshark
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe, 0, 0);
/*
for (j=0;j<sdu_length_total;j++)
printf("%2x.",RC.mac[module_idP]->MCH_pdu.payload[j+offset]);
......@@ -771,8 +761,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
*/
}
MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
sub_frame_t subframeP) {
MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t subframeP) {
// RC.mac[module_idP]->MCH_pdu.mcs=0;
//LOG_D(MAC," MCH_pdu.mcs is %d\n", RC.mac[module_idP]->MCH_pdu.mcs);
//#warning "MCH pdu should take the CC_id index"
......
This diff is collapsed.
......@@ -255,17 +255,11 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
"Transmission on secondary CCs is not supported yet\n");
// start contention resolution timer
UE_mac_inst[module_idP].RA_attempt_number++;
if (opt_enabled) {
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
UE_mac_inst[module_idP].RA_prach_resources.
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0,
UE_mac_inst[module_idP].RA_attempt_number);
LOG_D(OPT,
"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, 1, UE_mac_inst[module_idP].RA_Msg3_size);
}
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
UE_mac_inst[module_idP].RA_prach_resources.
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0,
UE_mac_inst[module_idP].RA_attempt_number);
}
......@@ -280,19 +274,11 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
module_idP, frameP);
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1;
if (opt_enabled) { // msg3
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][RAPROC] MSG3 Frame %d trace pdu Preamble %d with size %d\n",
module_idP, frameP, UE_mac_inst[module_idP].crnti
/*UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex */
, UE_mac_inst[module_idP].RA_Msg3_size);
}
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
}
......
......@@ -53,7 +53,8 @@ fill_rar(const module_id_t module_idP,
RA_t *ra,
const frame_t frameP,
uint8_t *const dlsch_buffer,
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
const uint16_t N_RB_UL,
const uint8_t input_buffer_length)
//------------------------------------------------------------------------------
{
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
......@@ -93,16 +94,9 @@ fill_rar(const module_id_t module_idP,
rar[3] =
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
0, 0);
LOG_D(OPT,
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
input_buffer_length);
}
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
0, 0);
return (ra->rnti);
}
......@@ -194,24 +188,16 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
ra->preamble_index,
ra->timing_offset);
if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK,
dlsch_buffer,
input_buffer_length,
eNB->Mod_id,
WS_RA_RNTI,
1,
eNB->frame,
eNB->subframe,
0,
0);
LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
frameP,
ra->rnti,
rarh->RAPID,
input_buffer_length);
}
trace_pdu(DIRECTION_DOWNLINK,
dlsch_buffer,
input_buffer_length,
eNB->Mod_id,
WS_RA_RNTI,
1,
eNB->frame,
eNB->subframe,
0,
0);
return (ra->rnti);
}
......@@ -41,103 +41,96 @@
#define DEBUG_RAR
//------------------------------------------------------------------------------
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t * const dlsch_buffer, rnti_t * const t_crnti, const uint8_t preamble_index, uint8_t * selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
)
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t *const dlsch_buffer, rnti_t *const t_crnti, const uint8_t preamble_index,
uint8_t *selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
)
//------------------------------------------------------------------------------
{
uint16_t ret = 0; // return value
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
// get the last RAR payload for working with CMW500
uint8_t n_rarpy = 0; // number of RAR payloads
uint8_t n_rarh = 0; // number of MAC RAR subheaders
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
while (1) {
n_rarh++;
if (rarh->T == 1) {
n_rarpy++;
LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
}
if (rarh->RAPID == preamble_index) {
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
rarh->RAPID);
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
break;
}
if (abs((int) rarh->RAPID - (int) preamble_index) <
abs((int) best_rx_rapid - (int) preamble_index)) {
best_rx_rapid = rarh->RAPID;
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
}
if (rarh->E == 0) {
LOG_I(PHY,
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
best_rx_rapid);
break;
} else {
rarh++;
}
};
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
n_rarh, n_rarpy);
if (CC_id > 0) {
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
return (0xffff);
uint16_t ret = 0; // return value
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
// get the last RAR payload for working with CMW500
uint8_t n_rarpy = 0; // number of RAR payloads
uint8_t n_rarh = 0; // number of MAC RAR subheaders
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
while (1) {
n_rarh++;
if (rarh->T == 1) {
n_rarpy++;
LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
}
LOG_I(MAC,
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
#ifdef DEBUG_RAR
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
rarh->RAPID);
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
(uint16_t) rar[5] + (rar[4] << 8));
#endif
if (rarh->RAPID == preamble_index) {
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
rarh->RAPID);
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
break;
}
if (opt_enabled) {
LOG_D(OPT,
"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n",
module_idP, CC_id, frameP, ra_rnti);
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
if (abs((int) rarh->RAPID - (int) preamble_index) <
abs((int) best_rx_rapid - (int) preamble_index)) {
best_rx_rapid = rarh->RAPID;
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
}
if (preamble_index == rarh->RAPID) {
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
//return(rar->Timing_Advance_Command);
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
if (rarh->E == 0) {
LOG_I(PHY,
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
best_rx_rapid);
break;
} else {
UE_mac_inst[module_idP].crnti = 0;
ret = (0xffff);
rarh++;
}
};
// move the selected RAR to the front of the RA_PDSCH buffer
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
n_rarh, n_rarpy);
return ret;
if (CC_id > 0) {
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
return (0xffff);
}
LOG_I(MAC,
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
#ifdef DEBUG_RAR
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
rarh->RAPID);
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
(uint16_t) rar[5] + (rar[4] << 8));
#endif
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
if (preamble_index == rarh->RAPID) {
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
//return(rar->Timing_Advance_Command);
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
} else {
UE_mac_inst[module_idP].crnti = 0;
ret = (0xffff);
}
// move the selected RAR to the front of the RA_PDSCH buffer
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
return ret;
}
......@@ -392,17 +392,9 @@ ue_send_sdu(module_id_t module_idP,
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
LOG_D(OPT,
"[UE %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, UE_mac_inst[module_idP].crnti, sdu_len);
}
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
payload_ptr =
parse_header(sdu, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths,
sdu_len);
......@@ -605,19 +597,16 @@ void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, len);
}
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe,
0,
0);
}
......@@ -640,20 +629,14 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, len);
}
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
}
void
......@@ -676,20 +659,14 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_p);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
P_RNTI,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, P_RNTI, len);
}
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
module_idP,
WS_SI_RNTI,
P_RNTI,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
}
unsigned char *parse_mch_header(unsigned char *mac_header,
......@@ -2422,17 +2399,10 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
#endif
if (opt_enabled) {
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][ULSCH] Frame %d subframe %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, subframe, UE_mac_inst[module_idP].crnti,
buflen);
}
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
}
......
......@@ -34,7 +34,8 @@ void handle_rach(UL_IND_t *UL_info) {
NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,
0
);
free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
......@@ -52,7 +53,8 @@ void handle_rach(UL_IND_t *UL_info) {
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,
0
);
}
}
......@@ -382,10 +384,10 @@ static void dump_ul(UL_IND_t *u) {
A("XXXX crc_ind %d\n", u->crc_ind.crc_indication_body.number_of_crcs);
A("XXXX sr_ind %d\n", u->sr_ind.sr_indication_body.number_of_srs);
A("XXXX cqi_ind %d\n", u->cqi_ind.number_of_cqis);
A("XXXX cqi_ind %d\n", u->cqi_ind.cqi_indication_body.number_of_cqis);
for (i = 0; i < u->cqi_ind.number_of_cqis; i++) {
nfapi_cqi_indication_pdu_t *v = &u->cqi_ind.cqi_pdu_list[i];
for (i = 0; i < u->cqi_ind.cqi_indication_body.number_of_cqis; i++) {
nfapi_cqi_indication_pdu_t *v = &u->cqi_ind.cqi_indication_body.cqi_pdu_list[i];
A("XXXX cqi ind %d\n", i);
A("XXXX cqi ul_cqi %d channel %d\n", v->ul_cqi_information.ul_cqi,
v->ul_cqi_information.channel);
......
How to configure wireshark for dissecting LTE protocols:
- start the wireshark as a sudoers
- goto analyze->enabled prototols
- goto analyze->enabled prototols
=> enable mac_lte_udp and rlc_lte_udp
- goto edit/preferences and expand Protocols
- select UDP and check "try heuristic sub-dissectors first"
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
- select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
- goto edit/preferences and expand Protocols
- select UDP and check "try heuristic sub-dissectors first"
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
- select RLC-LTE, and check all the options except the "May see RLC headers only", and
set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
How to use
- start eNB or UE with option -W (or -P if you want to make a pcap file)
- capture on local interface "lo"
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
How to use
- start eNB or UE with option --opt.type wireshark
--opt options are:
--opt.type none/wireshark/pcap
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
--opt.path file_name to specify the file name (pcap)
- capture on local interface "lo"
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
......@@ -110,22 +110,17 @@ typedef enum radio_type_e {
* function def
*/
void trace_pdu(int direction,
uint8_t *pdu_buffer,
unsigned int pdu_buffer_size,
int ueid,
int rntiType,
int rnti,
uint16_t sysFrame,
uint8_t subframe,
int oob_event,
int oob_event_value);
extern int opt_enabled;
#define trace_pdu(x...) if (opt_enabled) trace_pdu_implementation(x)
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe,
int oob_event, int oob_event_value);
int init_opt(void);
void terminate_opt(void);
extern int opt_enabled;
//double *timing_analyzer(int index, int direction );
#endif /* OPT_H_ */
......@@ -386,17 +386,22 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
extern RAN_CONTEXT_t RC;
#include <openair1/PHY/phy_extern_ue.h>
/* Remote serveraddress (where Wireshark is running) */
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
int oob_event_value) {
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
int oob_event_value) {
MAC_Context_Info_t pdu_context;
int radioType=FDD_RADIO;
LOG_D(OPT,"sending packet to wireshark: direction=%s, size: %d, ueid: %d, rnti: %x, frame/sf: %d.%d\n",
direction?"DL":"UL", pdu_buffer_size, ueid, rnti, sysFrameNumber,subFrameNumber);
if (RC.eNB[0][0]!=NULL)
if (RC.eNB && RC.eNB[0][0]!=NULL)
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
if (PHY_vars_UE_g[0][0] != NULL)
else if (PHY_vars_UE_g && PHY_vars_UE_g[0][0] != NULL)
radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
else {
LOG_E(OPT,"not a eNB neither a UE!!! \n");
return;
}
switch (opt_type) {
case OPT_WIRESHARK :
......
......@@ -431,7 +431,8 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
}
}
LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS );
if ( abs(b->th.timestamp-b->lastReceivedTS) > 50 )
LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS );
}
b->lastReceivedTS=b->th.timestamp;
......
......@@ -7,6 +7,24 @@
volatile int oai_exit = 0;
int fullread(int fd, void *_buf, int count) {
char *buf = _buf;
int ret = 0;
int l;
while (count) {
l = read(fd, buf, count);
if (l <= 0) return -1;
count -= l;
buf += l;
ret += l;
}
return ret;
}
void fullwrite(int fd, void *_buf, int count) {
char *buf = _buf;
int l;
......@@ -63,10 +81,9 @@ sin_addr:
bool connected=false;
while(!connected) {
LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
//LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) {
LOG_I(HW,"rfsimulator: connection established\n");
//LOG_I(HW,"rfsimulator: connection established\n");
connected=true;
}
......@@ -108,12 +125,13 @@ int main(int argc, char *argv[]) {
if (strcmp(argv[2],"server")==0) {
serviceSock=server_start(atoi(argv[3]));
} else {
client_start(argv[2],atoi(argv[3]));
serviceSock=client_start(argv[2],atoi(argv[3]));
}
samplesBlockHeader_t header;
int bufSize=100000;
void *buff=malloc(bufSize);
uint64_t readTS=0;
while (1) {
//Rewind the file to loop on the samples
......@@ -125,9 +143,11 @@ int main(int argc, char *argv[]) {
AssertFatal(read(fd,&header,sizeof(header)), "");
fullwrite(serviceSock, &header, sizeof(header));
int dataSize=sizeof(int32_t)*header.size*header.nbAnt;
uint64_t wroteTS=header.timestamp;
if (dataSize>bufSize) {
void * new_buff = realloc(buff, dataSize);
void *new_buff = realloc(buff, dataSize);
if (new_buff == NULL) {
free(buff);
AssertFatal(1, "Could not reallocate");
......@@ -139,9 +159,18 @@ int main(int argc, char *argv[]) {
AssertFatal(read(fd,buff,dataSize) == dataSize, "");
fullwrite(serviceSock, buff, dataSize);
// Purge incoming samples
setblocking(serviceSock, notBlocking);
setblocking(serviceSock, blocking);
while(readTS < wroteTS) {
if ( fullread(serviceSock, &header,sizeof(header)) != sizeof(header) ||
fullread(serviceSock, buff, sizeof(int32_t)*header.size*header.nbAnt) !=
sizeof(int32_t)*header.size*header.nbAnt
) {
printf("error: %s\n", strerror(errno));
exit(1);
}
while(recv(serviceSock,buff, bufSize, MSG_DONTWAIT) > 0) {
readTS=header.timestamp;
}
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment