Merge remote-tracking branch 'origin/develop' into ci-improve-l2-sim
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
# vim swp
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# log and exec file
|
||||||
|
log/
|
||||||
|
lte_build_oai/
|
||||||
|
targets/bin/
|
||||||
|
cmake_targets/nas_sim_tools/build/
|
||||||
@@ -133,6 +133,7 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Merge Conflicts -- Cannot perform CI"
|
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Merge Conflicts -- Cannot perform CI"
|
||||||
addGitLabMRComment comment: message
|
addGitLabMRComment comment: message
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -283,6 +284,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
dir ('archives') {
|
dir ('archives') {
|
||||||
@@ -392,7 +398,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Test FDD - Band 7 - B210") {
|
stage ("Test MONOLITHIC - FDD - Band 7 - B210") {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
@@ -443,7 +449,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Test TDD - Band 40 - B210") {
|
stage ("Test MONOLITHIC - TDD - Band 40 - B210") {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
@@ -647,6 +653,57 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage ("Test OAI UE Sniffing - FDD - Band 20 - B200") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
|
//gitlabCommitStatus(name: "Test-OAI-UE-FDD-Band20") {
|
||||||
|
build job: 'UE-CI-FDD-Band20-B200',
|
||||||
|
parameters: [
|
||||||
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
|
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||||
|
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||||
|
booleanParam(name: 'eNB_mergeRequest', value: true),
|
||||||
|
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||||
|
]
|
||||||
|
//}
|
||||||
|
} else {
|
||||||
|
//gitlabCommitStatus(name: "Test-OAI-UE-FDD-Band20") {
|
||||||
|
build job: 'UE-CI-FDD-Band20-B200',
|
||||||
|
parameters: [
|
||||||
|
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||||
|
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||||
|
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||||
|
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||||
|
]
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||||
|
// slave job.
|
||||||
|
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if (!fileExists('test_results-UE-CI-FDD-Band20-B200.html')) {
|
||||||
|
copyArtifacts(projectName: 'UE-CI-FDD-Band20-B200',
|
||||||
|
filter: 'test_results*.html',
|
||||||
|
selector: lastCompleted())
|
||||||
|
if (fileExists('test_results-UE-CI-FDD-Band20-B200.html')) {
|
||||||
|
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-UE-CI-FDD-Band20-B200.html"
|
||||||
|
archiveArtifacts artifacts: 'test_results-UE-CI-FDD-Band20-B200.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
|
|||||||
@@ -0,0 +1,300 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||||
|
|
||||||
|
// Location of the python executor node shall be in the same subnet as the others servers
|
||||||
|
def pythonExecutor = params.pythonExecutor
|
||||||
|
|
||||||
|
// Location of the test XML file to be run
|
||||||
|
def testXMLFile = params.pythonTestXmlFile
|
||||||
|
def mainPythonAllXmlFiles = ""
|
||||||
|
def buildStageStatus = true
|
||||||
|
|
||||||
|
// Name of the test stage
|
||||||
|
def testStageName = params.pipelineTestStageName
|
||||||
|
|
||||||
|
// Name of the phone resource
|
||||||
|
def ciSmartPhoneResource = params.smartphonesResource
|
||||||
|
|
||||||
|
// Terminate Status
|
||||||
|
def termUE = 0
|
||||||
|
def termENB = 1
|
||||||
|
def termSPGW = 2
|
||||||
|
def termMME = 3
|
||||||
|
def termHSS = 4
|
||||||
|
def termStatusArray = new Boolean[termHSS + 1]
|
||||||
|
termStatusArray[termUE] = false
|
||||||
|
termStatusArray[termENB] = false
|
||||||
|
termStatusArray[termSPGW] = false
|
||||||
|
termStatusArray[termMME] = false
|
||||||
|
termStatusArray[termHSS] = false
|
||||||
|
|
||||||
|
// Global Parameters. Normally they should be populated when the master job
|
||||||
|
// triggers the slave job with parameters
|
||||||
|
def eNB_Repository
|
||||||
|
def eNB_Branch
|
||||||
|
def eNB_CommitID
|
||||||
|
def eNB_AllowMergeRequestProcess = false
|
||||||
|
def eNB_TargetBranch
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label pythonExecutor
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
ansiColor('xterm')
|
||||||
|
lock (ciSmartPhoneResource)
|
||||||
|
}
|
||||||
|
// the following parameter options are commented out so it shows the ones
|
||||||
|
// that you SHALL have to run the job.
|
||||||
|
// You can use them as template
|
||||||
|
/*
|
||||||
|
parameters {
|
||||||
|
//node-test parameters
|
||||||
|
string(name: 'pythonExecutor', defaultValue: 'nodea', description: 'Node where the pipeline - python scripts will be executed')
|
||||||
|
string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run')
|
||||||
|
string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage')
|
||||||
|
booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact')
|
||||||
|
string(name: 'smartphonesResource', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource')
|
||||||
|
|
||||||
|
//eNB parameters
|
||||||
|
string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB')
|
||||||
|
credentials(name: 'eNB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for eNB')
|
||||||
|
string(name: 'eNB_SourceCodePath', defaultValue: '/tmp/CI-enb', description: 'Full path of eNB source code')
|
||||||
|
|
||||||
|
//EPC parameters
|
||||||
|
string(name: 'EPC_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of EPC')
|
||||||
|
string(name: 'EPC_Type', defaultValue: 'ltebox', description: 'EPC type: OAI or ltebox')
|
||||||
|
credentials(name: 'EPC_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for EPC')
|
||||||
|
string(name: 'EPC_SourceCodePath', defaultValue: '/tmp/CI-enb', description: 'Full path of EPC source code')
|
||||||
|
|
||||||
|
//ADB server parameters
|
||||||
|
string(name: 'ADB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of ADB server')
|
||||||
|
credentials(name: 'ADB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for ADB')
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage ("Verify Parameters") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||||
|
def allParametersPresent = true
|
||||||
|
|
||||||
|
// It is already to late to check it
|
||||||
|
if (params.pythonExecutor != null) {
|
||||||
|
echo "eNB CI executor node : ${pythonExecutor}"
|
||||||
|
}
|
||||||
|
// If not present picking a default XML file
|
||||||
|
if (params.pythonTestXmlFile == null) {
|
||||||
|
// picking default
|
||||||
|
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||||
|
echo "Test XML file(default): ${testXMLFile}"
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||||
|
} else {
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists("ci-scripts/" + xmlFile)) {
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
|
echo "Test XML file : ${xmlFile}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If not present picking a default Stage Name
|
||||||
|
if (params.pipelineTestStageName == null) {
|
||||||
|
// picking default
|
||||||
|
testStageName = 'Template Test Stage'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.smartphonesResource == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.UE_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.UE_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.UE_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
|
// if not present, take the job GIT variables (used for developing)
|
||||||
|
if (params.eNB_Repository == null) {
|
||||||
|
eNB_Repository = env.GIT_URL
|
||||||
|
} else {
|
||||||
|
eNB_Repository = params.eNB_Repository
|
||||||
|
}
|
||||||
|
echo "eNB_Repository : ${eNB_Repository}"
|
||||||
|
if (params.eNB_Branch == null) {
|
||||||
|
eNB_Branch = env.GIT_BRANCH
|
||||||
|
} else {
|
||||||
|
eNB_Branch = params.eNB_Branch
|
||||||
|
}
|
||||||
|
echo "eNB_Branch : ${eNB_Branch}"
|
||||||
|
if (params.eNB_CommitID == null) {
|
||||||
|
eNB_CommitID = env.GIT_COMMIT
|
||||||
|
} else {
|
||||||
|
eNB_CommitID = params.eNB_CommitID
|
||||||
|
}
|
||||||
|
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||||
|
if (params.eNB_mergeRequest != null) {
|
||||||
|
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
if (params.eNB_TargetBranch != null) {
|
||||||
|
eNB_TargetBranch = params.eNB_TargetBranch
|
||||||
|
} else {
|
||||||
|
eNB_TargetBranch = 'develop'
|
||||||
|
}
|
||||||
|
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (params.EPC_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Type == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if (params.ADB_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.ADB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allParametersPresent) {
|
||||||
|
echo "All parameters are present"
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||||
|
} else {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "git checkout -f ${eNB_CommitID}"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "Some parameters are missing"
|
||||||
|
sh "./ci-scripts/fail.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Build and Test") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
dir ('ci-scripts') {
|
||||||
|
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
|
try {
|
||||||
|
sh "python3 main.py --mode=TestUE --UEIPAddress=${params.UE_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
buildStageStatus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection') {
|
||||||
|
parallel {
|
||||||
|
stage('Log Collection (OAI UE - Build)') {
|
||||||
|
steps {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (OAI UE - Run)') {
|
||||||
|
steps {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (UE - Run)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("ue.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "ue.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if(fileExists("ci-scripts/test_results.html")) {
|
||||||
|
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
||||||
|
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||||
|
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if (params.pipelineZipsConsoleLog != null) {
|
||||||
|
if (params.pipelineZipsConsoleLog) {
|
||||||
|
echo "Archiving Jenkins console log"
|
||||||
|
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
|
||||||
|
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
|
||||||
|
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -465,4 +465,3 @@ log_config :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -267,4 +267,3 @@ log_config :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -209,10 +209,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -266,4 +266,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -211,10 +211,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -272,4 +272,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -211,10 +211,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -272,4 +272,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -211,10 +211,10 @@ MACRLCs = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
@@ -272,4 +272,3 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -42,4 +42,3 @@ log_config = {
|
|||||||
rrc_log_level ="error";
|
rrc_log_level ="error";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -42,4 +42,3 @@ log_config = {
|
|||||||
rrc_log_level ="error";
|
rrc_log_level ="error";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ log_config = {
|
|||||||
|
|
||||||
|
|
||||||
L1s = (
|
L1s = (
|
||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "nfapi";
|
tr_n_preference = "nfapi";
|
||||||
local_n_if_name = "ens3";
|
local_n_if_name = "ens3";
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ uninitvar:openair2/UTIL/OTG/otg_rx_socket.c
|
|||||||
// iteration of the loop.
|
// iteration of the loop.
|
||||||
nullPointer:common/utils/T/local_tracer.c:243
|
nullPointer:common/utils/T/local_tracer.c:243
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// once again cppcheck is not to understand that fds is initialized in the
|
// once again cppcheck does not understand that fds is initialized in the
|
||||||
// first iteration of the loop
|
// first iteration of the loop
|
||||||
nullPointer:common/utils/T/tracer/multi.c:264
|
nullPointer:common/utils/T/tracer/multi.c:264
|
||||||
nullPointer:common/utils/T/tracer/multi.c:265
|
nullPointer:common/utils/T/tracer/multi.c:265
|
||||||
|
|||||||
+570
-84
@@ -1,4 +1,3 @@
|
|||||||
#/*
|
|
||||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
# * contributor license agreements. See the NOTICE file distributed with
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
# * this work for additional information regarding copyright ownership.
|
# * this work for additional information regarding copyright ownership.
|
||||||
@@ -43,6 +42,9 @@ ENB_PROCESS_SEG_FAULT = -11
|
|||||||
ENB_PROCESS_ASSERTION = -12
|
ENB_PROCESS_ASSERTION = -12
|
||||||
ENB_PROCESS_REALTIME_ISSUE = -13
|
ENB_PROCESS_REALTIME_ISSUE = -13
|
||||||
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
|
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
|
||||||
|
UE_PROCESS_NOLOGFILE_TO_ANALYZE = -20
|
||||||
|
UE_PROCESS_COULD_NOT_SYNC = -21
|
||||||
|
UE_PROCESS_ASSERTION = -22
|
||||||
HSS_PROCESS_FAILED = -2
|
HSS_PROCESS_FAILED = -2
|
||||||
HSS_PROCESS_OK = +2
|
HSS_PROCESS_OK = +2
|
||||||
MME_PROCESS_FAILED = -3
|
MME_PROCESS_FAILED = -3
|
||||||
@@ -122,13 +124,21 @@ class SSHConnection():
|
|||||||
self.htmlTabNames = []
|
self.htmlTabNames = []
|
||||||
self.htmlTabIcons = []
|
self.htmlTabIcons = []
|
||||||
self.finalStatus = False
|
self.finalStatus = False
|
||||||
|
self.OsVersion = ''
|
||||||
|
self.KernelVersion = ''
|
||||||
|
self.UhdVersion = ''
|
||||||
|
self.UsrpBoard = ''
|
||||||
|
self.CpuNb = ''
|
||||||
|
self.CpuModel = ''
|
||||||
|
self.CpuMHz = ''
|
||||||
|
self.UEIPAddress = ''
|
||||||
|
self.UEUserName = ''
|
||||||
|
self.UEPassword = ''
|
||||||
|
self.UE_instance = ''
|
||||||
|
self.UESourceCodePath = ''
|
||||||
|
self.Build_OAI_UE_args = ''
|
||||||
|
self.Initialize_OAI_UE_args = ''
|
||||||
self.eNBOsVersion = ''
|
self.eNBOsVersion = ''
|
||||||
self.eNBKernelVersion = ''
|
|
||||||
self.eNBUhdVersion = ''
|
|
||||||
self.eNBUsrpBoard = ''
|
|
||||||
self.eNBCpuNb = ''
|
|
||||||
self.eNBCpuModel = ''
|
|
||||||
self.eNBCpuMHz = ''
|
|
||||||
|
|
||||||
def open(self, ipaddress, username, password):
|
def open(self, ipaddress, username, password):
|
||||||
count = 0
|
count = 0
|
||||||
@@ -324,11 +334,46 @@ class SSHConnection():
|
|||||||
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||||
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
self.command('mv compile_oai_enb.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
self.command('mv compile_oai_enb.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
# Workaround to run with develop-nr
|
|
||||||
self.command('if [ -e ran_build ]; then cp -rf ran_build lte_build_oai; fi', '\$', 30)
|
|
||||||
self.close()
|
self.close()
|
||||||
self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
||||||
|
|
||||||
|
def BuildOAIUE(self):
|
||||||
|
if self.UEIPAddress == '' or self.eNBRepository == '' or self.eNBBranch == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
||||||
|
Usage()
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
|
self.command('mkdir -p ' + self.UESourceCodePath, '\$', 5)
|
||||||
|
self.command('cd ' + self.UESourceCodePath, '\$', 5)
|
||||||
|
self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.eNBRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600)
|
||||||
|
# here add a check if git clone or git fetch went smoothly
|
||||||
|
self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||||
|
self.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||||
|
# if the commit ID is provided use it to point to it
|
||||||
|
if self.eNBCommitID != '':
|
||||||
|
self.command('git checkout -f ' + self.eNBCommitID, '\$', 5)
|
||||||
|
# if the branch is not develop, then it is a merge request and we need to do
|
||||||
|
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||||
|
if (self.eNB_AllowMerge):
|
||||||
|
if self.eNBTargetBranch == '':
|
||||||
|
if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'):
|
||||||
|
self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
else:
|
||||||
|
logging.debug('Merging with the target branch: ' + self.eNBTargetBranch)
|
||||||
|
self.command('git merge --ff origin/' + self.eNBTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
self.command('source oaienv', '\$', 5)
|
||||||
|
self.command('cd cmake_targets', '\$', 5)
|
||||||
|
self.command('mkdir -p log', '\$', 5)
|
||||||
|
self.command('chmod 777 log', '\$', 5)
|
||||||
|
# no need to remove in log (git clean did the trick)
|
||||||
|
self.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_ue.log', 'Bypassing the Tests', 600)
|
||||||
|
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||||
|
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
|
self.command('mv compile_oai_ue.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
|
self.close()
|
||||||
|
self.CreateHtmlTestRow(self.Build_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE')
|
||||||
|
|
||||||
|
|
||||||
def InitializeHSS(self):
|
def InitializeHSS(self):
|
||||||
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
|
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
|
||||||
Usage()
|
Usage()
|
||||||
@@ -452,8 +497,8 @@ class SSHConnection():
|
|||||||
# Launch eNB with the modified config file
|
# Launch eNB with the modified config file
|
||||||
self.command('source oaienv', '\$', 5)
|
self.command('source oaienv', '\$', 5)
|
||||||
self.command('cd cmake_targets', '\$', 5)
|
self.command('cd cmake_targets', '\$', 5)
|
||||||
self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh ', '\$', 5)
|
self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||||
self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh ', '\$', 5)
|
self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||||
self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
|
self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
|
||||||
self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||||
if not rruCheck:
|
if not rruCheck:
|
||||||
@@ -535,6 +580,99 @@ class SSHConnection():
|
|||||||
job.join()
|
job.join()
|
||||||
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||||
|
|
||||||
|
def InitializeOAIUE(self):
|
||||||
|
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
||||||
|
Usage()
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
#initialize_OAI_UE_flag = True
|
||||||
|
#pStatus = self.CheckOAIUEProcessExist(initialize_OAI_UE_flag)
|
||||||
|
#if (pStatus < 0):
|
||||||
|
# self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', pStatus)
|
||||||
|
# self.CreateHtmlTabFooter(False)
|
||||||
|
# sys.exit(1)
|
||||||
|
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
|
# b2xx_fx3_utils reset procedure
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 5)
|
||||||
|
result = re.search('type: b200', str(self.ssh.before))
|
||||||
|
if result is not None:
|
||||||
|
logging.debug('Found a B2xx device --> resetting it')
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S sudo b2xx_fx3_utils --reset-device', '\$', 5)
|
||||||
|
# Reloading FGPA bin firmware
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 5)
|
||||||
|
else:
|
||||||
|
logging.debug('Did not find any B2xx device')
|
||||||
|
self.command('cd ' + self.UESourceCodePath, '\$', 5)
|
||||||
|
# Initialize_OAI_UE_args usually start with -C and followed by the location in repository
|
||||||
|
#full_config_file = self.Initialize_OAI_UE_args.replace('-O ','')
|
||||||
|
#extIdx = full_config_file.find('.conf')
|
||||||
|
#if (extIdx > 0):
|
||||||
|
# extra_options = full_config_file[extIdx + 5:]
|
||||||
|
# # if tracer options is on, compiling and running T Tracer
|
||||||
|
# result = re.search('T_stdout', str(extra_options))
|
||||||
|
## if result is not None:
|
||||||
|
# logging.debug('\u001B[1m Compiling and launching T Tracer\u001B[0m')
|
||||||
|
# self.command('cd common/utils/T/tracer', '\$', 5)
|
||||||
|
# self.command('make', '\$', 10)
|
||||||
|
# self.command('echo $USER; nohup ./record -d ../T_messages.txt -o ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '_record.raw -ON -off VCD -off HEAVY -off LEGACY_GROUP_TRACE -off LEGACY_GROUP_DEBUG > ' + self.UESourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '_record.log 2>&1 &', self.UEUserName, 5)
|
||||||
|
# self.command('cd ' + self.UESourceCodePath, '\$', 5)
|
||||||
|
# full_config_file = full_config_file[:extIdx + 5]
|
||||||
|
# config_path, config_file = os.path.split(full_config_file)
|
||||||
|
#ci_full_config_file = config_path + '/ci-' + config_file
|
||||||
|
#rruCheck = False
|
||||||
|
#result = re.search('rru', str(config_file))
|
||||||
|
#if result is not None:
|
||||||
|
# rruCheck = True
|
||||||
|
## Make a copy and adapt to EPC / UE IP addresses
|
||||||
|
#self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
||||||
|
#self.command('sed -i -e \'s/CI_UE_IP_ADDR/' + self.UEIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||||
|
# Launch UE with the modified config file
|
||||||
|
self.command('source oaienv', '\$', 5)
|
||||||
|
self.command('cd cmake_targets/lte_build_oai/build', '\$', 5)
|
||||||
|
self.command('echo "ulimit -c unlimited && ./lte-uesoftmodem ' + self.Initialize_OAI_UE_args + '" > ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||||
|
self.command('chmod 775 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S -E daemon --inherit --unsafe --name=ue' + str(self.UE_instance) + '_daemon --chdir=' + self.UESourceCodePath + '/cmake_targets/lte_build_oai/build -o ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||||
|
self.UELogFile = 'ue_' + self.testCase_id + '.log'
|
||||||
|
time.sleep(6)
|
||||||
|
self.command('cd ../..', '\$', 5)
|
||||||
|
doLoop = True
|
||||||
|
loopCounter = 10
|
||||||
|
while (doLoop):
|
||||||
|
loopCounter = loopCounter - 1
|
||||||
|
if (loopCounter == 0):
|
||||||
|
# In case of T tracer recording, we may need to kill it
|
||||||
|
#result = re.search('T_stdout', str(self.Initialize_OAI_UE_args))
|
||||||
|
#if result is not None:
|
||||||
|
# self.command('killall --signal SIGKILL record', '\$', 5)
|
||||||
|
self.close()
|
||||||
|
doLoop = False
|
||||||
|
logging.error('\u001B[1;37;41m UE logging system did not show got sync! \u001B[0m')
|
||||||
|
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', ALL_PROCESSES_OK, 'OAI UE')
|
||||||
|
self.CreateHtmlTabFooter(False)
|
||||||
|
## In case of T tracer recording, we need to kill tshark on EPC side
|
||||||
|
#result = re.search('T_stdout', str(self.Initialize_OAI_UE_args))
|
||||||
|
#if result is not None:
|
||||||
|
# self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword)
|
||||||
|
# logging.debug('\u001B[1m Stopping tshark \u001B[0m')
|
||||||
|
# self.command('echo ' + self.EPCPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||||
|
# self.close()
|
||||||
|
# time.sleep(1)
|
||||||
|
# pcap_log_file = 'enb_' + self.testCase_id + '_s1log.pcap'
|
||||||
|
# copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + pcap_log_file, '.')
|
||||||
|
# if (copyin_res == 0):
|
||||||
|
# self.copyout(self.UEIPAddress, self.UEUserName, self.UEPassword, pcap_log_file, self.UESourceCodePath + '/cmake_targets/.')
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
self.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4)
|
||||||
|
result = re.search('got sync', str(self.ssh.before))
|
||||||
|
if result is None:
|
||||||
|
time.sleep(6)
|
||||||
|
else:
|
||||||
|
doLoop = False
|
||||||
|
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE')
|
||||||
|
logging.debug('\u001B[1m Initialize OAI UE Completed\u001B[0m')
|
||||||
|
self.close()
|
||||||
|
|
||||||
def checkDevTTYisUnlocked(self):
|
def checkDevTTYisUnlocked(self):
|
||||||
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||||
count = 0
|
count = 0
|
||||||
@@ -1674,6 +1812,48 @@ class SSHConnection():
|
|||||||
result = logStatus
|
result = logStatus
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def CheckOAIUEProcessExist(self, initialize_OAI_UE_flag):
|
||||||
|
multi_jobs = []
|
||||||
|
status_queue = SimpleQueue()
|
||||||
|
if initialize_OAI_UE_flag == False:
|
||||||
|
p = Process(target = SSH.CheckOAIUEProcess, args = (status_queue,))
|
||||||
|
p.daemon = True
|
||||||
|
p.start()
|
||||||
|
multi_jobs.append(p)
|
||||||
|
for job in multi_jobs:
|
||||||
|
job.join()
|
||||||
|
|
||||||
|
if (status_queue.empty()):
|
||||||
|
return -15
|
||||||
|
else:
|
||||||
|
result = 0
|
||||||
|
while (not status_queue.empty()):
|
||||||
|
status = status_queue.get()
|
||||||
|
if (status < 0):
|
||||||
|
result = status
|
||||||
|
if result == OAI_UE_PROCESS_FAILED:
|
||||||
|
fileCheck = re.search('enb_', str(self.UELogFile))
|
||||||
|
if fileCheck is not None:
|
||||||
|
self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/' + self.UELogFile, '.')
|
||||||
|
logStatus = self.AnalyzeLogFile_UE(self.UELogFile)
|
||||||
|
if logStatus < 0:
|
||||||
|
result = logStatus
|
||||||
|
return result
|
||||||
|
|
||||||
|
def CheckOAIUEProcess(self, status_queue):
|
||||||
|
try:
|
||||||
|
self.open(self.OAIUEIPAddress, self.OAIUEUserName, self.OAIUEPassword)
|
||||||
|
self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never lte-uesoftmodem', '\$', 5)
|
||||||
|
result = re.search('lte-uesoftmodem', str(self.ssh.before))
|
||||||
|
if result is None:
|
||||||
|
logging.debug('\u001B[1;37;41m OAI UE Process Not Found! \u001B[0m')
|
||||||
|
status_queue.put(OAI_UE_PROCESS_FAILED)
|
||||||
|
else:
|
||||||
|
status_queue.put(OAI_UE_PROCESS_OK)
|
||||||
|
self.close()
|
||||||
|
except:
|
||||||
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def CheckeNBProcess(self, status_queue):
|
def CheckeNBProcess(self, status_queue):
|
||||||
try:
|
try:
|
||||||
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
||||||
@@ -1891,6 +2071,156 @@ class SSHConnection():
|
|||||||
return ENB_PROCESS_REALTIME_ISSUE
|
return ENB_PROCESS_REALTIME_ISSUE
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
def AnalyzeLogFile_UE(self, UElogFile):
|
||||||
|
if (not os.path.isfile('./' + UElogFile)):
|
||||||
|
return -1
|
||||||
|
ue_log_file = open('./' + UElogFile, 'r')
|
||||||
|
foundAssertion = False
|
||||||
|
msgAssertion = ''
|
||||||
|
msgLine = 0
|
||||||
|
foundSegFault = False
|
||||||
|
foundRealTimeIssue = False
|
||||||
|
rlcDiscardBuffer = 0
|
||||||
|
rachCanceledProcedure = 0
|
||||||
|
uciStatMsgCount = 0
|
||||||
|
pdcpFailure = 0
|
||||||
|
ulschFailure = 0
|
||||||
|
no_cell_sync_found = False
|
||||||
|
mib_found = False
|
||||||
|
frequency_found = False
|
||||||
|
self.htmlUEFailureMsg = ''
|
||||||
|
for line in ue_log_file.readlines():
|
||||||
|
result = re.search('[Ss]egmentation [Ff]ault', str(line))
|
||||||
|
if result is not None:
|
||||||
|
foundSegFault = True
|
||||||
|
result = re.search('[Cc]ore [dD]ump', str(line))
|
||||||
|
if result is not None:
|
||||||
|
foundSegFault = True
|
||||||
|
result = re.search('[Aa]ssertion', str(line))
|
||||||
|
if result is not None:
|
||||||
|
foundAssertion = True
|
||||||
|
result = re.search('LLL', str(line))
|
||||||
|
if result is not None:
|
||||||
|
foundRealTimeIssue = True
|
||||||
|
if foundAssertion and (msgLine < 3):
|
||||||
|
msgLine += 1
|
||||||
|
msgAssertion += str(line)
|
||||||
|
result = re.search('uci->stat', str(line))
|
||||||
|
if result is not None:
|
||||||
|
uciStatMsgCount += 1
|
||||||
|
# No cell synchronization found, abandoning
|
||||||
|
result = re.search('No cell synchronization found, abandoning', str(line))
|
||||||
|
if result is not None:
|
||||||
|
no_cell_sync_found = True
|
||||||
|
result = re.search("MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P<nidcell>\d{1,3}), N_RB_DL (?P<n_rb_dl>\d{1,3}), PHICH DURATION (?P<phich_duration>\d), PHICH RESOURCE (?P<phich_resource>.{1,4}), TX_ANT (?P<tx_ant>\d)", str(line))
|
||||||
|
if result is not None and (not mib_found):
|
||||||
|
try:
|
||||||
|
mibMsg = "MIB Information: " + result.group(1) + ', ' + result.group(2)
|
||||||
|
self.htmlUEFailureMsg += mibMsg + '\n'
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
mibMsg = " nidcell = " + result.group('nidcell')
|
||||||
|
self.htmlUEFailureMsg += mibMsg
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
mibMsg = " n_rb_dl = " + result.group('n_rb_dl')
|
||||||
|
self.htmlUEFailureMsg += mibMsg + '\n'
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
mibMsg = " phich_duration = " + result.group('phich_duration')
|
||||||
|
self.htmlUEFailureMsg += mibMsg
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
mibMsg = " phich_resource = " + result.group('phich_resource')
|
||||||
|
self.htmlUEFailureMsg += mibMsg + '\n'
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
mibMsg = " tx_ant = " + result.group('tx_ant')
|
||||||
|
self.htmlUEFailureMsg += mibMsg + '\n'
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
mib_found = True
|
||||||
|
except Exception as e:
|
||||||
|
logging.error('\033[91m' + "MIB marker was not found" + '\033[0m')
|
||||||
|
result = re.search("Measured Carrier Frequency (?P<measured_carrier_frequency>\d{1,15}) Hz", str(line))
|
||||||
|
if result is not None and (not frequency_found):
|
||||||
|
try:
|
||||||
|
mibMsg = "Measured Carrier Frequency = " + result.group('measured_carrier_frequency') + ' Hz'
|
||||||
|
self.htmlUEFailureMsg += mibMsg + '\n'
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
frequency_found = True
|
||||||
|
except Exception as e:
|
||||||
|
logging.error('\033[91m' + "Measured Carrier Frequency not found" + '\033[0m')
|
||||||
|
result = re.search("Found (?P<operator>[\w,\s]{1,15}) \(name from internal table\)", str(line))
|
||||||
|
if result is not None:
|
||||||
|
try:
|
||||||
|
mibMsg = "The operator is: " + result.group('operator')
|
||||||
|
self.htmlUEFailureMsg += mibMsg + '\n'
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
except Exception as e:
|
||||||
|
logging.error('\033[91m' + "Operator name not found" + '\033[0m')
|
||||||
|
result = re.search("SIB5 InterFreqCarrierFreq element (.{1,4})/(.{1,4})", str(line))
|
||||||
|
if result is not None:
|
||||||
|
try:
|
||||||
|
mibMsg = "SIB5 InterFreqCarrierFreq element " + result.group(1) + '/' + result.group(2)
|
||||||
|
self.htmlUEFailureMsg += mibMsg + ' -> '
|
||||||
|
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||||
|
except Exception as e:
|
||||||
|
logging.error('\033[91m' + "SIB5 InterFreqCarrierFreq element not found" + '\033[0m')
|
||||||
|
result = re.search("DL Carrier Frequency/ARFCN : (?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
|
||||||
|
if result is not None:
|
||||||
|
try:
|
||||||
|
freq = result.group('carrier_frequency')
|
||||||
|
new_freq = re.sub('/[0-9]+','',freq)
|
||||||
|
float_freq = float(new_freq) / 1000000
|
||||||
|
self.htmlUEFailureMsg += 'DL Freq: ' + ('%.1f' % float_freq) + ' MHz'
|
||||||
|
logging.debug('\033[94m' + " DL Carrier Frequency is: " + freq + '\033[0m')
|
||||||
|
except Exception as e:
|
||||||
|
logging.error('\033[91m' + " DL Carrier Frequency not found" + '\033[0m')
|
||||||
|
result = re.search("AllowedMeasBandwidth : (?P<allowed_bandwidth>\d{1,7})", str(line))
|
||||||
|
if result is not None:
|
||||||
|
try:
|
||||||
|
prb = result.group('allowed_bandwidth')
|
||||||
|
self.htmlUEFailureMsg += ' -- PRB: ' + prb + '\n'
|
||||||
|
logging.debug('\033[94m' + " AllowedMeasBandwidth: " + prb + '\033[0m')
|
||||||
|
except Exception as e:
|
||||||
|
logging.error('\033[91m' + " AllowedMeasBandwidth not found" + '\033[0m')
|
||||||
|
ue_log_file.close()
|
||||||
|
if uciStatMsgCount > 0:
|
||||||
|
statMsg = 'UE showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
||||||
|
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += statMsg + '\n'
|
||||||
|
if pdcpFailure > 0:
|
||||||
|
statMsg = 'UE showed ' + str(pdcpFailure) + ' "PDCP Out of Resources" message(s)'
|
||||||
|
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += statMsg + '\n'
|
||||||
|
if ulschFailure > 0:
|
||||||
|
statMsg = 'UE showed ' + str(ulschFailure) + ' "ULSCH in error in round" message(s)'
|
||||||
|
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += statMsg + '\n'
|
||||||
|
if rachCanceledProcedure > 0:
|
||||||
|
rachMsg = 'UE cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
|
||||||
|
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += rachMsg + '\n'
|
||||||
|
if foundSegFault:
|
||||||
|
logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m')
|
||||||
|
return ENB_PROCESS_SEG_FAULT
|
||||||
|
if foundAssertion:
|
||||||
|
logging.debug('\u001B[1;37;43m UE ended with an assertion! \u001B[0m')
|
||||||
|
# removed for esthetics
|
||||||
|
#self.htmlUEFailureMsg += msgAssertion
|
||||||
|
self.htmlUEFailureMsg += 'UE ended with an assertion!\n'
|
||||||
|
if not mib_found or not frequency_found:
|
||||||
|
return UE_PROCESS_ASSERTION
|
||||||
|
if foundRealTimeIssue:
|
||||||
|
logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += 'UE faced real time issues!\n'
|
||||||
|
#return ENB_PROCESS_REALTIME_ISSUE
|
||||||
|
if no_cell_sync_found and not mib_found:
|
||||||
|
logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += 'UE could not synchronize!\n'
|
||||||
|
return UE_PROCESS_COULD_NOT_SYNC
|
||||||
|
if rlcDiscardBuffer > 0:
|
||||||
|
rlcMsg = 'UE RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
|
||||||
|
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
|
||||||
|
self.htmlUEFailureMsg += rlcMsg + '\n'
|
||||||
|
return ENB_PROCESS_REALTIME_ISSUE
|
||||||
|
return 0
|
||||||
|
|
||||||
def TerminateeNB(self):
|
def TerminateeNB(self):
|
||||||
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
||||||
self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5)
|
self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5)
|
||||||
@@ -2031,6 +2361,75 @@ class SSHConnection():
|
|||||||
job.join()
|
job.join()
|
||||||
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||||
|
|
||||||
|
def TerminateOAIUE(self):
|
||||||
|
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
|
self.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S daemon --name=ue' + str(self.UE_instance) + '_daemon --stop', '\$', 5)
|
||||||
|
self.command('rm -f my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S killall --signal SIGINT lte-uesoftmodem || true', '\$', 5)
|
||||||
|
time.sleep(5)
|
||||||
|
self.command('stdbuf -o0 ps -aux | grep -v grep | grep lte-uesoftmodem', '\$', 5)
|
||||||
|
result = re.search('lte-uesoftmodem', str(self.ssh.before))
|
||||||
|
if result is not None:
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S killall --signal SIGKILL lte-uesoftmodem || true', '\$', 5)
|
||||||
|
time.sleep(5)
|
||||||
|
self.close()
|
||||||
|
# If tracer options is on, stopping tshark on EPC side
|
||||||
|
result = re.search('T_stdout', str(self.Initialize_OAI_UE_args))
|
||||||
|
if result is not None:
|
||||||
|
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
|
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||||
|
time.sleep(1)
|
||||||
|
pcap_log_file = self.UELogFile.replace('.log', '_s1log.pcap')
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S chmod 666 /tmp/' + pcap_log_file, '\$', 5)
|
||||||
|
self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, '/tmp/' + pcap_log_file, '.')
|
||||||
|
self.copyout(self.UEIPAddress, self.UEUserName, self.UEPassword, pcap_log_file, self.UESourceCodePath + '/cmake_targets/.')
|
||||||
|
self.close()
|
||||||
|
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
|
||||||
|
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
|
self.command('cd ' + self.UESourceCodePath + '/common/utils/T/tracer/', '\$', 5)
|
||||||
|
raw_record_file = self.UELogFile.replace('.log', '_record.raw')
|
||||||
|
replay_log_file = self.UELogFile.replace('.log', '_replay.log')
|
||||||
|
extracted_txt_file = self.UELogFile.replace('.log', '_extracted_messages.txt')
|
||||||
|
extracted_log_file = self.UELogFile.replace('.log', '_extracted_messages.log')
|
||||||
|
self.command('./extract_config -i ' + self.UESourceCodePath + '/cmake_targets/' + raw_record_file + ' > ' + self.UESourceCodePath + '/cmake_targets/' + extracted_txt_file, '\$', 5)
|
||||||
|
self.command('echo $USER; nohup ./replay -i ' + self.UESourceCodePath + '/cmake_targets/' + raw_record_file + ' > ' + self.UESourceCodePath + '/cmake_targets/' + replay_log_file + ' 2>&1 &', self.UEUserName, 5)
|
||||||
|
self.command('./textlog -d ' + self.UESourceCodePath + '/cmake_targets/' + extracted_txt_file + ' -no-gui -ON -full > ' + self.UESourceCodePath + '/cmake_targets/' + extracted_log_file, '\$', 5)
|
||||||
|
self.close()
|
||||||
|
self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/' + extracted_log_file, '.')
|
||||||
|
logging.debug('\u001B[1m Analyzing UE replay logfile \u001B[0m')
|
||||||
|
logStatus = self.AnalyzeLogFile_UE(extracted_log_file)
|
||||||
|
self.CreateHtmlTestRow(html_queue, 'OK', ALL_PROCESSES_OK)
|
||||||
|
self.UELogFile = ''
|
||||||
|
else:
|
||||||
|
result = re.search('ue_', str(self.UELogFile))
|
||||||
|
if result is not None:
|
||||||
|
copyin_res = self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/' + self.UELogFile, '.')
|
||||||
|
if (copyin_res == -1):
|
||||||
|
logging.debug('\u001B[1;37;41m Could not copy UE logfile to analyze it! \u001B[0m')
|
||||||
|
optionsMsg = '<pre style="background-color:white">Could not copy UE logfile to analyze it!</pre>'
|
||||||
|
self.CreateHtmlTestRow(optionsMsg, 'KO', UE_PROCESS_NOLOGFILE_TO_ANALYZE, 'UE')
|
||||||
|
self.UELogFile = ''
|
||||||
|
return
|
||||||
|
logging.debug('\u001B[1m Analyzing UE logfile \u001B[0m')
|
||||||
|
logStatus = self.AnalyzeLogFile_UE(self.UELogFile)
|
||||||
|
if (logStatus < 0):
|
||||||
|
optionsMsg = '<pre style="background-color:white"><b>Sniffing Unsuccessful</b>\n'
|
||||||
|
optionsMsg += self.htmlUEFailureMsg
|
||||||
|
optionsMsg += '</pre>'
|
||||||
|
self.CreateHtmlTestRow(optionsMsg, 'KO', logStatus, 'UE')
|
||||||
|
self.CreateHtmlTabFooter(False)
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
optionsMsg = '<pre style="background-color:white"><b>Sniffing Successful</b>\n'
|
||||||
|
optionsMsg += self.htmlUEFailureMsg
|
||||||
|
optionsMsg += '</pre>'
|
||||||
|
self.CreateHtmlTestRow(optionsMsg, 'OK', ALL_PROCESSES_OK)
|
||||||
|
self.UELogFile = ''
|
||||||
|
else:
|
||||||
|
self.CreateHtmlTestRow('<pre style="background-color:white">No Log File to analyze</pre>', 'OK', ALL_PROCESSES_OK)
|
||||||
|
|
||||||
def AutoTerminateUEandeNB(self):
|
def AutoTerminateUEandeNB(self):
|
||||||
self.testCase_id = 'AUTO-KILL-UE'
|
self.testCase_id = 'AUTO-KILL-UE'
|
||||||
self.desc = 'Automatic Termination of UE'
|
self.desc = 'Automatic Termination of UE'
|
||||||
@@ -2047,12 +2446,24 @@ class SSHConnection():
|
|||||||
self.CreateHtmlTestRow(str(self.idle_sleep_time) + ' sec', 'OK', ALL_PROCESSES_OK)
|
self.CreateHtmlTestRow(str(self.idle_sleep_time) + ' sec', 'OK', ALL_PROCESSES_OK)
|
||||||
|
|
||||||
def LogCollectBuild(self):
|
def LogCollectBuild(self):
|
||||||
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
if (self.eNBIPAddress != '' and self.eNBUserName != '' and self.eNBPassword != ''):
|
||||||
self.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
IPAddress = self.eNBIPAddress
|
||||||
|
UserName = self.eNBUserName
|
||||||
|
Password = self.eNBPassword
|
||||||
|
SourceCodePath = self.eNBSourceCodePath
|
||||||
|
elif (self.UEIPAddress != '' and self.UEUserName != '' and self.UEPassword != ''):
|
||||||
|
IPAddress = self.UEIPAddress
|
||||||
|
UserName = self.UEUserName
|
||||||
|
Password = self.UEPassword
|
||||||
|
SourceCodePath = self.UESourceCodePath
|
||||||
|
else:
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
self.open(IPAddress, UserName, Password)
|
||||||
|
self.command('cd ' + SourceCodePath, '\$', 5)
|
||||||
self.command('cd cmake_targets', '\$', 5)
|
self.command('cd cmake_targets', '\$', 5)
|
||||||
self.command('rm -f build.log.zip', '\$', 5)
|
self.command('rm -f build.log.zip', '\$', 5)
|
||||||
self.command('zip build.log.zip build_log_*/*', '\$', 60)
|
self.command('zip build.log.zip build_log_*/*', '\$', 60)
|
||||||
self.command('echo ' + self.eNBPassword + ' | sudo -S rm -rf build_log_*', '\$', 5)
|
self.command('echo ' + Password + ' | sudo -S rm -rf build_log_*', '\$', 5)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def LogCollecteNB(self):
|
def LogCollecteNB(self):
|
||||||
@@ -2121,49 +2532,69 @@ class SSHConnection():
|
|||||||
self.command('zip spgw.log.zip xGwLog.0', '\$', 60)
|
self.command('zip spgw.log.zip xGwLog.0', '\$', 60)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
def LogCollectOAIUE(self):
|
||||||
|
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
|
self.command('cd ' + self.UESourceCodePath, '\$', 5)
|
||||||
|
self.command('cd cmake_targets', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S rm -f ue.log.zip', '\$', 5)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S zip ue.log.zip ue*.log core* ue_*record.raw ue_*.pcap ue_*txt', '\$', 60)
|
||||||
|
self.command('echo ' + self.UEPassword + ' | sudo -S rm ue*.log core* ue_*record.raw ue_*.pcap ue_*txt', '\$', 5)
|
||||||
|
self.close()
|
||||||
|
|
||||||
def RetrieveSystemVersion(self):
|
def RetrieveSystemVersion(self):
|
||||||
if self.eNBIPAddress == 'none':
|
if self.eNBIPAddress == 'none':
|
||||||
self.eNBOsVersion = 'Ubuntu 16.04.5 LTS'
|
self.OsVersion = 'Ubuntu 16.04.5 LTS'
|
||||||
self.eNBKernelVersion = '4.15.0-45-generic'
|
self.KernelVersion = '4.15.0-45-generic'
|
||||||
self.eNBUhdVersion = '3.13.0.1-0'
|
self.UhdVersion = '3.13.0.1-0'
|
||||||
self.eNBUsrpBoard = 'B210'
|
self.UsrpBoard = 'B210'
|
||||||
self.eNBCpuNb = '4'
|
self.CpuNb = '4'
|
||||||
self.eNBCpuModel = 'Intel(R) Core(TM) i5-6200U'
|
self.CpuModel = 'Intel(R) Core(TM) i5-6200U'
|
||||||
self.eNBCpuMHz = '2399.996 MHz'
|
self.CpuMHz = '2399.996 MHz'
|
||||||
return
|
return
|
||||||
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '':
|
machine = None
|
||||||
|
if self.eNBIPAddress != '' and self.eNBUserName != '' and self.eNBPassword != '':
|
||||||
|
machine = 'eNB'
|
||||||
|
IPAddress = self.eNBIPAddress
|
||||||
|
UserName = self.eNBUserName
|
||||||
|
Password = self.eNBPassword
|
||||||
|
elif self.UEIPAddress != '' and self.UEUserName != '' and self.UEPassword != '':
|
||||||
|
machine = 'UE'
|
||||||
|
IPAddress = self.UEIPAddress
|
||||||
|
UserName = self.UEUserName
|
||||||
|
Password = self.UEPassword
|
||||||
|
if machine is None:
|
||||||
Usage()
|
Usage()
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
self.open(IPAddress, UserName, Password)
|
||||||
self.command('lsb_release -a', '\$', 5)
|
self.command('lsb_release -a', '\$', 5)
|
||||||
result = re.search('Description:\\\\t(?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)', str(self.ssh.before))
|
result = re.search('Description:\\\\t(?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)', str(self.ssh.before))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.eNBOsVersion = result.group('os_type')
|
self.OsVersion = result.group('os_type')
|
||||||
logging.debug('OS is: ' + self.eNBOsVersion)
|
logging.debug('OS is: ' + self.OsVersion)
|
||||||
self.command('uname -r', '\$', 5)
|
self.command('uname -r', '\$', 5)
|
||||||
result = re.search('uname -r\\\\r\\\\n(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)', str(self.ssh.before))
|
result = re.search('uname -r\\\\r\\\\n(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)', str(self.ssh.before))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.eNBKernelVersion = result.group('kernel_version')
|
self.KernelVersion = result.group('kernel_version')
|
||||||
logging.debug('Kernel Version is: ' + self.eNBKernelVersion)
|
logging.debug('Kernel Version is: ' + self.KernelVersion)
|
||||||
self.command('dpkg --list | egrep --color=never libuhd003', '\$', 5)
|
self.command('dpkg --list | egrep --color=never libuhd003', '\$', 5)
|
||||||
result = re.search('libuhd003:amd64 *(?P<uhd_version>[0-9\.]+)', str(self.ssh.before))
|
result = re.search('libuhd003:amd64 *(?P<uhd_version>[0-9\.]+)', str(self.ssh.before))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.eNBUhdVersion = result.group('uhd_version')
|
self.UhdVersion = result.group('uhd_version')
|
||||||
logging.debug('UHD Version is: ' + self.eNBUhdVersion)
|
logging.debug('UHD Version is: ' + self.UhdVersion)
|
||||||
self.command('echo ' + self.eNBPassword + ' | sudo -S uhd_find_devices', '\$', 5)
|
self.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 5)
|
||||||
result = re.search('product: (?P<usrp_board>[0-9A-Za-z]+)\\\\r\\\\n', str(self.ssh.before))
|
result = re.search('product: (?P<usrp_board>[0-9A-Za-z]+)\\\\r\\\\n', str(self.ssh.before))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.eNBUsrpBoard = result.group('usrp_board')
|
self.UsrpBoard = result.group('usrp_board')
|
||||||
logging.debug('USRP Board is: ' + self.eNBUsrpBoard)
|
logging.debug('USRP Board is: ' + self.UsrpBoard)
|
||||||
self.command('lscpu', '\$', 5)
|
self.command('lscpu', '\$', 5)
|
||||||
result = re.search('CPU\(s\): *(?P<nb_cpus>[0-9]+).*Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+).*CPU MHz: *(?P<cpu_mhz>[0-9\.]+)', str(self.ssh.before))
|
result = re.search('CPU\(s\): *(?P<nb_cpus>[0-9]+).*Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+).*CPU MHz: *(?P<cpu_mhz>[0-9\.]+)', str(self.ssh.before))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.eNBCpuNb = result.group('nb_cpus')
|
self.CpuNb = result.group('nb_cpus')
|
||||||
logging.debug('nb_cpus: ' + self.eNBCpuNb)
|
logging.debug('nb_cpus: ' + self.CpuNb)
|
||||||
self.eNBCpuModel = result.group('model')
|
self.CpuModel = result.group('model')
|
||||||
logging.debug('model: ' + self.eNBCpuModel)
|
logging.debug('model: ' + self.CpuModel)
|
||||||
self.eNBCpuMHz = result.group('cpu_mhz') + ' MHz'
|
self.CpuMHz = result.group('cpu_mhz') + ' MHz'
|
||||||
logging.debug('cpu_mhz: ' + self.eNBCpuMHz)
|
logging.debug('cpu_mhz: ' + self.CpuMHz)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
@@ -2171,6 +2602,9 @@ class SSHConnection():
|
|||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
def CreateHtmlHeader(self):
|
def CreateHtmlHeader(self):
|
||||||
if (not self.htmlHeaderCreated):
|
if (not self.htmlHeaderCreated):
|
||||||
|
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||||
|
logging.debug('\u001B[1m Creating HTML header \u001B[0m')
|
||||||
|
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||||
self.htmlFile = open('test_results.html', 'w')
|
self.htmlFile = open('test_results.html', 'w')
|
||||||
self.htmlFile.write('<!DOCTYPE html>\n')
|
self.htmlFile.write('<!DOCTYPE html>\n')
|
||||||
self.htmlFile.write('<html class="no-js" lang="en-US">\n')
|
self.htmlFile.write('<html class="no-js" lang="en-US">\n')
|
||||||
@@ -2248,18 +2682,13 @@ class SSHConnection():
|
|||||||
self.htmlFile.write(' </tr>\n')
|
self.htmlFile.write(' </tr>\n')
|
||||||
self.htmlFile.write(' </table>\n')
|
self.htmlFile.write(' </table>\n')
|
||||||
|
|
||||||
terminate_ue_flag = True
|
|
||||||
if (self.ADBIPAddress != 'none'):
|
if (self.ADBIPAddress != 'none'):
|
||||||
|
terminate_ue_flag = True
|
||||||
self.GetAllUEDevices(terminate_ue_flag)
|
self.GetAllUEDevices(terminate_ue_flag)
|
||||||
self.GetAllCatMDevices(terminate_ue_flag)
|
self.GetAllCatMDevices(terminate_ue_flag)
|
||||||
else:
|
self.htmlUEConnected = len(self.UEDevices)
|
||||||
self.UEDevices.append('doughq9rehg')
|
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(len(self.UEDevices)) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
|
||||||
self.UEDevices.append('dnsgiuahgia')
|
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(len(self.CatMDevices)) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
|
||||||
self.UEDevices.append('uehgieng9')
|
|
||||||
self.htmlUEConnected = len(self.UEDevices)
|
|
||||||
|
|
||||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(len(self.UEDevices)) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
|
|
||||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(len(self.CatMDevices)) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
|
|
||||||
self.htmlFile.write(' <br>\n')
|
self.htmlFile.write(' <br>\n')
|
||||||
self.htmlFile.write(' <ul class="nav nav-pills">\n')
|
self.htmlFile.write(' <ul class="nav nav-pills">\n')
|
||||||
count = 0
|
count = 0
|
||||||
@@ -2298,10 +2727,6 @@ class SSHConnection():
|
|||||||
if (self.ADBIPAddress != 'none'):
|
if (self.ADBIPAddress != 'none'):
|
||||||
self.GetAllUEDevices(terminate_ue_flag)
|
self.GetAllUEDevices(terminate_ue_flag)
|
||||||
self.GetAllCatMDevices(terminate_ue_flag)
|
self.GetAllCatMDevices(terminate_ue_flag)
|
||||||
else:
|
|
||||||
self.UEDevices.append('doughq9rehg')
|
|
||||||
self.UEDevices.append('dnsgiuahgia')
|
|
||||||
self.UEDevices.append('uehgieng9')
|
|
||||||
self.htmlUEConnected = len(self.UEDevices)
|
self.htmlUEConnected = len(self.UEDevices)
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
@@ -2326,6 +2751,9 @@ class SSHConnection():
|
|||||||
|
|
||||||
def CreateHtmlFooter(self, passStatus):
|
def CreateHtmlFooter(self, passStatus):
|
||||||
if (os.path.isfile('test_results.html')):
|
if (os.path.isfile('test_results.html')):
|
||||||
|
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||||
|
logging.debug('\u001B[1m Creating HTML footer \u001B[0m')
|
||||||
|
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||||
self.RetrieveSystemVersion()
|
self.RetrieveSystemVersion()
|
||||||
self.htmlFile = open('test_results.html', 'a')
|
self.htmlFile = open('test_results.html', 'a')
|
||||||
self.htmlFile.write('</div>\n')
|
self.htmlFile.write('</div>\n')
|
||||||
@@ -2336,21 +2764,21 @@ class SSHConnection():
|
|||||||
self.htmlFile.write(' </tr>\n')
|
self.htmlFile.write(' </tr>\n')
|
||||||
self.htmlFile.write(' <tr>\n')
|
self.htmlFile.write(' <tr>\n')
|
||||||
self.htmlFile.write(' <td>OS Version</td>\n')
|
self.htmlFile.write(' <td>OS Version</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBOsVersion + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.OsVersion + '</span></td>\n')
|
||||||
self.htmlFile.write(' <td>Kernel Version</td>\n')
|
self.htmlFile.write(' <td>Kernel Version</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBKernelVersion + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.KernelVersion + '</span></td>\n')
|
||||||
self.htmlFile.write(' <td>UHD Version</td>\n')
|
self.htmlFile.write(' <td>UHD Version</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBUhdVersion + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.UhdVersion + '</span></td>\n')
|
||||||
self.htmlFile.write(' <td>USRP Board</td>\n')
|
self.htmlFile.write(' <td>USRP Board</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBUsrpBoard + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.UsrpBoard + '</span></td>\n')
|
||||||
self.htmlFile.write(' </tr>\n')
|
self.htmlFile.write(' </tr>\n')
|
||||||
self.htmlFile.write(' <tr>\n')
|
self.htmlFile.write(' <tr>\n')
|
||||||
self.htmlFile.write(' <td>Nb CPUs</td>\n')
|
self.htmlFile.write(' <td>Nb CPUs</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBCpuNb + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuNb + '</span></td>\n')
|
||||||
self.htmlFile.write(' <td>CPU Model Name</td>\n')
|
self.htmlFile.write(' <td>CPU Model Name</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBCpuModel + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuModel + '</span></td>\n')
|
||||||
self.htmlFile.write(' <td>CPU Frequency</td>\n')
|
self.htmlFile.write(' <td>CPU Frequency</td>\n')
|
||||||
self.htmlFile.write(' <td><span class="label label-default">' + self.eNBCpuMHz + '</span></td>\n')
|
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuMHz + '</span></td>\n')
|
||||||
self.htmlFile.write(' <td></td>\n')
|
self.htmlFile.write(' <td></td>\n')
|
||||||
self.htmlFile.write(' <td></td>\n')
|
self.htmlFile.write(' <td></td>\n')
|
||||||
self.htmlFile.write(' </tr>\n')
|
self.htmlFile.write(' </tr>\n')
|
||||||
@@ -2368,7 +2796,7 @@ class SSHConnection():
|
|||||||
self.htmlFile.write('</html>\n')
|
self.htmlFile.write('</html>\n')
|
||||||
self.htmlFile.close()
|
self.htmlFile.close()
|
||||||
|
|
||||||
def CreateHtmlTestRow(self, options, status, processesStatus):
|
def CreateHtmlTestRow(self, options, status, processesStatus, machine='eNB'):
|
||||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||||
self.htmlFile.write(' <tr>\n')
|
self.htmlFile.write(' <tr>\n')
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCase_id + '</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCase_id + '</td>\n')
|
||||||
@@ -2380,15 +2808,17 @@ class SSHConnection():
|
|||||||
if (processesStatus == 0):
|
if (processesStatus == 0):
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
|
||||||
elif (processesStatus == ENB_PROCESS_FAILED):
|
elif (processesStatus == ENB_PROCESS_FAILED):
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process not found</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process not found</td>\n')
|
||||||
elif (processesStatus == ENB_PROCESS_SEG_FAULT):
|
elif (processesStatus == ENB_PROCESS_SEG_FAULT):
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process ended in Segmentation Fault</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Segmentation Fault</td>\n')
|
||||||
elif (processesStatus == ENB_PROCESS_ASSERTION):
|
elif (processesStatus == ENB_PROCESS_ASSERTION) or (processesStatus == UE_PROCESS_ASSERTION):
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process ended in Assertion</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Assertion</td>\n')
|
||||||
elif (processesStatus == ENB_PROCESS_REALTIME_ISSUE):
|
elif (processesStatus == ENB_PROCESS_REALTIME_ISSUE):
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process faced Real Time issue(s)</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process faced Real Time issue(s)</td>\n')
|
||||||
elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE):
|
elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == UE_PROCESS_NOLOGFILE_TO_ANALYZE):
|
||||||
self.htmlFile.write(' <td bgcolor = "orange" >OK</td>\n')
|
self.htmlFile.write(' <td bgcolor = "orange" >OK?</td>\n')
|
||||||
|
elif (processesStatus == UE_PROCESS_COULD_NOT_SYNC):
|
||||||
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - UE could not sync</td>\n')
|
||||||
elif (processesStatus == HSS_PROCESS_FAILED):
|
elif (processesStatus == HSS_PROCESS_FAILED):
|
||||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - HSS process not found</td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - HSS process not found</td>\n')
|
||||||
elif (processesStatus == MME_PROCESS_FAILED):
|
elif (processesStatus == MME_PROCESS_FAILED):
|
||||||
@@ -2493,7 +2923,7 @@ def Usage():
|
|||||||
print('------------------------------------------------------------')
|
print('------------------------------------------------------------')
|
||||||
|
|
||||||
def CheckClassValidity(action,id):
|
def CheckClassValidity(action,id):
|
||||||
if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
|
if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
|
||||||
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
|
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@@ -2520,6 +2950,20 @@ def GetParametersFromXML(action):
|
|||||||
else:
|
else:
|
||||||
SSH.nbMaxUEtoAttach = int(nbMaxUEtoAttach)
|
SSH.nbMaxUEtoAttach = int(nbMaxUEtoAttach)
|
||||||
|
|
||||||
|
if action == 'Build_OAI_UE':
|
||||||
|
SSH.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args')
|
||||||
|
|
||||||
|
if action == 'Initialize_OAI_UE':
|
||||||
|
SSH.Initialize_OAI_UE_args = test.findtext('Initialize_OAI_UE_args')
|
||||||
|
SSH.UE_instance = test.findtext('UE_instance')
|
||||||
|
if (SSH.UE_instance is None):
|
||||||
|
SSH.UE_instance = '0'
|
||||||
|
|
||||||
|
if action == 'Terminate_OAI_UE':
|
||||||
|
SSH.eNB_instance = test.findtext('UE_instance')
|
||||||
|
if (SSH.UE_instance is None):
|
||||||
|
SSH.UE_instance = '0'
|
||||||
|
|
||||||
if action == 'Ping' or action == 'Ping_CatM_module':
|
if action == 'Ping' or action == 'Ping_CatM_module':
|
||||||
SSH.ping_args = test.findtext('ping_args')
|
SSH.ping_args = test.findtext('ping_args')
|
||||||
SSH.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
|
SSH.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
|
||||||
@@ -2562,6 +3006,7 @@ SSH = SSHConnection()
|
|||||||
|
|
||||||
argvs = sys.argv
|
argvs = sys.argv
|
||||||
argc = len(argvs)
|
argc = len(argvs)
|
||||||
|
cwd = os.getcwd()
|
||||||
|
|
||||||
while len(argvs) > 1:
|
while len(argvs) > 1:
|
||||||
myArgv = argvs.pop(1) # 0th is this file's name
|
myArgv = argvs.pop(1) # 0th is this file's name
|
||||||
@@ -2634,6 +3079,18 @@ while len(argvs) > 1:
|
|||||||
matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
||||||
SSH.testXMLfiles.append(matchReg.group(1))
|
SSH.testXMLfiles.append(matchReg.group(1))
|
||||||
SSH.nbTestXMLfiles += 1
|
SSH.nbTestXMLfiles += 1
|
||||||
|
elif re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
SSH.UEIPAddress = matchReg.group(1)
|
||||||
|
elif re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
SSH.UEUserName = matchReg.group(1)
|
||||||
|
elif re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
SSH.UEPassword = matchReg.group(1)
|
||||||
|
elif re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
SSH.UESourceCodePath = matchReg.group(1)
|
||||||
elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
|
||||||
finalStatus = matchReg.group(1)
|
finalStatus = matchReg.group(1)
|
||||||
@@ -2649,7 +3106,13 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
|
|||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
SSH.TerminateeNB()
|
SSH.TerminateeNB()
|
||||||
elif re.match('^TerminateUE$', mode, re.IGNORECASE):
|
elif re.match('^TerminateUE$', mode, re.IGNORECASE):
|
||||||
if SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
|
if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''):
|
||||||
|
Usage()
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
signal.signal(signal.SIGUSR1, receive_signal)
|
||||||
|
SSH.TerminateUE()
|
||||||
|
elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
|
||||||
|
if SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == '':
|
||||||
Usage()
|
Usage()
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
signal.signal(signal.SIGUSR1, receive_signal)
|
signal.signal(signal.SIGUSR1, receive_signal)
|
||||||
@@ -2670,7 +3133,7 @@ elif re.match('^TerminateSPGW$', mode, re.IGNORECASE):
|
|||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
SSH.TerminateSPGW()
|
SSH.TerminateSPGW()
|
||||||
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
|
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
|
||||||
if SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '':
|
if (SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '') and (SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == ''):
|
||||||
Usage()
|
Usage()
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
SSH.LogCollectBuild()
|
SSH.LogCollectBuild()
|
||||||
@@ -2704,36 +3167,53 @@ elif re.match('^LogCollectIperf$', mode, re.IGNORECASE):
|
|||||||
Usage()
|
Usage()
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
SSH.LogCollectIperf()
|
SSH.LogCollectIperf()
|
||||||
|
elif re.match('^LogCollectOAIUE$', mode, re.IGNORECASE):
|
||||||
|
if SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
|
||||||
|
Usage()
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
SSH.LogCollectOAIUE()
|
||||||
elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
||||||
if SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
|
if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''):
|
||||||
Usage()
|
Usage()
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
count = 0
|
count = 0
|
||||||
|
foundCount = 0
|
||||||
while (count < SSH.nbTestXMLfiles):
|
while (count < SSH.nbTestXMLfiles):
|
||||||
|
xml_test_file = cwd + "/" + SSH.testXMLfiles[count]
|
||||||
xml_test_file = sys.path[0] + "/" + SSH.testXMLfiles[count]
|
xml_test_file = sys.path[0] + "/" + SSH.testXMLfiles[count]
|
||||||
xmlTree = ET.parse(xml_test_file)
|
if (os.path.isfile(xml_test_file)):
|
||||||
xmlRoot = xmlTree.getroot()
|
xmlTree = ET.parse(xml_test_file)
|
||||||
SSH.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-' + str(count)))
|
xmlRoot = xmlTree.getroot()
|
||||||
SSH.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-' + str(count)))
|
SSH.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-' + str(count)))
|
||||||
SSH.htmlTabIcons.append(xmlRoot.findtext('htmlTabIcon',default='info-sign'))
|
SSH.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-' + str(count)))
|
||||||
|
SSH.htmlTabIcons.append(xmlRoot.findtext('htmlTabIcon',default='info-sign'))
|
||||||
|
foundCount += 1
|
||||||
count += 1
|
count += 1
|
||||||
|
if foundCount != SSH.nbTestXMLfiles:
|
||||||
|
SSH.nbTestXMLfiles = foundCount
|
||||||
SSH.CreateHtmlHeader()
|
SSH.CreateHtmlHeader()
|
||||||
elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
|
elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
|
||||||
SSH.CreateHtmlFooter(SSH.finalStatus)
|
SSH.CreateHtmlFooter(SSH.finalStatus)
|
||||||
elif re.match('^TesteNB$', mode, re.IGNORECASE):
|
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
|
||||||
if SSH.eNBIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
|
if re.match('^TesteNB$', mode, re.IGNORECASE):
|
||||||
Usage()
|
if SSH.eNBIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
|
||||||
sys.exit('Insufficient Parameter')
|
Usage()
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
|
||||||
|
if (SSH.EPCIPAddress != ''):
|
||||||
|
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/tcp_iperf_stats.awk", "/tmp")
|
||||||
|
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/active_net_interfaces.awk", "/tmp")
|
||||||
|
else:
|
||||||
|
if SSH.UEIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
|
||||||
|
Usage()
|
||||||
|
sys.exit('UE: Insufficient Parameter')
|
||||||
|
|
||||||
if (SSH.EPCIPAddress != 'none'):
|
|
||||||
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, sys.path[0] + "/tcp_iperf_stats.awk", "/tmp")
|
|
||||||
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, sys.path[0] + "/active_net_interfaces.awk", "/tmp")
|
|
||||||
#read test_case_list.xml file
|
#read test_case_list.xml file
|
||||||
# if no parameters for XML file, use default value
|
# if no parameters for XML file, use default value
|
||||||
if (SSH.nbTestXMLfiles != 1):
|
if (SSH.nbTestXMLfiles != 1):
|
||||||
xml_test_file = sys.path[0] + "/test_case_list.xml"
|
xml_test_file = cwd + "/test_case_list.xml"
|
||||||
else:
|
else:
|
||||||
xml_test_file = sys.path[0] + "/" + SSH.testXMLfiles[0]
|
xml_test_file = cwd + "/" + SSH.testXMLfiles[0]
|
||||||
|
|
||||||
xmlTree = ET.parse(xml_test_file)
|
xmlTree = ET.parse(xml_test_file)
|
||||||
xmlRoot = xmlTree.getroot()
|
xmlRoot = xmlTree.getroot()
|
||||||
@@ -2810,6 +3290,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE):
|
|||||||
SSH.AttachUE()
|
SSH.AttachUE()
|
||||||
elif action == 'Detach_UE':
|
elif action == 'Detach_UE':
|
||||||
SSH.DetachUE()
|
SSH.DetachUE()
|
||||||
|
elif action == 'Build_OAI_UE':
|
||||||
|
SSH.BuildOAIUE()
|
||||||
|
elif action == 'Initialize_OAI_UE':
|
||||||
|
SSH.InitializeOAIUE()
|
||||||
|
elif action == 'Terminate_OAI_UE':
|
||||||
|
SSH.TerminateOAIUE()
|
||||||
elif action == 'Initialize_CatM_module':
|
elif action == 'Initialize_CatM_module':
|
||||||
SSH.InitializeCatM()
|
SSH.InitializeCatM()
|
||||||
elif action == 'Terminate_CatM_module':
|
elif action == 'Terminate_CatM_module':
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ case $key in
|
|||||||
ARCHIVES_LOC=cppcheck
|
ARCHIVES_LOC=cppcheck
|
||||||
LOG_PATTERN=cppcheck.xml
|
LOG_PATTERN=cppcheck.xml
|
||||||
NB_PATTERN_FILES=1
|
NB_PATTERN_FILES=1
|
||||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list"
|
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list -I common/utils -j4"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -343,7 +343,7 @@ case $key in
|
|||||||
ARCHIVES_LOC=cppcheck
|
ARCHIVES_LOC=cppcheck
|
||||||
LOG_PATTERN=cppcheck.xml
|
LOG_PATTERN=cppcheck.xml
|
||||||
NB_PATTERN_FILES=1
|
NB_PATTERN_FILES=1
|
||||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list"
|
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 --suppressions-list=ci-scripts/cppcheck_suppressions.list -I common/utils -j4"
|
||||||
NBARGS=$[$NBARGS+256]
|
NBARGS=$[$NBARGS+256]
|
||||||
;;
|
;;
|
||||||
enb-ethernet)
|
enb-ethernet)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>ping (5MHz - 20 sec)</desc>
|
<desc>ping (5MHz - 20 sec)</desc>
|
||||||
<ping_args>-c 20</ping_args>
|
<ping_args>-c 20</ping_args>
|
||||||
<ping_packetloss_threshold>50</ping_packetloss_threshold>
|
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040601">
|
<testCase id="040601">
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc>
|
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||||
<iperf_packetloss_threshold>80</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
<iperf_profile>unbalanced</iperf_profile>
|
<iperf_profile>unbalanced</iperf_profile>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>ping (5MHz - 20 sec)</desc>
|
<desc>ping (5MHz - 20 sec)</desc>
|
||||||
<ping_args>-c 20</ping_args>
|
<ping_args>-c 20</ping_args>
|
||||||
<ping_packetloss_threshold>50</ping_packetloss_threshold>
|
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040602">
|
<testCase id="040602">
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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</htmlTabRef>
|
||||||
|
<htmlTabName>Build</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>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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-10mhz-orange</htmlTabRef>
|
||||||
|
<htmlTabName>Test-10Mhz-Orange</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090102 000001 090109
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090102">
|
||||||
|
<class>Initialize_OAI_UE</class>
|
||||||
|
<desc>Initialize OAI UE -- sniffing Orange frequency</desc>
|
||||||
|
<Initialize_OAI_UE_args>-C 816000000 -r 50 --ue-rxgain 120 --ue-scan-carrier --no-L2-connect</Initialize_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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-10mHz-sfr</htmlTabRef>
|
||||||
|
<htmlTabName>Test-10MHz-SFR</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090104 000001 090109
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090104">
|
||||||
|
<class>Initialize_OAI_UE</class>
|
||||||
|
<desc>Initialize OAI UE -- sniffing SFR frequency</desc>
|
||||||
|
<Initialize_OAI_UE_args>-C 806000000 -r 50 --ue-rxgain 120 --ue-scan-carrier --no-L2-connect</Initialize_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>30</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
+160
-23
@@ -176,7 +176,6 @@ set(CMAKE_C_FLAGS
|
|||||||
set(CMAKE_CXX_FLAGS
|
set(CMAKE_CXX_FLAGS
|
||||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D${MKVER}"
|
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D${MKVER}"
|
||||||
)
|
)
|
||||||
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
@@ -228,7 +227,6 @@ add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_CO
|
|||||||
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
|
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Debug related options
|
# Debug related options
|
||||||
#########################################
|
#########################################
|
||||||
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
|
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
|
||||||
@@ -475,6 +473,50 @@ add_library(X2AP_ENB
|
|||||||
)
|
)
|
||||||
add_dependencies(X2AP_ENB rrc_flag x2_flag)
|
add_dependencies(X2AP_ENB rrc_flag x2_flag)
|
||||||
|
|
||||||
|
# F1AP
|
||||||
|
##############
|
||||||
|
add_list1_option(F1AP_RELEASE R15 "F1AP ASN.1 grammar version" R15)
|
||||||
|
set(F1AP_DIR ${OPENAIR2_DIR}/F1AP)
|
||||||
|
if (${F1AP_RELEASE} STREQUAL "R15")
|
||||||
|
make_version(F1AP_VERSION 15 2 1)
|
||||||
|
set (ASN1RELDIR R15.2.1)
|
||||||
|
endif(${F1AP_RELEASE} STREQUAL "R15")
|
||||||
|
add_definitions(-DF1AP_VERSION=${F1AP_VERSION})
|
||||||
|
set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
|
||||||
|
set(F1AP_ASN_FILES
|
||||||
|
${F1AP_ASN_DIR}/F1AP-CommonDataTypes.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-Constants.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-PDU-Descriptions.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-PDU-Contents.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-IEs.asn
|
||||||
|
${F1AP_ASN_DIR}/F1AP-Containers.asn
|
||||||
|
)
|
||||||
|
|
||||||
|
set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
|
||||||
|
message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}")
|
||||||
|
execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR}
|
||||||
|
COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
|
||||||
|
RESULT_VARIABLE ret
|
||||||
|
OUTPUT_QUIET
|
||||||
|
ERROR_QUIET)
|
||||||
|
|
||||||
|
if (NOT ${ret} STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "asn1c: error")
|
||||||
|
endif (NOT ${ret} STREQUAL 0)
|
||||||
|
|
||||||
|
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
|
||||||
|
add_library(F1AP_LIB
|
||||||
|
${F1AP_ASN_GENERATED_C_FILES}
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
|
||||||
|
include_directories ("${F1AP_DIR}")
|
||||||
|
|
||||||
|
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
|
||||||
|
add_library(F1AP
|
||||||
|
${F1AP_C_FILES}
|
||||||
|
)
|
||||||
|
|
||||||
# Hardware dependant options
|
# Hardware dependant options
|
||||||
###################################
|
###################################
|
||||||
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
|
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
|
||||||
@@ -622,7 +664,12 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w
|
|||||||
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
|
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
|
||||||
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
|
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
|
||||||
|
|
||||||
########################
|
#############################################################################
|
||||||
|
# Flag for UE compilation to avoid issues in common eNB/UE PDCP/RLC functions
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
add_boolean_option(UETARGET False "set UE as target for compiler")
|
||||||
|
|
||||||
# Include order
|
# Include order
|
||||||
##########################
|
##########################
|
||||||
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
|
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
|
||||||
@@ -748,6 +795,8 @@ include_directories("${NFAPI_DIR}/sim_common/inc")
|
|||||||
include_directories("${NFAPI_DIR}/pnf_sim/inc")
|
include_directories("${NFAPI_DIR}/pnf_sim/inc")
|
||||||
include_directories("${OPENAIR1_DIR}")
|
include_directories("${OPENAIR1_DIR}")
|
||||||
include_directories("${OPENAIR2_DIR}")
|
include_directories("${OPENAIR2_DIR}")
|
||||||
|
include_directories("${OPENAIR3_DIR}/NAS/TOOLS")
|
||||||
|
include_directories("${OPENAIR2_DIR}/ENB_APP")
|
||||||
include_directories("${OPENAIR2_DIR}/LAYER2/RLC")
|
include_directories("${OPENAIR2_DIR}/LAYER2/RLC")
|
||||||
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0")
|
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0")
|
||||||
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0")
|
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0")
|
||||||
@@ -770,19 +819,21 @@ include_directories("${OPENAIR3_DIR}/SECU")
|
|||||||
include_directories("${OPENAIR3_DIR}/SCTP")
|
include_directories("${OPENAIR3_DIR}/SCTP")
|
||||||
include_directories("${OPENAIR3_DIR}/S1AP")
|
include_directories("${OPENAIR3_DIR}/S1AP")
|
||||||
include_directories("${OPENAIR2_DIR}/X2AP")
|
include_directories("${OPENAIR2_DIR}/X2AP")
|
||||||
|
include_directories("${OPENAIR2_DIR}/F1AP")
|
||||||
include_directories("${OPENAIR3_DIR}/UDP")
|
include_directories("${OPENAIR3_DIR}/UDP")
|
||||||
include_directories("${OPENAIR3_DIR}/GTPV1-U")
|
include_directories("${OPENAIR3_DIR}/GTPV1-U")
|
||||||
include_directories("${OPENAIR_DIR}/targets/COMMON")
|
include_directories("${OPENAIR_DIR}/targets/COMMON")
|
||||||
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
|
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
|
||||||
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
|
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
|
||||||
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
|
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
|
||||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
|
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
|
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
|
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
|
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
|
||||||
|
include_directories("${OPENAIR2_DIR}/LAYER2/PROTO_AGENT")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/MEM")
|
include_directories("${OPENAIR2_DIR}/UTIL/MEM")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/LISTS")
|
include_directories("${OPENAIR2_DIR}/UTIL/LISTS")
|
||||||
include_directories("${OPENAIR2_DIR}/UTIL/FIFO")
|
include_directories("${OPENAIR2_DIR}/UTIL/FIFO")
|
||||||
@@ -824,7 +875,7 @@ set(FLPT_MSG_FILES
|
|||||||
${FLPT_MSG_DIR}/control_delegation.proto
|
${FLPT_MSG_DIR}/control_delegation.proto
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FLPT_C_DIR ${protobuf_generated_dir}/${FLPTDIR})
|
set(FLPT_C_DIR ${protobuf_generated_dir}/FLPT_${FLPTDIR})
|
||||||
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
|
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
|
||||||
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
|
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
|
||||||
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
|
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
|
||||||
@@ -867,6 +918,7 @@ add_library(FLEXRAN_AGENT
|
|||||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_timer.c
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_timer.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
|
||||||
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY/flexran_agent_phy.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
|
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
|
||||||
@@ -892,6 +944,63 @@ MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES)
|
|||||||
|
|
||||||
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
||||||
|
|
||||||
|
# set the version of protobuf messages, V3 not supported yet
|
||||||
|
add_list1_option(FSPT_VERSION V2 "FSPT MSG protobuf grammar version" V2 V3)
|
||||||
|
|
||||||
|
if (${FSPT_VERSION} STREQUAL "V2")
|
||||||
|
set (FSPTDIR V2)
|
||||||
|
elseif (${FSPT_VERSION} STREQUAL "V3")
|
||||||
|
set (FSPTDIR V3)
|
||||||
|
endif(${FSPT_VERSION} STREQUAL "V2")
|
||||||
|
|
||||||
|
set(FSPT_MSG_DIR ${OPENAIR_DIR}/targets/COMMON/MESSAGES/${FSPTDIR} )
|
||||||
|
set(FSPT_MSG_FILES
|
||||||
|
${FSPT_MSG_DIR}/flexsplit.proto
|
||||||
|
)
|
||||||
|
|
||||||
|
set(FSPT_C_DIR ${protobuf_generated_dir}/FSPT_${FSPTDIR})
|
||||||
|
message("calling protoc_call=${protoc_call} FSPT_C_DIR=${FSPT_C_DIR} FSPT_MSG_DIR=${FSPT_MSG_DIR} FSPT_MSG_FILES=${FSPT_MSG_FILES}")
|
||||||
|
execute_process(COMMAND ${protoc_call} ${FSPT_C_DIR} ${FSPT_MSG_DIR} ${FSPT_MSG_FILES})
|
||||||
|
file(GLOB FSPT_source ${FSPT_C_DIR}/*.c)
|
||||||
|
set(FSPT_OAI_generated
|
||||||
|
${FSPT_C_DIR}/flexsplit.pb-c.c
|
||||||
|
)
|
||||||
|
|
||||||
|
file(GLOB fspt_h ${FSPT_C_DIR}/*.h)
|
||||||
|
set(fspt_h ${fspt_h} )
|
||||||
|
|
||||||
|
add_library(FSPT_MSG
|
||||||
|
${FSPT_OAI_generated}
|
||||||
|
${FSPT_source}
|
||||||
|
)
|
||||||
|
set(FSPT_MSG_LIB FSPT_MSG)
|
||||||
|
message("fspt c dir is : ${FSPT_C_DIR}")
|
||||||
|
include_directories (${FSPT_C_DIR})
|
||||||
|
|
||||||
|
# add_library(ASYNC_IF
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c
|
||||||
|
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/ringbuffer_queue.c
|
||||||
|
# )
|
||||||
|
# set(ASYNC_IF_LIB ASYNC_IF)
|
||||||
|
# include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
|
||||||
|
|
||||||
|
add_library(PROTO_AGENT
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
|
||||||
|
)
|
||||||
|
set(PROTO_AGENT_LIB PROTO_AGENT)
|
||||||
|
include_directories(${OPENAIR2_DIR}/LAYER2/PROTO_AGENT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set(PROTOBUF_LIB "protobuf-c")
|
||||||
|
|
||||||
|
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
||||||
|
|
||||||
add_library(HASHTABLE
|
add_library(HASHTABLE
|
||||||
${OPENAIR_DIR}/common/utils/hashtable/hashtable.c
|
${OPENAIR_DIR}/common/utils/hashtable/hashtable.c
|
||||||
@@ -914,7 +1023,7 @@ set(UTIL_SRC
|
|||||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
|
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
|
||||||
${OPENAIR2_DIR}/UTIL/MATH/oml.c
|
${OPENAIR2_DIR}/UTIL/MATH/oml.c
|
||||||
${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
#${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
||||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
||||||
@@ -1974,11 +2083,39 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag)
|
|||||||
|
|
||||||
target_link_libraries (lte-softmodem
|
target_link_libraries (lte-softmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
|
add_executable(cu_test
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
|
||||||
|
${T_SOURCE}
|
||||||
|
)
|
||||||
|
target_link_libraries(cu_test
|
||||||
|
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
|
||||||
|
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(du_test
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/du_test.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
|
||||||
|
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
|
||||||
|
${T_SOURCE}
|
||||||
|
)
|
||||||
|
target_link_libraries(du_test
|
||||||
|
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
|
||||||
|
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
||||||
@@ -2015,14 +2152,14 @@ add_dependencies(lte-softmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
|||||||
|
|
||||||
target_link_libraries (lte-softmodem-nos1
|
target_link_libraries (lte-softmodem-nos1
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
RRC_LIB F1AP F1AP_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
|
||||||
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
|
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
|
||||||
# lte-uesoftmodem is UE implementation
|
# lte-uesoftmodem is UE implementation
|
||||||
#######################################
|
#######################################
|
||||||
@@ -2055,7 +2192,7 @@ add_executable(lte-uesoftmodem
|
|||||||
add_dependencies(lte-uesoftmodem rrc_flag s1ap_flag x2_flag)
|
add_dependencies(lte-uesoftmodem rrc_flag s1ap_flag x2_flag)
|
||||||
target_link_libraries (lte-uesoftmodem
|
target_link_libraries (lte-uesoftmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP F1AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
@@ -2096,14 +2233,14 @@ add_dependencies(lte-uesoftmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
|||||||
|
|
||||||
target_link_libraries (lte-uesoftmodem-nos1
|
target_link_libraries (lte-uesoftmodem-nos1
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP F1AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
|
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES})
|
target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES})
|
||||||
target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
|
target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
|
||||||
# USIM process
|
# USIM process
|
||||||
#################
|
#################
|
||||||
@@ -2172,7 +2309,7 @@ add_executable(test_epc_generate_scenario
|
|||||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||||
)
|
)
|
||||||
target_link_libraries (test_epc_generate_scenario
|
target_link_libraries (test_epc_generate_scenario
|
||||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(test_epc_play_scenario
|
add_executable(test_epc_play_scenario
|
||||||
@@ -2191,7 +2328,7 @@ add_executable(test_epc_play_scenario
|
|||||||
)
|
)
|
||||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||||
target_link_libraries (test_epc_play_scenario
|
target_link_libraries (test_epc_play_scenario
|
||||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -2225,15 +2362,15 @@ if (${T_TRACER})
|
|||||||
#all "add_executable" definitions (except tests, rb_tool, updatefw)
|
#all "add_executable" definitions (except tests, rb_tool, updatefw)
|
||||||
lte-softmodem lte-softmodem-nos1 lte-uesoftmodem lte-uesoftmodem-nos1
|
lte-softmodem lte-softmodem-nos1 lte-uesoftmodem lte-uesoftmodem-nos1
|
||||||
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
|
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
|
||||||
pdcchsim pucchsim prachsim syncsim ulsim
|
pdcchsim pucchsim prachsim syncsim ulsim cu_test du_test
|
||||||
#all "add_library" definitions
|
#all "add_library" definitions
|
||||||
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB
|
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB F1AP_LIB F1AP
|
||||||
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
|
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
|
||||||
oai_eth_transpro
|
oai_eth_transpro
|
||||||
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
|
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
|
||||||
SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL CN_UTILS
|
SECU_CN SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY L2 default_sched
|
||||||
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU OPENAIR0_LIB PHY_MEX
|
remote_sched RAL CN_UTILS GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS
|
||||||
coding)
|
LFDS7 SIMU OPENAIR0_LIB PHY_MEX coding)
|
||||||
if (TARGET ${i})
|
if (TARGET ${i})
|
||||||
add_dependencies(${i} generate_T)
|
add_dependencies(${i} generate_T)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
+96
-88
@@ -70,6 +70,7 @@ DISABLE_LOG_X="False"
|
|||||||
USRP_REC_PLAY="False"
|
USRP_REC_PLAY="False"
|
||||||
BUILD_ECLIPSE=0
|
BUILD_ECLIPSE=0
|
||||||
UE_NAS_USE_TUN="False"
|
UE_NAS_USE_TUN="False"
|
||||||
|
UETARGET="False"
|
||||||
BASIC_SIMULATOR=0
|
BASIC_SIMULATOR=0
|
||||||
trap handle_ctrl_c INT
|
trap handle_ctrl_c INT
|
||||||
|
|
||||||
@@ -103,6 +104,8 @@ Options
|
|||||||
Specify conf_nvram_path (default \"$conf_nvram_path\")
|
Specify conf_nvram_path (default \"$conf_nvram_path\")
|
||||||
--UE-gen-nvram [output path]
|
--UE-gen-nvram [output path]
|
||||||
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
||||||
|
-a | --agent
|
||||||
|
Enables agent for software-defined control of the eNB
|
||||||
-r | --3gpp-release
|
-r | --3gpp-release
|
||||||
default is Rel14,
|
default is Rel14,
|
||||||
Rel8 limits the implementation to 3GPP Release 8 version
|
Rel8 limits the implementation to 3GPP Release 8 version
|
||||||
@@ -216,6 +219,7 @@ function main() {
|
|||||||
shift;;
|
shift;;
|
||||||
--UE)
|
--UE)
|
||||||
UE=1
|
UE=1
|
||||||
|
UETARGET="True"
|
||||||
echo_info "Will compile UE"
|
echo_info "Will compile UE"
|
||||||
shift;;
|
shift;;
|
||||||
--mu)
|
--mu)
|
||||||
@@ -237,7 +241,7 @@ function main() {
|
|||||||
echo_info "Setting release to: $REL"
|
echo_info "Setting release to: $REL"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-w | --hardware)
|
-w | --hardware)
|
||||||
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
||||||
case "$2" in
|
case "$2" in
|
||||||
"EXMIMO")
|
"EXMIMO")
|
||||||
HW="EXMIMO"
|
HW="EXMIMO"
|
||||||
@@ -251,7 +255,7 @@ function main() {
|
|||||||
*)
|
*)
|
||||||
echo_fatal "Unknown HW type $HW: exit..."
|
echo_fatal "Unknown HW type $HW: exit..."
|
||||||
esac
|
esac
|
||||||
echo_info "Setting hardware to: $HW"
|
echo_info "Setting hardware to: $HW"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-t | --transport_protocol)
|
-t | --transport_protocol)
|
||||||
TP="$2" #"${i#*=}"
|
TP="$2" #"${i#*=}"
|
||||||
@@ -389,35 +393,35 @@ function main() {
|
|||||||
|
|
||||||
CMAKE_CMD="$CMAKE_CMD .."
|
CMAKE_CMD="$CMAKE_CMD .."
|
||||||
echo_info "CMAKE_CMD=$CMAKE_CMD"
|
echo_info "CMAKE_CMD=$CMAKE_CMD"
|
||||||
#########################################################
|
#########################################################
|
||||||
# check validity of HW and TP parameters for eNB
|
# check validity of HW and TP parameters for eNB
|
||||||
#########################################################
|
#########################################################
|
||||||
# to be discussed
|
# to be discussed
|
||||||
|
|
||||||
if [ "$eNB" = "1" ] ; then
|
if [ "$eNB" = "1" ] ; then
|
||||||
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
|
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
|
||||||
echo_fatal "Define a local radio head (e.g. -w EXMIMO) or a transport protocol (e.g. -t ETHERNET) to communicate with a remote radio head!"
|
echo_fatal "Define a local radio head (e.g. -w EXMIMO) or a transport protocol (e.g. -t ETHERNET) to communicate with a remote radio head!"
|
||||||
fi
|
fi
|
||||||
if [ "$HW" = "None" ] ; then
|
if [ "$HW" = "None" ] ; then
|
||||||
echo_info "No radio head has been selected (HW set to $HW)"
|
echo_info "No radio head has been selected (HW set to $HW)"
|
||||||
fi
|
fi
|
||||||
if [ "$TP" = "None" ] ; then
|
if [ "$TP" = "None" ] ; then
|
||||||
echo_info "No transport protocol has been selected (TP set to $TP)"
|
echo_info "No transport protocol has been selected (TP set to $TP)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_info "RF HW set to $HW"
|
echo_info "RF HW set to $HW"
|
||||||
# If the user doesn't specify the Linux scheduler to use, we set a value
|
# If the user doesn't specify the Linux scheduler to use, we set a value
|
||||||
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
|
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
|
||||||
case "$HW" in
|
case "$HW" in
|
||||||
"EXMIMO")
|
"EXMIMO")
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="True"
|
DEADLINE_SCHEDULER_FLAG_USER="True"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
#Disable CPU Affinity for deadline scheduler
|
#Disable CPU Affinity for deadline scheduler
|
||||||
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "True" ] ; then
|
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "True" ] ; then
|
||||||
CPU_AFFINITY_FLAG_USER="False"
|
CPU_AFFINITY_FLAG_USER="False"
|
||||||
@@ -497,18 +501,18 @@ function main() {
|
|||||||
|
|
||||||
echo_info "3. building the compilation directives ..."
|
echo_info "3. building the compilation directives ..."
|
||||||
|
|
||||||
DIR=$OPENAIR_DIR/cmake_targets
|
DIR=$OPENAIR_DIR/cmake_targets
|
||||||
|
|
||||||
if [ "$T_TRACER" = "False" ] ; then
|
if [ "$T_TRACER" = "False" ] ; then
|
||||||
noLOGDirsuffix="_noLOG"
|
noLOGDirsuffix="_noLOG"
|
||||||
fi
|
fi
|
||||||
if [ "$NOS1" = "1" ] ; then
|
if [ "$NOS1" = "1" ] ; then
|
||||||
noS1Dir="_noS1"
|
noS1Dir="_noS1"
|
||||||
bin_suffix="-nos1"
|
bin_suffix="-nos1"
|
||||||
else
|
else
|
||||||
lte_build_dir=lte_build_oai
|
lte_build_dir=lte_build_oai
|
||||||
bin_suffix=""
|
bin_suffix=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lte_build_dir="lte${noS1Dir}_build_oai${noLOGDirsuffix}"
|
lte_build_dir="lte${noS1Dir}_build_oai${noLOGDirsuffix}"
|
||||||
# configuration module libraries, one currently available, using libconfig
|
# configuration module libraries, one currently available, using libconfig
|
||||||
@@ -545,6 +549,9 @@ function main() {
|
|||||||
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
|
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
|
||||||
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
|
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
|
||||||
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
||||||
|
if [ "$UE" = 1 ] ; then
|
||||||
|
echo "set (UETARGET $UETARGET )" >> $cmake_file
|
||||||
|
fi
|
||||||
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
|
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
|
||||||
echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
|
echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
|
||||||
echo "set (LINUX True )" >> $cmake_file
|
echo "set (LINUX True )" >> $cmake_file
|
||||||
@@ -707,80 +714,80 @@ function main() {
|
|||||||
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
|
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Telnet server compilation
|
# Telnet server compilation
|
||||||
#####################
|
#####################
|
||||||
if [ "$BUILD_TELNETSRV" = "1" ] ; then
|
if [ "$BUILD_TELNETSRV" = "1" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir telnetsrv \
|
$lte_build_dir telnetsrv \
|
||||||
libtelnetsrv.so $dbin/libtelnetsrv.so
|
libtelnetsrv.so $dbin/libtelnetsrv.so
|
||||||
|
|
||||||
fi
|
fi
|
||||||
# msc library compilation
|
# msc library compilation
|
||||||
#####################
|
#####################
|
||||||
if [ "$MSC_GEN" = "1" ] ; then
|
if [ "$MSC_GEN" = "1" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir msc \
|
$lte_build_dir msc \
|
||||||
libmsc.so $dbin/libmsc.so
|
libmsc.so $dbin/libmsc.so
|
||||||
|
|
||||||
fi
|
fi
|
||||||
# build RF device and transport protocol libraries
|
# build RF device and transport protocol libraries
|
||||||
#####################################
|
#####################################
|
||||||
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
||||||
|
|
||||||
# build RF device libraries
|
# build RF device libraries
|
||||||
if [ "$HW" != "None" ] ; then
|
if [ "$HW" != "None" ] ; then
|
||||||
rm -f liboai_device.so
|
rm -f liboai_device.so
|
||||||
rm -f $dbin/liboai_device.so
|
rm -f $dbin/liboai_device.so
|
||||||
|
|
||||||
# link liboai_device.so with the selected RF device library
|
# link liboai_device.so with the selected RF device library
|
||||||
if [ "$HW" == "EXMIMO" ] ; then
|
if [ "$HW" == "EXMIMO" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir oai_exmimodevif \
|
$lte_build_dir oai_exmimodevif \
|
||||||
liboai_exmimodevif.so $dbin/liboai_exmimodevif.so.$REL
|
liboai_exmimodevif.so $dbin/liboai_exmimodevif.so.$REL
|
||||||
|
|
||||||
ln -sf liboai_exmimodevif.so liboai_device.so
|
ln -sf liboai_exmimodevif.so liboai_device.so
|
||||||
ln -sf $dbin/liboai_exmimodevif.so.$REL $dbin/liboai_device.so
|
ln -sf $dbin/liboai_exmimodevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to EXMIMO device library"
|
echo_info "liboai_device.so is linked to EXMIMO device library"
|
||||||
elif [ "$HW" == "OAI_USRP" ] ; then
|
elif [ "$HW" == "OAI_USRP" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir oai_usrpdevif \
|
$lte_build_dir oai_usrpdevif \
|
||||||
liboai_usrpdevif.so $dbin/liboai_usrpdevif.so.$REL
|
liboai_usrpdevif.so $dbin/liboai_usrpdevif.so.$REL
|
||||||
|
|
||||||
ln -sf liboai_usrpdevif.so liboai_device.so
|
ln -sf liboai_usrpdevif.so liboai_device.so
|
||||||
ln -sf $dbin/liboai_usrpdevif.so.$REL $dbin/liboai_device.so
|
ln -sf $dbin/liboai_usrpdevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to USRP device library"
|
echo_info "liboai_device.so is linked to USRP device library"
|
||||||
elif [ "$HW" == "OAI_BLADERF" ] ; then
|
elif [ "$HW" == "OAI_BLADERF" ] ; then
|
||||||
if [ -f "/usr/include/libbladeRF.h" ] ; then
|
if [ -f "/usr/include/libbladeRF.h" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir oai_bladerfdevif \
|
$lte_build_dir oai_bladerfdevif \
|
||||||
liboai_bladerfdevif.so $dbin/liboai_bladerfdevif.so.$REL
|
liboai_bladerfdevif.so $dbin/liboai_bladerfdevif.so.$REL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -sf liboai_bladerfdevif.so liboai_device.so
|
ln -sf liboai_bladerfdevif.so liboai_device.so
|
||||||
ln -sf $dbin/liboai_bladerfdevif.so.$REL $dbin/liboai_device.so
|
ln -sf $dbin/liboai_bladerfdevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to BLADERF device library"
|
echo_info "liboai_device.so is linked to BLADERF device library"
|
||||||
elif [ "$HW" == "OAI_LMSSDR" ] ; then
|
elif [ "$HW" == "OAI_LMSSDR" ] ; then
|
||||||
# if [ -f "/usr/include/libbladeRF.h" ] ; then
|
# if [ -f "/usr/include/libbladeRF.h" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir oai_lmssdrdevif \
|
$lte_build_dir oai_lmssdrdevif \
|
||||||
liboai_lmssdrdevif.so $dbin/liboai_lmssdrdevif.so.$REL
|
liboai_lmssdrdevif.so $dbin/liboai_lmssdrdevif.so.$REL
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
ln -sf liboai_lmssdrdevif.so liboai_device.so
|
ln -sf liboai_lmssdrdevif.so liboai_device.so
|
||||||
ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
|
ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to LMSSDR device library"
|
echo_info "liboai_device.so is linked to LMSSDR device library"
|
||||||
elif [ "$HW" == "OAI_IRIS" ] ; then
|
elif [ "$HW" == "OAI_IRIS" ] ; then
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir oai_irisdevif \
|
$lte_build_dir oai_irisdevif \
|
||||||
liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
|
liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
|
||||||
|
|
||||||
ln -s liboai_irisdevif.so liboai_device.so
|
ln -s liboai_irisdevif.so liboai_device.so
|
||||||
ln -s $dbin/liboai_irisdevif.so.$REL $dbin/liboai_device.so
|
ln -s $dbin/liboai_irisdevif.so.$REL $dbin/liboai_device.so
|
||||||
echo_info "liboai_device.so is linked to IRIS device library"
|
echo_info "liboai_device.so is linked to IRIS device library"
|
||||||
else
|
else
|
||||||
echo_info "liboai_device.so is not linked to any device library"
|
echo_info "liboai_device.so is not linked to any device library"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build simulators devices
|
# build simulators devices
|
||||||
echo_info "Compiling rfsimulator"
|
echo_info "Compiling rfsimulator"
|
||||||
@@ -793,15 +800,15 @@ function main() {
|
|||||||
libtcp_bridge_oai.so $dbin/libtcp_bridge_oai.so.$REL
|
libtcp_bridge_oai.so $dbin/libtcp_bridge_oai.so.$REL
|
||||||
# build transport protocol libraries (currently only ETHERNET is available)
|
# build transport protocol libraries (currently only ETHERNET is available)
|
||||||
|
|
||||||
rm -f liboai_transpro.so
|
rm -f liboai_transpro.so
|
||||||
rm -f $dbin/liboai_transpro.so
|
rm -f $dbin/liboai_transpro.so
|
||||||
compilations \
|
compilations \
|
||||||
$lte_build_dir oai_eth_transpro \
|
$lte_build_dir oai_eth_transpro \
|
||||||
liboai_eth_transpro.so $dbin/liboai_eth_transpro.so.$REL
|
liboai_eth_transpro.so $dbin/liboai_eth_transpro.so.$REL
|
||||||
ln -sf liboai_eth_transpro.so liboai_transpro.so
|
ln -sf liboai_eth_transpro.so liboai_transpro.so
|
||||||
ln -sf $dbin/liboai_eth_transpro.so.$REL $dbin/liboai_transpro.so
|
ln -sf $dbin/liboai_eth_transpro.so.$REL $dbin/liboai_transpro.so
|
||||||
echo_info "liboai_transpro.so is linked to ETHERNET transport"
|
echo_info "liboai_transpro.so is linked to ETHERNET transport"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$RFSIMULATOR" == "true" -o "$HW" == "OAI_SIMU" ] ; then
|
if [ "$RFSIMULATOR" == "true" -o "$HW" == "OAI_SIMU" ] ; then
|
||||||
echo_info "Compiling rfsimulator"
|
echo_info "Compiling rfsimulator"
|
||||||
@@ -938,6 +945,7 @@ function main() {
|
|||||||
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
||||||
echo "set (LINUX True )" >> $cmake_file
|
echo "set (LINUX True )" >> $cmake_file
|
||||||
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
|
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
|
||||||
|
echo "set (UETARGET True )" >> $cmake_file
|
||||||
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
|
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
|
||||||
# echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
|
# echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
|
||||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
|
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
|
||||||
|
|||||||
@@ -639,8 +639,6 @@ check_install_oai_software() {
|
|||||||
libidn2-0-dev \
|
libidn2-0-dev \
|
||||||
libidn11-dev \
|
libidn11-dev \
|
||||||
libmysqlclient-dev \
|
libmysqlclient-dev \
|
||||||
liboctave-dev \
|
|
||||||
libpgm-dev \
|
|
||||||
libpython2.7-dev \
|
libpython2.7-dev \
|
||||||
libsctp1 \
|
libsctp1 \
|
||||||
libsctp-dev \
|
libsctp-dev \
|
||||||
@@ -651,7 +649,6 @@ check_install_oai_software() {
|
|||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt1-dev \
|
libxslt1-dev \
|
||||||
mscgen \
|
mscgen \
|
||||||
octave \
|
|
||||||
octave-signal \
|
octave-signal \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
@@ -663,7 +660,8 @@ check_install_oai_software() {
|
|||||||
pydb \
|
pydb \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
wget \
|
wget \
|
||||||
libxpm-dev
|
libxpm-dev \
|
||||||
|
libboost-all-dev
|
||||||
|
|
||||||
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
||||||
|
|
||||||
@@ -711,8 +709,6 @@ check_install_oai_software() {
|
|||||||
libidn2-devel \
|
libidn2-devel \
|
||||||
libidn-devel \
|
libidn-devel \
|
||||||
mariadb-devel \
|
mariadb-devel \
|
||||||
octave-devel \
|
|
||||||
openpgm-devel \
|
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
lksctp-tools-devel \
|
lksctp-tools-devel \
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
@@ -722,8 +718,6 @@ check_install_oai_software() {
|
|||||||
libxml2 \
|
libxml2 \
|
||||||
libxml2-devel \
|
libxml2-devel \
|
||||||
libxslt-devel \
|
libxslt-devel \
|
||||||
octave \
|
|
||||||
octave-signal \
|
|
||||||
openssh-clients \
|
openssh-clients \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
openssl \
|
openssl \
|
||||||
@@ -746,7 +740,7 @@ check_install_oai_software() {
|
|||||||
libyaml-devel
|
libyaml-devel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_asn1c_from_source
|
install_asn1c_from_source $1
|
||||||
$SUDO rm -fr /opt/ssh
|
$SUDO rm -fr /opt/ssh
|
||||||
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh
|
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ reset_color="$(tput sgr0)"
|
|||||||
function error()
|
function error()
|
||||||
{
|
{
|
||||||
echo -e "$red_color"ERROR: "$@""$reset_color"
|
echo -e "$red_color"ERROR: "$@""$reset_color"
|
||||||
exit 1
|
# exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_sha1()
|
function check_sha1()
|
||||||
@@ -56,11 +56,11 @@ function patch_file()
|
|||||||
|
|
||||||
echo -e "$green_color""patch file $file with $OPENAIR_DIR/cmake_targets/tools/$patch""$reset_color"
|
echo -e "$green_color""patch file $file with $OPENAIR_DIR/cmake_targets/tools/$patch""$reset_color"
|
||||||
|
|
||||||
patch "$file" "$OPENAIR_DIR/cmake_targets/tools/$patch"
|
# patch "$file" "$OPENAIR_DIR/cmake_targets/tools/$patch"
|
||||||
if [ $? -ne 0 ]
|
# if [ $? -ne 0 ]
|
||||||
then
|
# then
|
||||||
error "patching of $file with $OPENAIR_DIR/cmake_targets/tools/$patch failed"
|
# error "patching of $file with $OPENAIR_DIR/cmake_targets/tools/$patch failed"
|
||||||
fi
|
# fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function apply_patches()
|
function apply_patches()
|
||||||
@@ -140,6 +140,22 @@ function patch_s1ap()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function patch_f1ap()
|
||||||
|
{
|
||||||
|
local directory="$1"
|
||||||
|
local version="$2"
|
||||||
|
|
||||||
|
case "$version" in
|
||||||
|
R15 )
|
||||||
|
#nothing to do anymore (fixes went to asn1c)
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
error unknwon/unhandled F1AP version \'"$version"\'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
if [ $# -ne 3 ]
|
if [ $# -ne 3 ]
|
||||||
@@ -167,6 +183,9 @@ function main()
|
|||||||
S1AP )
|
S1AP )
|
||||||
patch_s1ap "$directory" "$version"
|
patch_s1ap "$directory" "$version"
|
||||||
;;
|
;;
|
||||||
|
F1AP )
|
||||||
|
patch_f1ap "$directory" "$version"
|
||||||
|
;;
|
||||||
* )
|
* )
|
||||||
error unknown module "$module"
|
error unknown module "$module"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,23 +2,29 @@
|
|||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
mkdir -p $1
|
PROTOCOL_DIR=$1
|
||||||
cd $1
|
mkdir -p ${PROTOCOL_DIR}
|
||||||
|
cd ${PROTOCOL_DIR}
|
||||||
|
|
||||||
|
# Because use $* also include directory, so we need shift
|
||||||
shift
|
shift
|
||||||
|
|
||||||
#if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC
|
# There are three types parameter for asn1c
|
||||||
#(there may be a better way...)
|
# One is for RRC
|
||||||
if [ $# -eq 1 ]; then
|
# and one is for F1AP
|
||||||
|
# another is for other protocols
|
||||||
|
|
||||||
#asn1c does not work well with extension groups, we need the following fix:
|
if echo ${PROTOCOL_DIR} | grep -q "RRC"; then
|
||||||
# replace [[ by '<name> SEQUENCE {'
|
|
||||||
# and ]] by '} OPTIONAL'
|
|
||||||
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
|
|
||||||
#following another [[ ]]
|
|
||||||
#
|
|
||||||
#this is what the following C program does
|
|
||||||
|
|
||||||
echo generate asnfix.c
|
#asn1c does not work well with extension groups, we need the following fix:
|
||||||
|
# replace [[ by '<name> SEQUENCE {'
|
||||||
|
# and ]] by '} OPTIONAL'
|
||||||
|
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
|
||||||
|
#following another [[ ]]
|
||||||
|
#
|
||||||
|
#this is what the following C program does
|
||||||
|
|
||||||
|
echo generate asnfix.c
|
||||||
|
|
||||||
cat << EOF > asnfix.c
|
cat << EOF > asnfix.c
|
||||||
/* transforms:
|
/* transforms:
|
||||||
@@ -85,29 +91,33 @@ int main(void)
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo compile asnfix.c
|
echo compile asnfix.c
|
||||||
|
|
||||||
gcc -Wall -o asnfix asnfix.c
|
gcc -Wall -o asnfix asnfix.c
|
||||||
|
|
||||||
echo run asnfix on $1
|
echo run asnfix on $1
|
||||||
|
|
||||||
./asnfix < $1 > fixed_grammar.asn
|
./asnfix < $1 > fixed_grammar.asn
|
||||||
|
|
||||||
rm -f asnfix asnfix.c
|
rm -f asnfix asnfix.c
|
||||||
|
|
||||||
echo done with asnfix
|
echo done with asnfix
|
||||||
|
|
||||||
echo running asn1c
|
echo running asn1c
|
||||||
|
|
||||||
asn1c -gen-PER -fcompound-names fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||||
|
|
||||||
rm -f fixed_grammar.asn
|
rm -f fixed_grammar.asn
|
||||||
|
|
||||||
echo asn1c done
|
echo asn1c done
|
||||||
|
|
||||||
|
elif echo ${PROTOCOL_DIR} | grep -q "F1AP"; then
|
||||||
|
|
||||||
|
asn1c -gen-PER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
asn1c -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
asn1c -gen-PER -fcompound-names -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file common/ngran_types.h
|
||||||
|
* \brief Definitions for NGRAN node types
|
||||||
|
* \author R. Knopp
|
||||||
|
* \date 2018
|
||||||
|
* \version 0.1
|
||||||
|
* \company Eurecom
|
||||||
|
* \email: knopp@eurecom.fr
|
||||||
|
* \note
|
||||||
|
* \warning
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __NGRAN_TYPES_H__
|
||||||
|
#define __NGRAN_TYPES_H__
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ngran_eNB = 0,
|
||||||
|
ngran_ng_eNB = 1,
|
||||||
|
ngran_gNB = 2,
|
||||||
|
ngran_eNB_CU = 3,
|
||||||
|
ngran_ng_eNB_CU = 4,
|
||||||
|
ngran_gNB_CU = 5,
|
||||||
|
ngran_eNB_DU = 6,
|
||||||
|
ngran_gNB_DU = 7
|
||||||
|
} ngran_node_t;
|
||||||
|
|
||||||
|
#define NODE_IS_MONOLITHIC(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB || (nOdE_TyPe) == ngran_ng_eNB || (nOdE_TyPe) == ngran_gNB)
|
||||||
|
#define NODE_IS_CU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_CU || (nOdE_TyPe) == ngran_ng_eNB_CU || (nOdE_TyPe) == ngran_gNB_CU)
|
||||||
|
#define NODE_IS_DU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_DU || (nOdE_TyPe) == ngran_gNB_DU)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -39,6 +39,8 @@
|
|||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
#include "PHY/impl_defs_top.h"
|
#include "PHY/impl_defs_top.h"
|
||||||
#include "PHY/impl_defs_lte.h"
|
#include "PHY/impl_defs_lte.h"
|
||||||
|
|
||||||
|
#include "ENB_APP/enb_config.h"
|
||||||
#include "RRC/LTE/rrc_defs.h"
|
#include "RRC/LTE/rrc_defs.h"
|
||||||
#include "flexran_agent_defs.h"
|
#include "flexran_agent_defs.h"
|
||||||
|
|
||||||
@@ -49,7 +51,11 @@
|
|||||||
#include "gtpv1u_eNB_defs.h"
|
#include "gtpv1u_eNB_defs.h"
|
||||||
|
|
||||||
#include "PHY/defs_L1_NB_IoT.h"
|
#include "PHY/defs_L1_NB_IoT.h"
|
||||||
|
|
||||||
#include "RRC/LTE/defs_NB_IoT.h"
|
#include "RRC/LTE/defs_NB_IoT.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/// RAN context config file name
|
/// RAN context config file name
|
||||||
char *config_file_name;
|
char *config_file_name;
|
||||||
|
|||||||
@@ -393,15 +393,18 @@ int logInit (void) {
|
|||||||
register_log_component("mRAL","",RAL_UE);
|
register_log_component("mRAL","",RAL_UE);
|
||||||
register_log_component("ENB_APP","log",ENB_APP);
|
register_log_component("ENB_APP","log",ENB_APP);
|
||||||
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
||||||
|
register_log_component("PROTO_AGENT","log",PROTO_AGENT);
|
||||||
register_log_component("TMR","",TMR);
|
register_log_component("TMR","",TMR);
|
||||||
register_log_component("USIM","txt",USIM);
|
register_log_component("USIM","txt",USIM);
|
||||||
register_log_component("SIM","txt",SIM);
|
register_log_component("SIM","txt",SIM);
|
||||||
/* following log component are used for the localization*/
|
/* following log component are used for the localization*/
|
||||||
|
/* following log component are used for the localization*/
|
||||||
register_log_component("LOCALIZE","log",LOCALIZE);
|
register_log_component("LOCALIZE","log",LOCALIZE);
|
||||||
register_log_component("NAS","log",NAS);
|
register_log_component("NAS","log",NAS);
|
||||||
register_log_component("UDP","",UDP_);
|
register_log_component("UDP","",UDP_);
|
||||||
register_log_component("GTPV1U","",GTPU);
|
register_log_component("GTPV1U","",GTPU);
|
||||||
register_log_component("S1AP","",S1AP);
|
register_log_component("S1AP","",S1AP);
|
||||||
|
register_log_component("F1AP","",F1AP);
|
||||||
register_log_component("X2AP","",X2AP);
|
register_log_component("X2AP","",X2AP);
|
||||||
register_log_component("SCTP","",SCTP);
|
register_log_component("SCTP","",SCTP);
|
||||||
register_log_component("X2AP","",X2AP);
|
register_log_component("X2AP","",X2AP);
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ typedef enum {
|
|||||||
GTPU,
|
GTPU,
|
||||||
SPGW,
|
SPGW,
|
||||||
S1AP,
|
S1AP,
|
||||||
|
F1AP,
|
||||||
SCTP,
|
SCTP,
|
||||||
HW,
|
HW,
|
||||||
OSA,
|
OSA,
|
||||||
@@ -214,6 +215,8 @@ typedef enum {
|
|||||||
TMR,
|
TMR,
|
||||||
USIM,
|
USIM,
|
||||||
LOCALIZE,
|
LOCALIZE,
|
||||||
|
PROTO_AGENT,
|
||||||
|
F1U,
|
||||||
X2AP,
|
X2AP,
|
||||||
LOADER,
|
LOADER,
|
||||||
ASN,
|
ASN,
|
||||||
|
|||||||
@@ -629,7 +629,7 @@ ID = LEGACY_OCM_DEBUG
|
|||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
ID = LEGACY_OCM_TRACE
|
ID = LEGACY_OCM_TRACE
|
||||||
DESC = OCM legacy logs - trace level
|
DESC = OCM legacy logs - trace level
|
||||||
GROUP = ALL:LEGACY_OCM:LEGACY_GROUP_TRACE:LEGACY
|
OGROUP = ALL:LEGACY_OCM:LEGACY_GROUP_TRACE:LEGACY
|
||||||
FORMAT = string,log
|
FORMAT = string,log
|
||||||
|
|
||||||
ID = LEGACY_OIP_INFO
|
ID = LEGACY_OIP_INFO
|
||||||
@@ -888,6 +888,62 @@ ID = LEGACY_componentP_TRACE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ID = LEGACY_PROTO_AGENT_DEBUG
|
||||||
|
DESC = PROTO AGENT DEBUG LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_PROTO_AGENT_INFO
|
||||||
|
DESC = PROTO AGENT INFO LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_PROTO_AGENT_WARNING
|
||||||
|
DESC = PROTO AGENT WARNING LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_WARNING:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_PROTO_AGENT_ERROR
|
||||||
|
DESC = PROTO AGENT ERROR LEVEL
|
||||||
|
GROUP = ALL:LEGACY_PROTO:LEGACY_GROUP_ERROR:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1U_DEBUG
|
||||||
|
DESC = F1U DEBUG LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1U:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1U_INFO
|
||||||
|
DESC = F1U INFO LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1U:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1U_ERROR
|
||||||
|
DESC = F1U ERROR LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1U:LEGACY_GROUP_ERROR:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
|
ID = LEGACY_F1AP_TRACE
|
||||||
|
DESC = F1AP TRACE LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_TRACE:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_DEBUG
|
||||||
|
DESC = F1AP DEBUG LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_DEBUG:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_INFO
|
||||||
|
DESC = F1AP INFO LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_INFO:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_WARNING
|
||||||
|
DESC = F1AP WARNING LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_WARNING:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
ID = LEGACY_F1AP_ERROR
|
||||||
|
DESC = F1AP ERROR LEVEL
|
||||||
|
GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_ERROR:LEGACY
|
||||||
|
FORMAT = string,log
|
||||||
|
|
||||||
#################
|
#################
|
||||||
#### UE LOGS ####
|
#### UE LOGS ####
|
||||||
#################
|
#################
|
||||||
|
|||||||
@@ -35,13 +35,11 @@
|
|||||||
|
|
||||||
void output_log_mem(void);
|
void output_log_mem(void);
|
||||||
#define _Assert_Exit_ \
|
#define _Assert_Exit_ \
|
||||||
{ \
|
|
||||||
fprintf(stderr, "\nExiting execution\n"); \
|
fprintf(stderr, "\nExiting execution\n"); \
|
||||||
display_backtrace(); \
|
display_backtrace(); \
|
||||||
fflush(stdout); \
|
fflush(stdout); \
|
||||||
fflush(stderr); \
|
fflush(stderr); \
|
||||||
exit(EXIT_FAILURE); \
|
exit(EXIT_FAILURE); \
|
||||||
}
|
|
||||||
|
|
||||||
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
||||||
do { \
|
do { \
|
||||||
|
|||||||
+15
-2
@@ -150,7 +150,7 @@ int msc_init(const msc_env_t envP, const int max_threadsP)
|
|||||||
pointer_p = malloc(MSC_MAX_MESSAGE_LENGTH);
|
pointer_p = malloc(MSC_MAX_MESSAGE_LENGTH);
|
||||||
AssertFatal (pointer_p, "malloc failed!\n");
|
AssertFatal (pointer_p, "malloc failed!\n");
|
||||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, pointer_p );
|
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, pointer_p );
|
||||||
AssertFatal (rv, "lfds611_stack_guaranteed_push failed for item %u\n", i);
|
AssertFatal (rv, "lfds611_stack_guaranteed_push failed for item %d\n", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = MIN_MSC_PROTOS; i < MAX_MSC_PROTOS; i++) {
|
for (i = MIN_MSC_PROTOS; i < MAX_MSC_PROTOS; i++) {
|
||||||
@@ -476,7 +476,20 @@ int msc_init(const msc_env_t envP, const int max_threadsP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case MSC_F1AP_CU:
|
||||||
|
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "F1AP_CU");
|
||||||
|
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||||
|
//if ((envP == MSC_E_UTRAN) || (envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||||
|
msc_log_declare_proto(i);
|
||||||
|
//}
|
||||||
|
break;
|
||||||
|
case MSC_F1AP_DU:
|
||||||
|
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "F1AP_DU");
|
||||||
|
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||||
|
//if ((envP == MSC_E_UTRAN) || (envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||||
|
msc_log_declare_proto(i);
|
||||||
|
//}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "UNKNOWN");
|
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "UNKNOWN");
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ typedef enum {
|
|||||||
MSC_S11_MME,
|
MSC_S11_MME,
|
||||||
MSC_S6A_MME,
|
MSC_S6A_MME,
|
||||||
MSC_HSS,
|
MSC_HSS,
|
||||||
|
MSC_F1AP_CU,
|
||||||
|
MSC_F1AP_DU,
|
||||||
MSC_X2AP_SRC_ENB,
|
MSC_X2AP_SRC_ENB,
|
||||||
MSC_X2AP_TARGET_ENB,
|
MSC_X2AP_TARGET_ENB,
|
||||||
MAX_MSC_PROTOS,
|
MAX_MSC_PROTOS,
|
||||||
|
|||||||
@@ -13,3 +13,4 @@
|
|||||||
#include "openair2/COMMON/udp_messages_def.h"
|
#include "openair2/COMMON/udp_messages_def.h"
|
||||||
#include "openair2/COMMON/gtpv1_u_messages_def.h"
|
#include "openair2/COMMON/gtpv1_u_messages_def.h"
|
||||||
#include "openair2/COMMON/flexran_messages_def.h"
|
#include "openair2/COMMON/flexran_messages_def.h"
|
||||||
|
#include "openair2/COMMON/f1ap_messages_def.h"
|
||||||
|
|||||||
@@ -300,6 +300,8 @@ typedef struct {
|
|||||||
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\
|
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\
|
||||||
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\
|
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\
|
||||||
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)\
|
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)\
|
||||||
|
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||||
|
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||||
TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL)
|
TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL)
|
||||||
|
|
||||||
#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc },
|
#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc },
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
all: measurement_display thread-pool-test
|
||||||
|
|
||||||
|
measurement_display: measurement_display.c thread-pool.h
|
||||||
|
gcc measurement_display.c -I /data/openairinterface5g.nr/common/utils/ -I. /data/openairinterface5g.nr/common/utils/backtrace.c -lpthread -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o measurement_display
|
||||||
|
|
||||||
|
thread-pool-test: thread-pool.c thread-pool.h
|
||||||
|
gcc -g thread-pool.c -I /data/openairinterface5g.nr/common/utils/ -I. /data/openairinterface5g.nr/common/utils/backtrace.c -lpthread -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o thread-pool-test
|
||||||
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
Author: Laurent THOMAS, Open Cells
|
||||||
|
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __USE_GNU
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <sched.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include "thread-pool.h"
|
||||||
|
|
||||||
|
#define SEP "\t"
|
||||||
|
|
||||||
|
uint64_t cpuCyclesMicroSec;
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
if(argc != 2) {
|
||||||
|
printf("Need one paramter: the trace Linux pipe (fifo)");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mkfifo(argv[1],0666);
|
||||||
|
int fd=open(argv[1], O_RDONLY);
|
||||||
|
|
||||||
|
if ( fd == -1 ) {
|
||||||
|
perror("open read mode trace file:");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t deb=rdtsc();
|
||||||
|
usleep(100000);
|
||||||
|
cpuCyclesMicroSec=(rdtsc()-deb)/100000;
|
||||||
|
printf("Cycles per µs: %lu\n",cpuCyclesMicroSec);
|
||||||
|
printf("Key" SEP "delay to process" SEP "processing time" SEP "delay to be read answer\n");
|
||||||
|
notifiedFIFO_elt_t doneRequest;
|
||||||
|
|
||||||
|
while ( 1 ) {
|
||||||
|
if ( read(fd,&doneRequest, sizeof(doneRequest)) == sizeof(doneRequest)) {
|
||||||
|
printf("%lu" SEP "%lu" SEP "%lu" SEP "%lu" "\n",
|
||||||
|
doneRequest.key,
|
||||||
|
(doneRequest.startProcessingTime-doneRequest.creationTime)/cpuCyclesMicroSec,
|
||||||
|
(doneRequest.endProcessingTime-doneRequest.startProcessingTime)/cpuCyclesMicroSec,
|
||||||
|
(doneRequest.returnTime-doneRequest.endProcessingTime)/cpuCyclesMicroSec
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
printf("no measurements\n");
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
/*
|
||||||
|
Author: Laurent THOMAS, Open Cells
|
||||||
|
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <sched.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <sys/sysinfo.h>
|
||||||
|
#include <threadPool/thread-pool.h>
|
||||||
|
|
||||||
|
void displayList(notifiedFIFO_t *nf) {
|
||||||
|
int n=0;
|
||||||
|
notifiedFIFO_elt_t *ptr=nf->outF;
|
||||||
|
|
||||||
|
while(ptr) {
|
||||||
|
printf("element: %d, key: %lu\n",++n,ptr->key);
|
||||||
|
ptr=ptr->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("End of list: %d elements\n",n);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline notifiedFIFO_elt_t *pullNotifiedFifoRemember( notifiedFIFO_t *nf, struct one_thread *thr) {
|
||||||
|
mutexlock(nf->lockF);
|
||||||
|
|
||||||
|
while(!nf->outF)
|
||||||
|
condwait(nf->notifF, nf->lockF);
|
||||||
|
|
||||||
|
notifiedFIFO_elt_t *ret=nf->outF;
|
||||||
|
nf->outF=nf->outF->next;
|
||||||
|
|
||||||
|
if (nf->outF==NULL)
|
||||||
|
nf->inF=NULL;
|
||||||
|
|
||||||
|
// For abort feature
|
||||||
|
thr->runningOnKey=ret->key;
|
||||||
|
thr->abortFlag=false;
|
||||||
|
mutexunlock(nf->lockF);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *one_thread(void *arg) {
|
||||||
|
struct one_thread *myThread=(struct one_thread *) arg;
|
||||||
|
struct thread_pool *tp=myThread->pool;
|
||||||
|
|
||||||
|
// configure the thread core assignment
|
||||||
|
// TBD: reserve the core for us exclusively
|
||||||
|
if ( myThread->coreID >= 0 && myThread->coreID < get_nprocs_conf()) {
|
||||||
|
cpu_set_t cpuset;
|
||||||
|
CPU_ZERO(&cpuset);
|
||||||
|
CPU_SET(myThread->coreID, &cpuset);
|
||||||
|
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Configure the thread scheduler policy for Linux
|
||||||
|
struct sched_param sparam= {0};
|
||||||
|
sparam.sched_priority = sched_get_priority_max(SCHED_RR);
|
||||||
|
pthread_setschedparam(pthread_self(), SCHED_RR, &sparam);
|
||||||
|
// set the thread name for debugging
|
||||||
|
sprintf(myThread->name,"Tpool_%d",myThread->coreID);
|
||||||
|
pthread_setname_np(pthread_self(), myThread->name );
|
||||||
|
|
||||||
|
// Infinite loop to process requests
|
||||||
|
do {
|
||||||
|
notifiedFIFO_elt_t *elt=pullNotifiedFifoRemember(&tp->incomingFifo, myThread);
|
||||||
|
|
||||||
|
if (tp->measurePerf) elt->startProcessingTime=rdtsc();
|
||||||
|
|
||||||
|
elt->processingFunc(NotifiedFifoData(elt));
|
||||||
|
|
||||||
|
if (tp->measurePerf) elt->endProcessingTime=rdtsc();
|
||||||
|
|
||||||
|
if (elt->reponseFifo) {
|
||||||
|
// Check if the job is still alive, else it has been aborted
|
||||||
|
mutexlock(tp->incomingFifo.lockF);
|
||||||
|
|
||||||
|
if (myThread->abortFlag)
|
||||||
|
delNotifiedFIFO_elt(elt);
|
||||||
|
else
|
||||||
|
pushNotifiedFIFO(elt->reponseFifo, elt);
|
||||||
|
|
||||||
|
mutexunlock(tp->incomingFifo.lockF);
|
||||||
|
}
|
||||||
|
} while (true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
|
||||||
|
memset(pool,0,sizeof(*pool));
|
||||||
|
char *measr=getenv("threadPoolMeasurements");
|
||||||
|
pool->measurePerf=performanceMeas;
|
||||||
|
// force measurement if the output is defined
|
||||||
|
pool->measurePerf=measr!=NULL;
|
||||||
|
|
||||||
|
if (measr) {
|
||||||
|
mkfifo(measr,0666);
|
||||||
|
AssertFatal(-1 != (pool->dummyTraceFd=
|
||||||
|
open(measr, O_RDONLY| O_NONBLOCK)),"");
|
||||||
|
AssertFatal(-1 != (pool->traceFd=
|
||||||
|
open(measr, O_WRONLY|O_APPEND|O_NOATIME|O_NONBLOCK)),"");
|
||||||
|
} else
|
||||||
|
pool->traceFd=-1;
|
||||||
|
|
||||||
|
//Configure the thread scheduler policy for Linux
|
||||||
|
struct sched_param sparam= {0};
|
||||||
|
sparam.sched_priority = sched_get_priority_max(SCHED_RR)-1;
|
||||||
|
pthread_setschedparam(pthread_self(), SCHED_RR, &sparam);
|
||||||
|
pool->activated=true;
|
||||||
|
initNotifiedFIFO(&pool->incomingFifo);
|
||||||
|
char *saveptr, * curptr;
|
||||||
|
pool->nbThreads=0;
|
||||||
|
pool->restrictRNTI=false;
|
||||||
|
curptr=strtok_r(params,",",&saveptr);
|
||||||
|
|
||||||
|
while ( curptr!=NULL ) {
|
||||||
|
int c=toupper(curptr[0]);
|
||||||
|
|
||||||
|
switch (c) {
|
||||||
|
case 'U':
|
||||||
|
pool->restrictRNTI=true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'N':
|
||||||
|
pool->activated=false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
pool->allthreads=(struct one_thread *)malloc(sizeof(struct one_thread));
|
||||||
|
pool->allthreads->next=pool->allthreads;
|
||||||
|
printf("create a thread for core %d\n", atoi(curptr));
|
||||||
|
pool->allthreads->coreID=atoi(curptr);
|
||||||
|
pool->allthreads->id=pool->nbThreads;
|
||||||
|
pool->allthreads->pool=pool;
|
||||||
|
pthread_create(&pool->allthreads->threadID, NULL, one_thread, (void *)pool->allthreads);
|
||||||
|
pool->nbThreads++;
|
||||||
|
}
|
||||||
|
|
||||||
|
curptr=strtok_r(NULL,",",&saveptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pool->activated && pool->nbThreads==0) {
|
||||||
|
printf("No servers created in the thread pool, exit\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef TEST_THREAD_POOL
|
||||||
|
|
||||||
|
struct testData {
|
||||||
|
int id;
|
||||||
|
char txt[30];
|
||||||
|
};
|
||||||
|
|
||||||
|
void processing(void *arg) {
|
||||||
|
struct testData *in=(struct testData *)arg;
|
||||||
|
printf("doing: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() );
|
||||||
|
sprintf(in->txt,"Done by %ld, job %d", pthread_self(), in->id);
|
||||||
|
usleep(rand()%100);
|
||||||
|
printf("done: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() );
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
notifiedFIFO_t myFifo;
|
||||||
|
initNotifiedFIFO(&myFifo);
|
||||||
|
pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 1234,NULL,NULL));
|
||||||
|
|
||||||
|
for(int i=10; i>1; i--) {
|
||||||
|
pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 1000+i,NULL,NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
displayList(&myFifo);
|
||||||
|
notifiedFIFO_elt_t *tmp=pullNotifiedFIFO(&myFifo);
|
||||||
|
printf("pulled: %lu\n", tmp->key);
|
||||||
|
displayList(&myFifo);
|
||||||
|
tmp=pullNotifiedFIFO(&myFifo);
|
||||||
|
printf("pulled: %lu\n", tmp->key);
|
||||||
|
displayList(&myFifo);
|
||||||
|
abortNotifiedFIFO(&myFifo,1005);
|
||||||
|
printf("aborted 1005\n");
|
||||||
|
displayList(&myFifo);
|
||||||
|
pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 12345678, NULL, NULL));
|
||||||
|
displayList(&myFifo);
|
||||||
|
abortNotifiedFIFO(&myFifo,12345678);
|
||||||
|
printf("aborted 12345678\n");
|
||||||
|
displayList(&myFifo);
|
||||||
|
|
||||||
|
do {
|
||||||
|
tmp=pollNotifiedFIFO(&myFifo);
|
||||||
|
|
||||||
|
if (tmp) {
|
||||||
|
printf("pulled: %lu\n", tmp->key);
|
||||||
|
displayList(&myFifo);
|
||||||
|
} else
|
||||||
|
printf("Empty list \n");
|
||||||
|
} while(tmp);
|
||||||
|
|
||||||
|
tpool_t pool;
|
||||||
|
char params[]="1,2,3,u";
|
||||||
|
initTpool(params,&pool, true);
|
||||||
|
notifiedFIFO_t worker_back;
|
||||||
|
initNotifiedFIFO(&worker_back);
|
||||||
|
|
||||||
|
for (int i=0; i <1000 ; i++) {
|
||||||
|
notifiedFIFO_elt_t *work=newNotifiedFIFO_elt(sizeof(struct testData), i, &worker_back, processing);
|
||||||
|
struct testData *x=(struct testData *)NotifiedFifoData(work);
|
||||||
|
x->id=i;
|
||||||
|
pushTpool(&pool, work);
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
tmp=pullTpool(&worker_back,&pool);
|
||||||
|
|
||||||
|
if (tmp) {
|
||||||
|
struct testData *dd=NotifiedFifoData(tmp);
|
||||||
|
printf("Result: %s\n",dd->txt);
|
||||||
|
delNotifiedFIFO_elt(tmp);
|
||||||
|
} else
|
||||||
|
printf("Empty list \n");
|
||||||
|
|
||||||
|
abortTpool(&pool,510);
|
||||||
|
} while(tmp);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
/*
|
||||||
|
Author: Laurent THOMAS, Open Cells
|
||||||
|
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef THREAD_POOL_H
|
||||||
|
#define THREAD_POOL_H
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#include <assertions.h>
|
||||||
|
#include <LOG/log.h>
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#define THREADINIT PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
|
||||||
|
#else
|
||||||
|
#define THREADINIT PTHREAD_MUTEX_INITIALIZER
|
||||||
|
#endif
|
||||||
|
#define mutexinit(mutex) AssertFatal(pthread_mutex_init(&mutex,NULL)==0,"");
|
||||||
|
#define condinit(signal) AssertFatal(pthread_cond_init(&signal,NULL)==0,"");
|
||||||
|
#define mutexlock(mutex) AssertFatal(pthread_mutex_lock(&mutex)==0,"");
|
||||||
|
#define mutextrylock(mutex) pthread_mutex_trylock(&mutex)
|
||||||
|
#define mutexunlock(mutex) AssertFatal(pthread_mutex_unlock(&mutex)==0,"");
|
||||||
|
#define condwait(condition, mutex) AssertFatal(pthread_cond_wait(&condition, &mutex)==0,"");
|
||||||
|
#define condbroadcast(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
|
||||||
|
#define condsignal(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
|
||||||
|
|
||||||
|
typedef struct notifiedFIFO_elt_s {
|
||||||
|
struct notifiedFIFO_elt_s *next;
|
||||||
|
uint64_t key; //To filter out elements
|
||||||
|
struct notifiedFIFO_s *reponseFifo;
|
||||||
|
void (*processingFunc)(void *);
|
||||||
|
bool malloced;
|
||||||
|
uint64_t creationTime;
|
||||||
|
uint64_t startProcessingTime;
|
||||||
|
uint64_t endProcessingTime;
|
||||||
|
uint64_t returnTime;
|
||||||
|
void *msgData;
|
||||||
|
} notifiedFIFO_elt_t;
|
||||||
|
|
||||||
|
typedef struct notifiedFIFO_s {
|
||||||
|
notifiedFIFO_elt_t *outF;
|
||||||
|
notifiedFIFO_elt_t *inF;
|
||||||
|
pthread_mutex_t lockF;
|
||||||
|
pthread_cond_t notifF;
|
||||||
|
} notifiedFIFO_t;
|
||||||
|
|
||||||
|
// You can use this allocator or use any piece of memory
|
||||||
|
static inline notifiedFIFO_elt_t *newNotifiedFIFO_elt(int size,
|
||||||
|
uint64_t key,
|
||||||
|
notifiedFIFO_t *reponseFifo,
|
||||||
|
void (*processingFunc)(void *)) {
|
||||||
|
notifiedFIFO_elt_t *ret;
|
||||||
|
AssertFatal( NULL != (ret=(notifiedFIFO_elt_t *) malloc(sizeof(notifiedFIFO_elt_t)+size+32)), "");
|
||||||
|
ret->next=NULL;
|
||||||
|
ret->key=key;
|
||||||
|
ret->reponseFifo=reponseFifo;
|
||||||
|
ret->processingFunc=processingFunc;
|
||||||
|
// We set user data piece aligend 32 bytes to be able to process it with SIMD
|
||||||
|
ret->msgData=(void *)ret+(sizeof(notifiedFIFO_elt_t)/32+1)*32;
|
||||||
|
ret->malloced=true;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void *NotifiedFifoData(notifiedFIFO_elt_t *elt) {
|
||||||
|
return elt->msgData;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt) {
|
||||||
|
if (elt->malloced) {
|
||||||
|
elt->malloced=false;
|
||||||
|
free(elt);
|
||||||
|
} else
|
||||||
|
printf("delNotifiedFIFO on something not allocated by newNotifiedFIFO\n");
|
||||||
|
|
||||||
|
//LOG_W(UTIL,"delNotifiedFIFO on something not allocated by newNotifiedFIFO\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void initNotifiedFIFO(notifiedFIFO_t *nf) {
|
||||||
|
mutexinit(nf->lockF);
|
||||||
|
condinit (nf->notifF);
|
||||||
|
nf->inF=NULL;
|
||||||
|
nf->outF=NULL;
|
||||||
|
// No delete function: the creator has only to free the memory
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg) {
|
||||||
|
mutexlock(nf->lockF);
|
||||||
|
msg->next=NULL;
|
||||||
|
|
||||||
|
if (nf->outF == NULL)
|
||||||
|
nf->outF = msg;
|
||||||
|
|
||||||
|
if (nf->inF)
|
||||||
|
nf->inF->next = msg;
|
||||||
|
|
||||||
|
nf->inF = msg;
|
||||||
|
condbroadcast(nf->notifF);
|
||||||
|
mutexunlock(nf->lockF);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline notifiedFIFO_elt_t *pullNotifiedFIFO(notifiedFIFO_t *nf) {
|
||||||
|
mutexlock(nf->lockF);
|
||||||
|
|
||||||
|
while(!nf->outF)
|
||||||
|
condwait(nf->notifF, nf->lockF);
|
||||||
|
|
||||||
|
notifiedFIFO_elt_t *ret=nf->outF;
|
||||||
|
nf->outF=nf->outF->next;
|
||||||
|
|
||||||
|
if (nf->outF==NULL)
|
||||||
|
nf->inF=NULL;
|
||||||
|
|
||||||
|
mutexunlock(nf->lockF);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
|
||||||
|
int tmp=mutextrylock(nf->lockF);
|
||||||
|
|
||||||
|
if (tmp != 0 )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
notifiedFIFO_elt_t *ret=nf->outF;
|
||||||
|
|
||||||
|
if (ret!=NULL)
|
||||||
|
nf->outF=nf->outF->next;
|
||||||
|
|
||||||
|
if (nf->outF==NULL)
|
||||||
|
nf->inF=NULL;
|
||||||
|
|
||||||
|
mutexunlock(nf->lockF);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This function aborts all messages matching the key
|
||||||
|
// If the queue is used in thread pools, it doesn't cancels already running processing
|
||||||
|
// because the message has already been picked
|
||||||
|
static inline void abortNotifiedFIFO(notifiedFIFO_t *nf, uint64_t key) {
|
||||||
|
mutexlock(nf->lockF);
|
||||||
|
notifiedFIFO_elt_t **start=&nf->outF;
|
||||||
|
|
||||||
|
while(*start!=NULL) {
|
||||||
|
if ( (*start)->key == key ) {
|
||||||
|
notifiedFIFO_elt_t *request=*start;
|
||||||
|
*start=(*start)->next;
|
||||||
|
delNotifiedFIFO_elt(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*start != NULL)
|
||||||
|
start=&(*start)->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
mutexunlock(nf->lockF);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct one_thread {
|
||||||
|
pthread_t threadID;
|
||||||
|
int id;
|
||||||
|
int coreID;
|
||||||
|
char name[256];
|
||||||
|
uint64_t runningOnKey;
|
||||||
|
bool abortFlag;
|
||||||
|
struct thread_pool *pool;
|
||||||
|
struct one_thread *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct thread_pool {
|
||||||
|
int activated;
|
||||||
|
bool measurePerf;
|
||||||
|
int traceFd;
|
||||||
|
int dummyTraceFd;
|
||||||
|
uint64_t cpuCyclesMicroSec;
|
||||||
|
uint64_t startProcessingUE;
|
||||||
|
int nbThreads;
|
||||||
|
bool restrictRNTI;
|
||||||
|
notifiedFIFO_t incomingFifo;
|
||||||
|
struct one_thread *allthreads;
|
||||||
|
} tpool_t;
|
||||||
|
|
||||||
|
static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
|
||||||
|
if (t->measurePerf) msg->creationTime=rdtsc();
|
||||||
|
|
||||||
|
pushNotifiedFIFO(&t->incomingFifo, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
|
||||||
|
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
|
||||||
|
|
||||||
|
if (t->measurePerf)
|
||||||
|
msg->returnTime=rdtsc();
|
||||||
|
|
||||||
|
if (t->traceFd)
|
||||||
|
if(write(t->traceFd, msg, sizeof(*msg)));
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
|
||||||
|
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
|
||||||
|
|
||||||
|
if (msg == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (t->measurePerf)
|
||||||
|
msg->returnTime=rdtsc();
|
||||||
|
|
||||||
|
if (t->traceFd)
|
||||||
|
if(write(t->traceFd, msg, sizeof(*msg)));
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void abortTpool(tpool_t *t, uint64_t key) {
|
||||||
|
notifiedFIFO_t *nf=&t->incomingFifo;
|
||||||
|
mutexlock(nf->lockF);
|
||||||
|
notifiedFIFO_elt_t **start=&nf->outF;
|
||||||
|
|
||||||
|
while(*start!=NULL) {
|
||||||
|
if ( (*start)->key == key ) {
|
||||||
|
notifiedFIFO_elt_t *request=*start;
|
||||||
|
*start=(*start)->next;
|
||||||
|
delNotifiedFIFO_elt(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*start != NULL)
|
||||||
|
start=&(*start)->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct one_thread *ptr=t->allthreads;
|
||||||
|
|
||||||
|
while(ptr!=NULL) {
|
||||||
|
if (ptr->runningOnKey==key)
|
||||||
|
ptr->abortFlag=true;
|
||||||
|
|
||||||
|
ptr=ptr->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
mutexunlock(nf->lockF);
|
||||||
|
}
|
||||||
|
void initTpool(char *params,tpool_t *pool, bool performanceMeas);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
# Thread pool
|
||||||
|
|
||||||
|
The thread pool is a working server, made of a set of worker threads that can be mapped on CPU cores.
|
||||||
|
|
||||||
|
Each worker loop on pick from the same input queue jobs to do.
|
||||||
|
When a job is done, the worker sends a return if a return is defined.
|
||||||
|
|
||||||
|
A selective abort allows to cancel parallel jobs (usage: a client pushed jobs, but from a response of one job, the other linked jobs becomes useless).
|
||||||
|
|
||||||
|
All the thread pool functions are thread safe, nevertheless the working functions are implemented by the thread pool client, so the client has to tackle the parallel execution of his functions called "processingFunc" hereafter.
|
||||||
|
|
||||||
|
## license
|
||||||
|
Author: Laurent Thomas, Open cells project
|
||||||
|
The owner share this piece code to Openairsoftware alliance as per OSA license terms
|
||||||
|
|
||||||
|
# jobs
|
||||||
|
|
||||||
|
A job is a message (notifiedFIFO_elt_t):
|
||||||
|
next: internal FIFO chain, do not set it
|
||||||
|
key: a long int that the client can use to identify a message or a group of messages
|
||||||
|
responseFifo: if the client defines a response FIFO, the message will be posted back after processing
|
||||||
|
processingFunc: any funtion (type void processingFunc(void *)) that the worker will launch
|
||||||
|
msgData: the data passed to processingFunc. It can be added automatically, or you can set it to a buffer you are managing
|
||||||
|
malloced: a boolean that enable internal free in these cases: no return Fifo or Abort feature
|
||||||
|
|
||||||
|
The job messages can be created with newNotifiedFIFO_elt() and delNotifiedFIFO_elt() or managed by the client.
|
||||||
|
|
||||||
|
# Queues of jobs
|
||||||
|
|
||||||
|
Queues are type of: notifiedFIFO_t that must be initialized by init_notifiedFIFO()
|
||||||
|
No delete function is required, the creator has only to free the data of type notifiedFIFO_t
|
||||||
|
|
||||||
|
push_notifiedFIFO() add a job in the queue
|
||||||
|
pull_notifiedFIFO() is blocking, poll_notifiedFIFO() is non blocking
|
||||||
|
|
||||||
|
abort_notifiedFIFO() allows the customer to delete all waiting jobs that match with the key (see key in jobs definition)
|
||||||
|
|
||||||
|
# Thread pools
|
||||||
|
|
||||||
|
## initialization
|
||||||
|
The clients can create one or more thread pools with init_tpool()
|
||||||
|
the params string structure: describes a list of cores, separated by "," that run a worker thread
|
||||||
|
|
||||||
|
If the core exists on the CPU, the thread pool initialization sets the affinity between this thread and the related code (use negative values is allowed, so the thread will never be mapped on a specific core).
|
||||||
|
|
||||||
|
The threads are all Linux real time scheduler, their name is set automatically is "Tpool_<core id>"
|
||||||
|
|
||||||
|
## adding jobs
|
||||||
|
The client create their jobs messages as a notifiedFIFO_elt_t, then they push it with pushTpool() (that internally calls push_notifiedFIFO())
|
||||||
|
|
||||||
|
If they need a return, they have to create response queues with init_notifiedFIFO() and set this FIFO pointer in the notifiedFIFO_elt_t before pushing the job.
|
||||||
|
|
||||||
|
## abort
|
||||||
|
|
||||||
|
A abort service abortTpool() allows to abort all jobs that match a key (see jobs "key"). When the abort returns, it garanties no job (matching the key) response will be posted on response queues.
|
||||||
|
|
||||||
|
Nevertheless, jobs already performed before the return of abortTpool() are pushed in the response Fifo queue.
|
||||||
|
|
||||||
|
## Performance measurements
|
||||||
|
|
||||||
|
A performance measurement is integrated: the pool will automacillay fill timestamps:
|
||||||
|
|
||||||
|
* creationTime: time the request is push to the pool;
|
||||||
|
* startProcessingTime: time a worker start to run on the job
|
||||||
|
* endProcessingTime: time the worker finished the job
|
||||||
|
* returnTime: time the client reads the result
|
||||||
|
|
||||||
|
if you set the environement variable: thread-pool-measurements to a valid file name
|
||||||
|
These measurements will be wrote to this Linux pipe.
|
||||||
|
|
||||||
|
A tool to read the linux fifo and display it in ascii is provided: see the local directory Makefile for this tool and to compile the thread pool unitary tests.
|
||||||
+121
@@ -0,0 +1,121 @@
|
|||||||
|
# OAI build procedures
|
||||||
|
|
||||||
|
## soft modem Build script
|
||||||
|
|
||||||
|
oai EPC is developed in a distinct project with it's own [documentation](https://github.com/OPENAIRINTERFACE/openair-cn/wiki) , it is not described here. OAI UE and eNodeB sources can be downloaded from the Eurecom [gitlab repository](./GET_SOURCES.md). Sources come with a build script [build_oai](../cmake_targets/build_oai) located at the root of the `openairinterface5g/cmake_targets` directory. This script is developed to build the oai binaries (executables,shared libraries) for different hardware platforms, and use cases.
|
||||||
|
|
||||||
|
the main oai binaries, which are tested by the Continuous Integration process are:
|
||||||
|
|
||||||
|
- The LTE UE: `lte-uesoftmodem`
|
||||||
|
- The LTE eNodeB: `lte-softmodem`
|
||||||
|
- The PHY simulators: `dlsim` and `ulsim`
|
||||||
|
|
||||||
|
The build system for OAI uses [cmake](https://cmake.org/) which is a tool to generate makefiles. The `build_oai` script is a wrapper using cmake, make and standard linux shell commands to ease the oai build and use . The file describing how to build the executables from source files is the [CMakeLists.txt](../cmake_targets/CMakeLists.txt), it is used as input by cmake to generate the makefiles.
|
||||||
|
|
||||||
|
The oai softmodem supports many use cases, and new ones are regularly added. Most of them are accessible using the configuration file or the command line options and continuous effort is done to avoid introducing build options as it makes tests and usage more complicated than run-time options. The following functionalities, originally requiring a specific build are now accessible by configuration or command line options:
|
||||||
|
|
||||||
|
- s1, noS1
|
||||||
|
|
||||||
|
- all simulators, with exception of PHY simulators, which are distinct executables.
|
||||||
|
|
||||||
|
|
||||||
|
Calling the `build_oai` script with the -h option gives the list of all available options, but a process to simplify and check the requirements of all these options is on-going. Check the
|
||||||
|
|
||||||
|
[table]: BUILD.md "`build_oai` options"
|
||||||
|
|
||||||
|
at the end of this page to know the status of `buid_oai` options which are not described hereafter.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## building PHY simulators
|
||||||
|
|
||||||
|
detailed information about these simulators can be found [in this dedicated page](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/OpenAirLTEPhySimul
|
||||||
|
|
||||||
|
## building UE and eNodeB executables
|
||||||
|
|
||||||
|
After downloading the source files, a single build command can be used to get the binaries supporting all the oai softmodem use cases (UE and eNodeB):
|
||||||
|
|
||||||
|
```
|
||||||
|
cd <your oai installation directory>/openairinterface5g/
|
||||||
|
source oaienv
|
||||||
|
cd ../cmake_targets/
|
||||||
|
./build_oai -I -w USRP --eNB --UE
|
||||||
|
```
|
||||||
|
|
||||||
|
- The -I option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed.
|
||||||
|
- The -w option is to select the radio head support you want to include in your build. Radio head support is provided via a shared library, which is called the "oai device" The build script creates a soft link from `liboai_device.so` to the true device which will be used at run-time (here the USRP one,`liboai_usrpdevif.so` . USRP is the only hardware tested today in the Continuous Integration process.
|
||||||
|
- --eNB is to build the `lte-softmodem` executable and all required shared libraries
|
||||||
|
- --UE is to build the `lte-uesoftmodem` executable and all required shared libraries
|
||||||
|
|
||||||
|
You can build the eNodeB and the UE separately, you may not need both of them depending on your oai usage.
|
||||||
|
|
||||||
|
After completing the build, the binaries are available in the `cmake_targets/lte_build_oai/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel14 by default. It must be noticed that the option for building for a specific 3GPP release number is not tested by the CI and may be removed in the future.
|
||||||
|
|
||||||
|
## building optional binaries
|
||||||
|
|
||||||
|
### Telnet server
|
||||||
|
|
||||||
|
The telnet server can be built with the --build-telnet option, after building the softmodem or while building it.
|
||||||
|
|
||||||
|
`./build_oai -I -w USRP --eNB --UE --build-telnetsrv`
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
`./build_oai --build-telnetsrv`
|
||||||
|
|
||||||
|
### USRP record player
|
||||||
|
|
||||||
|
The USRP record player today needs a specific build. Work to make it available as a run time option is under consideration
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `build_oai` options
|
||||||
|
|
||||||
|
| Option | Status | Description |
|
||||||
|
| ----------------------------------------------------------- | ------------------------------------------- | :----------------------------------------------------------- |
|
||||||
|
| -h | maintained | get help |
|
||||||
|
| -c | maintained | erase all previously built files for this target before starting the new build. |
|
||||||
|
| -C | maintained, needs improvement | erase all previously built files for any target before starting the new build. |
|
||||||
|
| --verbose-compile | maintained | |
|
||||||
|
| --cflags_processor | maintained | used to pass options to the compiler |
|
||||||
|
| --clean-kernel | unknown | no code in the script corresponding to this option |
|
||||||
|
| --install-system-files | maintained | install oai built binaries in linux system files repositories |
|
||||||
|
| -w | maintained and tested in CI for USRP device | build corresponding oai device and create the soft link to enforce this device usage at run-time |
|
||||||
|
| -t | maintained | build the specified transport library, which is used in some simulators and in non monolithic eNodeB deployments. Now of little interest as transport library build is enforced when building the eNodeB. |
|
||||||
|
| --phy_simulators | maintained, tested in CI | build all PHY simulators, a set of executables allowing unitary tests of LTE channel implementation within oai. |
|
||||||
|
| --core_simulators | | |
|
||||||
|
| -s | | |
|
||||||
|
| --run-group | | |
|
||||||
|
| -I | maintained, tested in CI | install external dependencies before starting the build |
|
||||||
|
| --install-optional-packages | maintained | install optional packages, useful for developing and testing. look at the |
|
||||||
|
| | | check_install_additional_tools function in cmake_targets/tools/build_helper script to get the list |
|
||||||
|
| -g | maintained | build binaries with gdb support. |
|
||||||
|
| --eNB | maintained and tested in CI | build `lte-softmodem` the LTE eNodeB |
|
||||||
|
| --UE | maintained and tested in CI | build `lte-uesoftmodem` the LTE UE |
|
||||||
|
| --usrp-recplay | maintained | build with support for the record player. Implementation will be soon reviewed to switch to a run-time option. |
|
||||||
|
| --build-telnet | maintained | build the telnet server shared library, which can then be loaded at run time via the --telnetsrv command line option. |
|
||||||
|
| --build-msc | unknown | build the msc shared library, which can then be loaded at run time via the --msc command line option. msc is a tracing utility which status is unknown. |
|
||||||
|
| --UE-conf-nvram | | |
|
||||||
|
| --UE-gen-nvram | | |
|
||||||
|
| -r | unknown, to be removed | specifies which 3GPP release to build for. Only the default (today rel14) is tested in CI and it is likely that future oai release will remove this option |
|
||||||
|
| -V | deprecated | Used to build with support for synchronization diagram utility. This is now available via the T-Tracer and is included if T-Tracer is not disabled. |
|
||||||
|
| -x | deprecated | Used to build with support for embedded signal analyzer. This is now available via the T-Tracer and is included if T-Tracer is not disabled. |
|
||||||
|
| --noS1 | deprecated, to be removed | build noS1 version of oai softmodem binaries. noS1 allows running oai eNodeB and UE without an LTE core network (EPC). This functionality is now available via a run-time option. |
|
||||||
|
| --build-doxygen | unknown | build doxygen documentation, many oai source files do not include doxygen comments |
|
||||||
|
| --disable-deadline --enable-deadline --disable-cpu-affinity | deprecated | These options were used to activate or de-activate specific code depending on the choice of a specific linux scheduling mode. This has not been tested for a while and should be implemented as configuration options |
|
||||||
|
| --disable-T-Tracer | maintained, to be tested | Remove T_Tracer and console LOG messages except error messages. |
|
||||||
|
| --disable-hardware-dependency | | |
|
||||||
|
| --ue-autotest-trace --ue-timing --ue-trace | deprecated | Were used to enable conditional code implementing debugging messages or debugging statistics. These functionalities are now either available from run-time options or not maintained. |
|
||||||
|
| --disable-log | deprecated, to be removed | Was used to disable LOG messages, replaced by `--disable-T-Tracer` build option to remove tracing code from the build or `--T-stdout 0` run time option to redirect LOG messages to T-Tracer client interface. |
|
||||||
|
| --ue-nas-use-tun | deprecated to be removed | Usage of tun in place of specific kernel modules is now a run time option. `--nokrnmod 0` option disable the default behavior which is to use tun to send or receive ip packets to/from the linux ip stack. |
|
||||||
|
| --build-eclipse | unknown | |
|
||||||
|
| --basic-simulator | deprecated tested in CI | builds the basic simulator device. Now of little interest as this device build is enforced when building the eNodeB and it can be used at run time with the `--basicsim` option. More over the rf simulator is an enhanced basic simulator. |
|
||||||
|
| --rfsimulator | maintained | builds the rf simulator device. Now of little interest as this device build is enforced when building the eNodeB and it can be used at run time with the `--rfsim` option. |
|
||||||
|
| | | |
|
||||||
|
|
||||||
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
[oai softmodem features](FEATURE_SET.md)
|
||||||
|
|
||||||
|
[running the oai softmodem ](RUNMODEM.md)
|
||||||
|
|
||||||
@@ -195,3 +195,10 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
|
|||||||
|
|
||||||
- EMM attach/detach, authentication, tracking area update, and more
|
- EMM attach/detach, authentication, tracking area update, and more
|
||||||
- ESM default/dedicated bearer, PDN connectivity, and more
|
- ESM default/dedicated bearer, PDN connectivity, and more
|
||||||
|
|
||||||
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
[oai softmodem build procedure](BUILD.md)
|
||||||
|
|
||||||
|
[running the oai softmodem ](RUNMODEM.md)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
# The OpenAirInterface repository
|
||||||
|
|
||||||
|
The OpenAirInterface software can be obtained from our gitLab
|
||||||
|
server. You will need a git client to get the sources. The repository
|
||||||
|
is currently used for main developments.
|
||||||
|
|
||||||
|
## Prerequisite
|
||||||
|
|
||||||
|
You need to install the subversion/git using the following commands:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install subversion git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using EURECOM Gitlab
|
||||||
|
|
||||||
|
The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git)
|
||||||
|
holds the source code for (eNB RAN + UE RAN).
|
||||||
|
|
||||||
|
For legal issues (licenses), the core network (EPC) source code is now moved away from
|
||||||
|
the above openairinterface5g git repository. This EPC code is now splitted into two git
|
||||||
|
projects ([openair-cn](https://gitlab.eurecom.fr/oai/openair-cn.git) with apache license
|
||||||
|
and [xtables-addons-oai](https://gitlab.eurecom.fr/oai/xtables-addons-oai.git) with GPL license).
|
||||||
|
|
||||||
|
Configure git with your name/email address (only important if you are developer and want to checkin code to Git):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git config --global user.name "Your Name"
|
||||||
|
git config --global user.email "Your email address"
|
||||||
|
```
|
||||||
|
|
||||||
|
- Add a certificate from gitlab.eurecom.fr to your Ubuntu 14.04 installation:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
echo -n | openssl s_client -showcerts -connect gitlab.eurecom.fr:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
|
||||||
|
```
|
||||||
|
|
||||||
|
- Disable certificate check completely if you do not have root access to /etc/ssl directory
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git config --global http.sslverify false
|
||||||
|
```
|
||||||
|
|
||||||
|
### In order to checkout the Git repository (for OAI Users without login to gitlab server)
|
||||||
|
|
||||||
|
Checkout RAN repository (eNB RAN + UE RAN):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Checkout EPC (Core Network) repository:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://gitlab.eurecom.fr/oai/openair-cn.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Optionally (openair-cn build script can install it for you):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://gitlab.eurecom.fr/oai/xtables-addons-oai.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### In order to checkout the Git repository (for OAI Developers/admins with login to gitlab server)
|
||||||
|
|
||||||
|
Please send email to {openair_tech (AT) eurecom (DOT) fr} to be added to the repository
|
||||||
|
as a developer (only important for users who want to commit code to the repository). If
|
||||||
|
you do not have account on gitlab.eurecom.fr, please register yourself to gitlab.eurecom.fr.
|
||||||
|
|
||||||
|
* Checkout with using ssh keys:
|
||||||
|
* You will need to put your ssh keys in https://gitlab.eurecom.fr/profile/keys
|
||||||
|
to access to the git repo. Once that is done, checkout the git repository using:
|
||||||
|
* `git clone git@gitlab.eurecom.fr:oai/openairinterface5g.git`
|
||||||
|
* Checkout with user name/password prompt:
|
||||||
|
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openairinterface5g.git`
|
||||||
|
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openair-cn.git`
|
||||||
|
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/xtables-addons-oai.git` (optional, openair-cn build script can do it for you)
|
||||||
|
|
||||||
|
## Which branch to checkout?
|
||||||
|
|
||||||
|
On the RAN side:
|
||||||
|
|
||||||
|
* **master**: This branch is targeted for the user community. Since January 2019, it is also subject to a Continuous Integration process. The update frequency is about once every 2-3 months. We are also performing bug fixes on this branch.
|
||||||
|
* **develop**: This branch contains recent commits that are tested on our CI test bench. The update frequency is about once a week.
|
||||||
|
|
||||||
|
Please see the work flow and policies page :
|
||||||
|
|
||||||
|
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home
|
||||||
|
|
||||||
|
you can find the latest stable tag release here :
|
||||||
|
|
||||||
|
https://gitlab.eurecom.fr/oai/openairinterface5g/tags
|
||||||
|
|
||||||
|
The tag naming conventions are :
|
||||||
|
|
||||||
|
- On `master` branch: **v1.`x`.`y`** where
|
||||||
|
* `x` is the minor release number, incremented every 2-3 months when we are merging `develop` into `master` branch.
|
||||||
|
* `y` is the maintenance number, starting at 0 when we do a minor release and being incremented when a bug fix is incorporated into `master` branch.
|
||||||
|
- On `develop` branch **`yyyy`.w`xx`**
|
||||||
|
* `yyyy` is the calendar year
|
||||||
|
* `xx` the week number within the year
|
||||||
|
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<table style="border-collapse: collapse; border: none;">
|
||||||
|
<tr style="border-collapse: collapse; border: none;">
|
||||||
|
<td style="border-collapse: collapse; border: none;">
|
||||||
|
<a href="http://www.openairinterface.org/">
|
||||||
|
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||||
|
</img>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||||
|
<b><font size = "5">Open Air LTE Emulation</font></b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
This page is valid for the develop branch
|
||||||
|
|
||||||
|
# Table of Contents: #
|
||||||
|
|
||||||
|
* [How to build the eNB and the UE](#build)
|
||||||
|
* [How to run an eNB built with the noS1 option](#run-noS1-eNB)
|
||||||
|
* [How to run a UE built with the noS1 option](#run-noS1-UE)
|
||||||
|
* [Continuous Integration notes](#CInote)
|
||||||
|
* [How to ping an eNB from a UE and vice versa (with the noS1 option)](#noS1-pinging)
|
||||||
|
|
||||||
|
The old oaisim is dead! Long live oaisim! :)
|
||||||
|
|
||||||
|
If you are looking for a description of the old oaisim (which is still available in some branches/tags), please see [here](OpenAirLTEEmulation) and [here](how-to-run-oaisim-with-multiple-ue).
|
||||||
|
|
||||||
|
oaisim has been scraped and replaced by the same programs that are used for the real-time operation, `lte-softmodem` and `lte-uesoftmodem`. The latter also now includes an optional channel model, just like oaisim did.
|
||||||
|
|
||||||
|
# <a name="build">[How to build the eNB and the UE](BUILD.md)</a>
|
||||||
|
|
||||||
|
The following paragraph explains how to run the L1 simulator in noS1 mode and using the oai kernel modules.
|
||||||
|
|
||||||
|
# <a name="run-noS1-eNB">How to run an eNB with the noS1 option</a>
|
||||||
|
|
||||||
|
Modify the configuration file for IF4p5 fronthaul, `/openairinterface5g/ci-scripts/conf_files/rcc.band7.nos1.simulator.conf`, and replace the loopback interface with a physical ethernet interface and the IP addresses to work on your network. Copy your modifications to a new file, let's call YYY.conf the resulting configuration file.
|
||||||
|
|
||||||
|
Run lte-softmodem as usual with this configuration.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ source oaienv
|
||||||
|
$ cd cmake_targets/tools
|
||||||
|
$ sudo -E ./init_nas_nos1 eNB
|
||||||
|
$ cd ../lte_build_oai/build
|
||||||
|
$ sudo -E ./lte-softmodem -O YYY.conf --noS1 --nokrnmod 0
|
||||||
|
```
|
||||||
|
|
||||||
|
# <a name="run-noS1-UE">How to run a UE with the noS1 option</a>
|
||||||
|
|
||||||
|
Similarly modify the example configuration file in `/openairinterface5g/ci-scripts/conf_files/rru.band7.nos1.simulator.conf` and replace loopback interface and IP addresses. Copy your modifications to a new file, let's call XXX.conf the resulting configuration file.
|
||||||
|
|
||||||
|
Run it like:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ source oaienv
|
||||||
|
$ cd cmake_targets/tools
|
||||||
|
$ sudo -E ./init_nas_nos1 UE
|
||||||
|
$ cd ../lte_build_oai/build
|
||||||
|
$ sudo ./lte-uesoftmodem -O XXX.conf -r 25 --siml1 --noS1 --nokrnmod 0
|
||||||
|
```
|
||||||
|
|
||||||
|
That should give you equivalent functionality to what you had with oaisim including noise and RF channel emulation (path loss / fading, etc.). You should also be able to run multiple UEs.
|
||||||
|
|
||||||
|
# <a name="CInote">Continuous Integration notes</a>
|
||||||
|
The CI currently tests the noS1 build option with one eNB and one UE in the following scenarios:
|
||||||
|
* pinging one UE from one eNB
|
||||||
|
* pinging one eNB from one UE
|
||||||
|
* iperf download between one eNB and one UE
|
||||||
|
* iperf upload between one eNB and one UE
|
||||||
|
* all the above tests are done in FDD 5Mhz mode.
|
||||||
|
|
||||||
|
# <a name="noS1-pinging">How to ping an eNB from a UE and vice versa (with the noS1 option)</a>
|
||||||
|
|
||||||
|
Once your eNB and UE (built with the noS1 option) are running and synchronised, you can ping the eNB from the UE with the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ping -I oai0 -c 20 $eNB_ip_addr
|
||||||
|
```
|
||||||
|
where $eNB_ip_addr is the IP address of your eNB.
|
||||||
|
|
||||||
|
Similarly, you can ping the UE from the eNB.
|
||||||
|
|
||||||
|
The IP adresses of the eNB and the UE are set up by the init_nas_nos1 program and should have the following values:
|
||||||
|
* eNB_ip_addr set to 20 10.0.1.1
|
||||||
|
* ue_ip_addr set to 20 10.0.1.2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
[oai softmodem features](FEATURE_SET.md)
|
||||||
|
|
||||||
|
[oai softmodem build procedure](BUILD.md)
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<table style="border-collapse: collapse; border: none;">
|
||||||
|
<tr style="border-collapse: collapse; border: none;">
|
||||||
|
<td style="border-collapse: collapse; border: none;">
|
||||||
|
<a href="http://www.openairinterface.org/">
|
||||||
|
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||||
|
</img>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||||
|
<b><font size = "5">L2 nFAPI Simulator Usage</font></b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
This simulator allows to test L2 and above Layers using the nFAPI interface.
|
||||||
|
|
||||||
|
**This simulator is available starting the `v1.0.0` release on the `master` branch.**
|
||||||
|
|
||||||
|
Currently the only validated deployment by CI and developers is *with S1 interface and eNB / UEs are on the same machine*.
|
||||||
|
|
||||||
|
Others deployments will be supported later after bug fixes and validation in the CI process.
|
||||||
|
|
||||||
|
1. [With S1 -- eNB and UE on same machine](L2NFAPI_S1.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
[oai softmodem features](FEATURE_SET.md)
|
||||||
|
|
||||||
|
[oai softmodem build procedure](BUILD.md)
|
||||||
|
|
||||||
@@ -0,0 +1,304 @@
|
|||||||
|
<table style="border-collapse: collapse; border: none;">
|
||||||
|
<tr style="border-collapse: collapse; border: none;">
|
||||||
|
<td style="border-collapse: collapse; border: none;">
|
||||||
|
<a href="http://www.openairinterface.org/">
|
||||||
|
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||||
|
</img>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||||
|
<b><font size = "5">L2 nFAPI Simulator (with S1 / same machine deployment)</font></b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
## Table of Contents ##
|
||||||
|
|
||||||
|
1. [Environment](#1-environment)
|
||||||
|
2. [Prepare the EPC](#2-prepare-the-epc)
|
||||||
|
3. [Retrieve the OAI eNB-UE source code](#3-retrieve-the-oai-enb-ue-source-code)
|
||||||
|
4. [Setup of the USIM information in UE folder](#4-setup-of-the-usim-information-in-ue-folder)
|
||||||
|
5. [Setup of the Configuration files](#5-setup-of-the-configuration-files)
|
||||||
|
1. [The eNB Configuration file](#51-the-enb-configuration-file)
|
||||||
|
2. [The UE Configuration file](#52-the-ue-configuration-file)
|
||||||
|
6. [Bring Up a second loopback interface](#6-bring-up-a-second-loopback-interface)
|
||||||
|
7. [Build the eNB](#7-build-the-enb)
|
||||||
|
8. [Build the UE](#8-build-the-ue)
|
||||||
|
9. [Initialize the NAS UE Layer](#9-initialize-the-nas-ue-layer)
|
||||||
|
10. [Start the eNB](#10-start-the-enb)
|
||||||
|
11. [Start the UE](#11-start-the-ue)
|
||||||
|
12. [Test with ping](#12-test-with-ping)
|
||||||
|
13. [Limitations](#13-limitations)
|
||||||
|
|
||||||
|
# 1. Environment #
|
||||||
|
|
||||||
|
2 servers are used in this deployment. You can use Virtual Machines instead of each server; like it is done in the CI process.
|
||||||
|
|
||||||
|
* Machine A contains the EPC.
|
||||||
|
* Machine B contains the OAI eNB and the OAI UE(s)
|
||||||
|
|
||||||
|
Example of L2 nFAPI Simulator testing environment:
|
||||||
|
|
||||||
|
<img src="../l2-nfapi-simulator/L2-sim-single-server-deployment.png" alt="" border=3>
|
||||||
|
|
||||||
|
Note that the IP addresses are indicative and need to be adapted to your environment.
|
||||||
|
|
||||||
|
# 2. Prepare the EPC #
|
||||||
|
|
||||||
|
Create the environment for the EPC and register all **USIM** information into the **HSS** database.
|
||||||
|
|
||||||
|
If you are using OAI-EPC ([see on GitHub](https://github.com/OPENAIRINTERFACE/openair-cn)), build **HSS/MME/SPGW** and create config files.
|
||||||
|
|
||||||
|
# 3. Retrieve the OAI eNB-UE source code #
|
||||||
|
|
||||||
|
The eNB and the UE executables will compiled into 2 separate folders on the same machine `B`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ enb_folder
|
||||||
|
$ cd enb_folder
|
||||||
|
$ git checkout -f v1.0.0
|
||||||
|
$ cd ..
|
||||||
|
$ cp -Rf enb_folder ue_folder
|
||||||
|
```
|
||||||
|
|
||||||
|
# 4. Setup of the USIM information in UE folder #
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ cd ue_folder
|
||||||
|
# Edit openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf with your preferred editor
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit the USIM information within this file in order to match the HSS database. They **HAVE TO** match:
|
||||||
|
|
||||||
|
* PLMN+MSIN and IMSI of users table of HSS database **SHALL** be the same.
|
||||||
|
* OPC of this file and OPC of users table of HSS database **SHALL** be the same.
|
||||||
|
* USIM_API_K of this file and the key of users table of HSS database **SHALL** be the same.
|
||||||
|
|
||||||
|
When testing multiple UEs, it is necessary to add other UEs information like described below for 2 Users. Only UE0 (first UE) information is written in the original file.
|
||||||
|
|
||||||
|
```
|
||||||
|
UE0:
|
||||||
|
{
|
||||||
|
USER: {
|
||||||
|
IMEI="356113022094149";
|
||||||
|
MANUFACTURER="EURECOM";
|
||||||
|
MODEL="LTE Android PC";
|
||||||
|
PIN="0000";
|
||||||
|
};
|
||||||
|
|
||||||
|
SIM: {
|
||||||
|
MSIN="0000000001"; // <-- Modify here
|
||||||
|
USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
|
||||||
|
OPC="e734f8734007d6c5ce7a0508809e7e9c";
|
||||||
|
MSISDN="33611123456";
|
||||||
|
};
|
||||||
|
...
|
||||||
|
};
|
||||||
|
// Copy the UE0 and edit
|
||||||
|
UE1: // <- Edit here
|
||||||
|
{
|
||||||
|
USER: {
|
||||||
|
IMEI="356113022094149";
|
||||||
|
MANUFACTURER="EURECOM";
|
||||||
|
MODEL="LTE Android PC";
|
||||||
|
PIN="0000";
|
||||||
|
};
|
||||||
|
|
||||||
|
SIM: {
|
||||||
|
MSIN="0000000002"; // <-- Modify here
|
||||||
|
USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
|
||||||
|
OPC="e734f8734007d6c5ce7a0508809e7e9c";
|
||||||
|
MSISDN="33611123456";
|
||||||
|
};
|
||||||
|
...
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
You can repeat the operation for as many users you want to test with.
|
||||||
|
|
||||||
|
# 5. Setup of the Configuration files #
|
||||||
|
|
||||||
|
**CAUTION: both proposed configuration files resides in the ci-scripts realm. You can copy them but you CANNOT push any modification on these 2 files as part of an MR without informing the CI team.**
|
||||||
|
|
||||||
|
## 5.1. The eNB Configuration file ##
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ cd enb_folder
|
||||||
|
# Edit ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf with your preferred editor
|
||||||
|
```
|
||||||
|
|
||||||
|
First verify the nFAPI interface setup on the 2nd loopback interface.
|
||||||
|
|
||||||
|
```
|
||||||
|
MACRLCs = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
local_s_if_name = "lo:"; // <-- HERE
|
||||||
|
remote_s_address = "127.0.0.1"; // <-- HERE
|
||||||
|
local_s_address = "127.0.0.2"; // <-- HERE
|
||||||
|
local_s_portc = 50001;
|
||||||
|
remote_s_portc = 50000;
|
||||||
|
local_s_portd = 50011;
|
||||||
|
remote_s_portd = 50010;
|
||||||
|
tr_s_preference = "nfapi";
|
||||||
|
tr_n_preference = "local_RRC";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are testing more than 16 UEs, a proper setting on the RUs is necessary. **Note that this part is NOT present in the original configuration file**.
|
||||||
|
|
||||||
|
```
|
||||||
|
RUs = (
|
||||||
|
{
|
||||||
|
local_rf = "yes"
|
||||||
|
nb_tx = 1
|
||||||
|
nb_rx = 1
|
||||||
|
att_tx = 20
|
||||||
|
att_rx = 0;
|
||||||
|
bands = [38];
|
||||||
|
max_pdschReferenceSignalPower = -23;
|
||||||
|
max_rxgain = 116;
|
||||||
|
eNB_instances = [0];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
Last, the S1 interface shall be properly set.
|
||||||
|
|
||||||
|
```
|
||||||
|
////////// MME parameters:
|
||||||
|
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; // replace with 192.168.10.20
|
||||||
|
ipv6 = "192:168:30::17";
|
||||||
|
active = "yes";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3"; // replace with the proper interface name
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; // replace with 192.168.10.10
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1U = "ens3"; // replace with the proper interface name
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; // replace with 192.168.10.10
|
||||||
|
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
|
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; // replace with 192.168.10.10
|
||||||
|
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||||
|
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5.2. The UE Configuration file ##
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ cd ue_folder
|
||||||
|
# Edit ci-scripts/conf_files/ue.nfapi.conf with your preferred editor
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify the nFAPI interface setup on the loopback interface.
|
||||||
|
|
||||||
|
```
|
||||||
|
L1s = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_n_preference = "nfapi";
|
||||||
|
local_n_if_name = "lo"; // <- HERE
|
||||||
|
remote_n_address = "127.0.0.2"; // <- HERE
|
||||||
|
local_n_address = "127.0.0.1"; // <- HERE
|
||||||
|
local_n_portc = 50000;
|
||||||
|
remote_n_portc = 50001;
|
||||||
|
local_n_portd = 50010;
|
||||||
|
remote_n_portd = 50011;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
# 6. Bring Up a second loopback interface #
|
||||||
|
|
||||||
|
A second loopback interface is used to connect the eNB and the UEs.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
|
||||||
|
```
|
||||||
|
|
||||||
|
# 7. [Build OAI UE and eNodeB](BUILD.md) #
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 8. Initialize the NAS UE Layer #
|
||||||
|
|
||||||
|
Start the EPC on machine `A`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineA
|
||||||
|
# Start the EPC
|
||||||
|
```
|
||||||
|
|
||||||
|
# 9. Start the eNB #
|
||||||
|
|
||||||
|
In the first terminal (the one you used to build the eNB):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ cd enb_folder/cmake_targets
|
||||||
|
$ sudo -E ./lte_build_oai/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf > enb.log 2>&1
|
||||||
|
```
|
||||||
|
|
||||||
|
If you don't use redirection, you can test but many logs are printed on the console and this may affect performance of the L2-nFAPI simulator.
|
||||||
|
|
||||||
|
We do recommend the redirection in steady mode once your setup is correct.
|
||||||
|
|
||||||
|
# 10. Start the UE #
|
||||||
|
|
||||||
|
In the second terminal (the one you used to build the UE):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineB
|
||||||
|
$ cd ue_folder/cmake_targets
|
||||||
|
# Test 64 UEs, 64 threads in FDD mode
|
||||||
|
$ sudo -E ./lte_build_oai/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums-ue-thread 64 > ue.log 2>&1
|
||||||
|
# Test 64 UEs, 64 threads in TDD mode
|
||||||
|
$ sudo -E ./lte_build_oai/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums-ue-thread 64 -T 1 > ue.log 2>&1
|
||||||
|
# The "-T 1" option means TDD config
|
||||||
|
```
|
||||||
|
|
||||||
|
- The number of UEs can set by using `--num-ues` option and the maximum UE number is 255 (with the `--mu*` options, otherwise 16).
|
||||||
|
- The umber of threads can set with the `--nums-ue-thread`. This number **SHALL NOT** be greater than the number of UEs.
|
||||||
|
- How many UE that can be tested depends on hardware (server , PC, etc) performance in your environment.
|
||||||
|
|
||||||
|
# 11. Test with ping #
|
||||||
|
|
||||||
|
In a third terminal, after around 10 seconds, the UE(s) shall be connected to the eNB:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh sudousername@machineA
|
||||||
|
# Ping UE0 IP address based on the EPC pool used: in this example:
|
||||||
|
$ ping -c 20 192.168.200.2
|
||||||
|
# Ping UE1 IP address based on the EPC pool used: in this example:
|
||||||
|
$ ping -c 20 192.168.200.4
|
||||||
|
```
|
||||||
|
|
||||||
|
# 12. Limitations #
|
||||||
|
|
||||||
|
Testing on the CI process is currently limited at time of writing. Improvements will be made soon.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
[oai softmodem features](FEATURE_SET.md)
|
||||||
|
|
||||||
|
[oai softmodem build procedure](BUILD.md)
|
||||||
|
|
||||||
|
[L2 nfapi simulator](L2NFAPI.md)
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# Running OAI softmodem
|
||||||
|
|
||||||
|
After you have [built the softmodem executables](BUILD.md) you can set your default directory to the build directory `cmake_targets/lte_build_oai/build/` and start testing some use cases. Below, the description of the different oai functionalities should help you choose the oai configuration that suits your need.
|
||||||
|
|
||||||
|
## rf simulator
|
||||||
|
|
||||||
|
The rf simulator is a oai device replacing the radio heads (for example the USRP device). It allows connecting the oai UE and the oai eNodeB through a network interface carrying the time-domain samples, getting rid of over the air unpredictable perturbations. This is the ideal tool to check signal processing algorithms and protocols implementation.
|
||||||
|
|
||||||
|
It is planned to enhance this simulator with the following functionalities:
|
||||||
|
|
||||||
|
- Support for multiple UE connections,each UE being a `lte-uesoftmodem` instance.
|
||||||
|
- Support for multiple eNodeB for hand-over tests
|
||||||
|
- Support for channel modeling
|
||||||
|
|
||||||
|
This is an easy use-case to setup and test, as no specific hardware is required. The [rfsimulator page](../targets/ARCH/rfsimulator/README.md ) contains the detailed documentation.
|
||||||
|
|
||||||
|
## l2 nfapi simulator
|
||||||
|
|
||||||
|
This simulator connects a eNodeB and UEs through a nfapi interface, short-cutting the L1 layer. The objective of this simulator is to allow multi UEs simulation, with a large number of UEs (ideally up to 255 ) .Here to ease the platform setup, UEs are simulated via a single `lte-uesoftmodem` instance. Today the CI tests just with one UE and architecture has to be reviewed to allow a number of UE above about 16. This work is on-going.
|
||||||
|
|
||||||
|
As for the rf simulator, no specific hardware is required. The [L2 nfapi simlator page](L2NFAPI.md) contains the detailed documentation.
|
||||||
|
|
||||||
|
## l1 simulator
|
||||||
|
|
||||||
|
The l1 simulator is using the ethernet fronthaul protocol, as used to connect a RRU and a RAU to connect UEs and a eNodeB. UEs are simulated in a single `lte-uesoftmodem` process, as for the nfapi simulator.
|
||||||
|
|
||||||
|
The [L1 simulator page](L1SIM.md) contains the detailed documentation.
|
||||||
|
|
||||||
|
## noS1 mode
|
||||||
|
|
||||||
|
The noS1 mode is now available via the `--noS1`command line option. It can be used with simulators, described above, or when using oai with true RF boards. Only the oai UE can be connected to the oai eNodeB in noS1 mode.
|
||||||
|
|
||||||
|
By default the noS1 mode is using linux tun interfaces to send or receive ip packets to/from the linux ip stack. using the `--nokrnmod 0`option you can enforce kernel modules instead of tun.
|
||||||
|
|
||||||
|
noS1 code has been revisited, it has been tested with the rf simulator, and tun interfaces. More tests are on going and CI will soon include noS1 tests.
|
||||||
|
|
||||||
|
## Running with a true radio head
|
||||||
|
|
||||||
|
oai supports [number of deployment](FEATURE_SET.md) model, the following are tested in the CI:
|
||||||
|
|
||||||
|
1. [Monolithic eNodeB](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/HowToConnectCOTSUEwithOAIeNBNew) where the whole signal processing is performed in a single process
|
||||||
|
2. if4p5 mode, where frequency domain samples are carried over ethernet, from the RRU which implement part of L1(FFT,IFFT,part of PRACH), to a RAU
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
[oai softmodem features](FEATURE_SET.md)
|
||||||
|
|
||||||
|
[oai softmodem build procedure](BUILD.md)
|
||||||
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -4437,8 +4437,8 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
|
|||||||
pull16(ppReadPackedMsg, &index, end)))
|
pull16(ppReadPackedMsg, &index, end)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pdu->pdu_length = length;
|
pdu->pdu_length = length;
|
||||||
pdu->pdu_index = index;
|
pdu->pdu_index = index;
|
||||||
|
|
||||||
|
|
||||||
// TODO : May need to rethink this bit
|
// TODO : May need to rethink this bit
|
||||||
|
|||||||
@@ -83,4 +83,4 @@ void free_lte_top(void) {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@}*/
|
* @}*/
|
||||||
|
|||||||
@@ -965,3 +965,4 @@ void install_schedule_handlers(IF_Module_t *if_inst)
|
|||||||
if_inst->PHY_config_req = phy_config_request;
|
if_inst->PHY_config_req = phy_config_request;
|
||||||
if_inst->schedule_response = schedule_response;
|
if_inst->schedule_response = schedule_response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -567,6 +567,31 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PHY_ABSTRACTION
|
||||||
|
#include "SIMULATION/TOOLS/defs.h"
|
||||||
|
#include "SIMULATION/RF/defs.h"
|
||||||
|
//extern channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
|
||||||
|
|
||||||
|
int lte_sync_time_eNB_emul(PHY_VARS_eNB *phy_vars_eNB,
|
||||||
|
uint8_t sect_id,
|
||||||
|
int32_t *sync_val)
|
||||||
|
{
|
||||||
|
|
||||||
|
uint8_t UE_id;
|
||||||
|
uint8_t CC_id = phy_vars_eNB->CC_id;
|
||||||
|
|
||||||
|
LOG_E(PHY,"[PHY] EMUL lte_sync_time_eNB_emul eNB %d, sect_id %d\n",phy_vars_eNB->Mod_id,sect_id);
|
||||||
|
*sync_val = 0;
|
||||||
|
|
||||||
|
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||||
|
//LOG_E(PHY,"[PHY] EMUL : eNB %d checking UE %d (PRACH %d) PL %d dB\n",phy_vars_eNB->Mod_id,UE_id,PHY_vars_UE_g[UE_id]->generate_prach,UE2eNB[UE_id][phy_vars_eNB->Mod_id]->path_loss_dB);
|
||||||
|
if ((PHY_vars_UE_g[UE_id][CC_id]->generate_prach == 1) && (phy_vars_eNB->Mod_id == (UE_id % NB_eNB_INST))) {
|
||||||
|
*sync_val = 1;
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -2288,6 +2288,3 @@ void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, L1_rxtx_proc_t * proc, mDCI_ALLOC_t *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
if (LOG_DEBUGFLAG(PRACH)){
|
if (LOG_DEBUGFLAG(PRACH)){
|
||||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
||||||
br_flag,ce_level,eNB->proc.frame_prach,subframe,
|
br_flag,ce_level,eNB->proc.frame_prach,subframe,
|
||||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
||||||
prach_ConfigIndex,rootSequenceIndex,
|
prach_ConfigIndex,rootSequenceIndex,
|
||||||
eNB->prach_vars_br.repetition_number[ce_level],
|
eNB->prach_vars_br.repetition_number[ce_level],
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
//#define DEBUG_DCI
|
//#define DEBUG_DCI
|
||||||
|
|
||||||
|
|
||||||
#include "../LTE_TRANSPORT/dci_tools_common_extern.h"
|
#include "../LTE_TRANSPORT/dci_tools_common_extern.h"
|
||||||
#include "../LTE_TRANSPORT/transport_proto.h"
|
#include "../LTE_TRANSPORT/transport_proto.h"
|
||||||
#include "transport_proto_ue.h"
|
#include "transport_proto_ue.h"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB) {
|
|||||||
else if (Ns==4)
|
else if (Ns==4)
|
||||||
ue->PO = (fp->frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1)));
|
ue->PO = (fp->frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1)));
|
||||||
else
|
else
|
||||||
AssertFatal(1==0,"init_ue_paging_info: Ns is %d\n",Ns);
|
AssertFatal(1==0,"init_ue_paging_info: Ns is %u\n",Ns);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,6 +312,10 @@ typedef struct RU_t_s{
|
|||||||
LTE_DL_FRAME_PARMS frame_parms;
|
LTE_DL_FRAME_PARMS frame_parms;
|
||||||
///timing offset used in TDD
|
///timing offset used in TDD
|
||||||
int N_TA_offset;
|
int N_TA_offset;
|
||||||
|
/// SF extension used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)
|
||||||
|
int sf_extension;
|
||||||
|
/// "end of burst delay" used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)
|
||||||
|
int end_of_burst_delay;
|
||||||
/// RF device descriptor
|
/// RF device descriptor
|
||||||
openair0_device rfdevice;
|
openair0_device rfdevice;
|
||||||
/// HW configuration
|
/// HW configuration
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ void dumpVarArray(varArray_t *input) {
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
|
void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
|
||||||
reset_meas(res);
|
reset_meas(res);
|
||||||
for (int i=0; i<RX_NB_TH; i++) {
|
for (int i=0; i<RX_NB_TH; i++) {
|
||||||
res->diff+=src[i].diff;
|
res->diff+=src[i].diff;
|
||||||
res->diff_square+=src[i].diff_square;
|
res->diff_square+=src[i].diff_square;
|
||||||
@@ -36,7 +36,7 @@ void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
|
|||||||
res->p_time=src[lastActive].p_time;
|
res->p_time=src[lastActive].p_time;
|
||||||
}
|
}
|
||||||
void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastActive) {
|
void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastActive) {
|
||||||
reset_meas(res);
|
reset_meas(res);
|
||||||
for (int i=0; i<RX_NB_TH; i++) {
|
for (int i=0; i<RX_NB_TH; i++) {
|
||||||
res->diff+=src[i][0].diff+src[i][1].diff;
|
res->diff+=src[i][0].diff+src[i][1].diff;
|
||||||
res->diff_square+=src[i][0].diff_square+src[i][1].diff_square;
|
res->diff_square+=src[i][0].diff_square+src[i][1].diff_square;
|
||||||
|
|||||||
@@ -3167,7 +3167,7 @@ PMI_FEEDBACK:
|
|||||||
|
|
||||||
if (n_frames==1)
|
if (n_frames==1)
|
||||||
printf("DCI misdetection trial %u\n",trials);
|
printf("DCI misdetection trial %u\n",trials);
|
||||||
>>>>>>> new set of cppcheck fixes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (i=1;i<=round;i++)
|
// for (i=1;i<=round;i++)
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* F1AP -> SCTP */
|
||||||
|
MESSAGE_DEF(F1AP_CU_SCTP_REQ , MESSAGE_PRIORITY_MED, f1ap_cu_setup_req_t , f1ap_cu_setup_req)
|
||||||
|
|
||||||
|
/* eNB_DU application layer -> F1AP messages or CU F1AP -> RRC*/
|
||||||
|
MESSAGE_DEF(F1AP_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_setup_req_t , f1ap_setup_req)
|
||||||
|
|
||||||
|
/* F1AP -> eNB_DU or eNB_CU_RRC -> F1AP application layer messages */
|
||||||
|
MESSAGE_DEF(F1AP_SETUP_RESP , MESSAGE_PRIORITY_MED, f1ap_setup_resp_t , f1ap_setup_resp)
|
||||||
|
MESSAGE_DEF(F1AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED, f1ap_setup_failure_t , f1ap_setup_failure)
|
||||||
|
|
||||||
|
/* MAC -> F1AP messages */
|
||||||
|
MESSAGE_DEF(F1AP_INITIAL_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_initial_ul_rrc_message_t , f1ap_initial_ul_rrc_message)
|
||||||
|
MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_rrc_message_t , f1ap_ul_rrc_message)
|
||||||
|
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_RESP, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_resp_t, f1ap_initial_context_setup_resp)
|
||||||
|
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_FAILURE, MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_failure_t, f1ap_initial_context_setup_failure)
|
||||||
|
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_req_t, f1ap_ue_context_release_req)
|
||||||
|
MESSAGE_DEF(F1AP_UE_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, f1ap_ue_context_release_cmd_t, f1ap_ue_context_release_cmd)
|
||||||
|
|
||||||
|
|
||||||
|
/* RRC -> F1AP messages */
|
||||||
|
MESSAGE_DEF(F1AP_DL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_dl_rrc_message_t , f1ap_dl_rrc_message )
|
||||||
|
//MESSAGE_DEF(F1AP_INITIAL_CONTEXT_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_initial_context_setup_req_t , f1ap_initial_context_setup_req )
|
||||||
|
MESSAGE_DEF(F1AP_UE_CONTEXT_SETUP_REQ, MESSAGE_PRIORITY_MED, f1ap_ue_context_setup_req_t, f1ap_ue_context_setup_req)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,308 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef F1AP_MESSAGES_TYPES_H_
|
||||||
|
#define F1AP_MESSAGES_TYPES_H_
|
||||||
|
|
||||||
|
#include "rlc.h"
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------//
|
||||||
|
// Defines to access message fields.
|
||||||
|
|
||||||
|
#define F1AP_CU_SCTP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_cu_sctp_req
|
||||||
|
|
||||||
|
#define F1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_req
|
||||||
|
#define F1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp
|
||||||
|
#define F1AP_SETUP_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_failure
|
||||||
|
|
||||||
|
#define F1AP_INITIAL_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_initial_ul_rrc_message
|
||||||
|
#define F1AP_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ul_rrc_message
|
||||||
|
#define F1AP_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req
|
||||||
|
#define F1AP_UE_CONTEXT_RELEASE_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_resp
|
||||||
|
#define F1AP_UE_CONTEXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_resp
|
||||||
|
#define F1AP_UE_CONTEXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_fail
|
||||||
|
|
||||||
|
#define F1AP_DL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_dl_rrc_message
|
||||||
|
#define F1AP_UE_CONTEXT_RELEASE_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req
|
||||||
|
#define F1AP_UE_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_release_req
|
||||||
|
#define F1AP_UE_CONTEXT_MODIFICATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_modification_req
|
||||||
|
|
||||||
|
/* Length of the transport layer address string
|
||||||
|
* 160 bits / 8 bits by char.
|
||||||
|
*/
|
||||||
|
#define F1AP_TRANSPORT_LAYER_ADDRESS_SIZE (160 / 8)
|
||||||
|
|
||||||
|
#define F1AP_MAX_NB_CU_IP_ADDRESS 10
|
||||||
|
|
||||||
|
// Note this should be 512 from maxval in 38.473
|
||||||
|
#define F1AP_MAX_NB_CELLS 2
|
||||||
|
|
||||||
|
typedef struct f1ap_net_ip_address_s {
|
||||||
|
unsigned ipv4:1;
|
||||||
|
unsigned ipv6:1;
|
||||||
|
char ipv4_address[16];
|
||||||
|
char ipv6_address[46];
|
||||||
|
} f1ap_net_ip_address_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_cu_setup_req_s {
|
||||||
|
//
|
||||||
|
} f1ap_cu_setup_req_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_setup_req_s {
|
||||||
|
|
||||||
|
// Midhaul networking parameters
|
||||||
|
|
||||||
|
/* Connexion id used between SCTP/F1AP */
|
||||||
|
uint16_t cnx_id;
|
||||||
|
|
||||||
|
/* SCTP association id */
|
||||||
|
int32_t assoc_id;
|
||||||
|
|
||||||
|
/* The eNB IP address to bind */
|
||||||
|
f1ap_net_ip_address_t CU_f1_ip_address;
|
||||||
|
f1ap_net_ip_address_t DU_f1_ip_address;
|
||||||
|
|
||||||
|
/* Number of SCTP streams used for a mme association */
|
||||||
|
uint16_t sctp_in_streams;
|
||||||
|
uint16_t sctp_out_streams;
|
||||||
|
|
||||||
|
uint16_t default_sctp_stream_id;
|
||||||
|
|
||||||
|
// F1_Setup_Req payload
|
||||||
|
uint64_t gNB_DU_id;
|
||||||
|
char *gNB_DU_name;
|
||||||
|
|
||||||
|
/* The type of the cell */
|
||||||
|
enum cell_type_e cell_type;
|
||||||
|
|
||||||
|
/// number of DU cells available
|
||||||
|
uint16_t num_cells_available; //0< num_cells_available <= 512;
|
||||||
|
|
||||||
|
// Served Cell Information
|
||||||
|
/* Tracking area code */
|
||||||
|
uint16_t tac[F1AP_MAX_NB_CELLS];
|
||||||
|
|
||||||
|
/* Mobile Country Codes
|
||||||
|
* Mobile Network Codes
|
||||||
|
*/
|
||||||
|
uint16_t mcc[F1AP_MAX_NB_CELLS];//[6];
|
||||||
|
uint16_t mnc[F1AP_MAX_NB_CELLS];//[6];
|
||||||
|
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];//[6];
|
||||||
|
|
||||||
|
// NR Global Cell Id
|
||||||
|
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
|
||||||
|
// NR Physical Cell Ids
|
||||||
|
uint16_t nr_pci[F1AP_MAX_NB_CELLS];
|
||||||
|
// Number of slide support items (max 16, could be increased to as much as 1024)
|
||||||
|
uint16_t num_ssi[F1AP_MAX_NB_CELLS];//[6];
|
||||||
|
uint8_t sst[F1AP_MAX_NB_CELLS];//[16][6];
|
||||||
|
uint8_t sd[F1AP_MAX_NB_CELLS];//[16][6];
|
||||||
|
// fdd_flag = 1 means FDD, 0 means TDD
|
||||||
|
int fdd_flag;
|
||||||
|
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint32_t ul_nr_arfcn;
|
||||||
|
uint8_t ul_scs;
|
||||||
|
uint8_t ul_nrb;
|
||||||
|
|
||||||
|
uint32_t dl_nr_arfcn;
|
||||||
|
uint8_t dl_scs;
|
||||||
|
uint8_t dl_nrb;
|
||||||
|
|
||||||
|
uint32_t sul_active;
|
||||||
|
uint32_t sul_nr_arfcn;
|
||||||
|
uint8_t sul_scs;
|
||||||
|
uint8_t sul_nrb;
|
||||||
|
|
||||||
|
uint8_t ul_num_frequency_bands;
|
||||||
|
uint16_t ul_nr_band[32];
|
||||||
|
uint8_t ul_num_sul_frequency_bands;
|
||||||
|
uint16_t ul_nr_sul_band[32];
|
||||||
|
|
||||||
|
uint8_t dl_num_frequency_bands;
|
||||||
|
uint16_t dl_nr_band[32];
|
||||||
|
uint8_t dl_num_sul_frequency_bands;
|
||||||
|
uint16_t dl_nr_sul_band[32];
|
||||||
|
} fdd;
|
||||||
|
struct {
|
||||||
|
|
||||||
|
uint32_t nr_arfcn;
|
||||||
|
uint8_t scs;
|
||||||
|
uint8_t nrb;
|
||||||
|
|
||||||
|
uint32_t sul_active;
|
||||||
|
uint32_t sul_nr_arfcn;
|
||||||
|
uint8_t sul_scs;
|
||||||
|
uint8_t sul_nrb;
|
||||||
|
|
||||||
|
uint8_t num_frequency_bands;
|
||||||
|
uint16_t nr_band[32];
|
||||||
|
uint8_t num_sul_frequency_bands;
|
||||||
|
uint16_t nr_sul_band[32];
|
||||||
|
|
||||||
|
} tdd;
|
||||||
|
} nr_mode_info[F1AP_MAX_NB_CELLS];
|
||||||
|
|
||||||
|
char *measurement_timing_information[F1AP_MAX_NB_CELLS];
|
||||||
|
uint8_t ranac[F1AP_MAX_NB_CELLS];
|
||||||
|
|
||||||
|
// System Information
|
||||||
|
uint8_t *mib[F1AP_MAX_NB_CELLS];
|
||||||
|
int mib_length[F1AP_MAX_NB_CELLS];
|
||||||
|
uint8_t *sib1[F1AP_MAX_NB_CELLS];
|
||||||
|
int sib1_length[F1AP_MAX_NB_CELLS];
|
||||||
|
|
||||||
|
|
||||||
|
} f1ap_setup_req_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_setup_resp_s {
|
||||||
|
/* Connexion id used between SCTP/F1AP */
|
||||||
|
uint16_t cnx_id;
|
||||||
|
|
||||||
|
/* SCTP association id */
|
||||||
|
int32_t assoc_id;
|
||||||
|
|
||||||
|
/* Number of SCTP streams used for a mme association */
|
||||||
|
uint16_t sctp_in_streams;
|
||||||
|
uint16_t sctp_out_streams;
|
||||||
|
|
||||||
|
/// string holding gNB_CU_name
|
||||||
|
char *gNB_CU_name;
|
||||||
|
/// number of DU cells to activate
|
||||||
|
uint16_t num_cells_to_activate; //0< num_cells_to_activate <= 512;
|
||||||
|
/// mcc of DU cells
|
||||||
|
uint16_t mcc[F1AP_MAX_NB_CELLS];
|
||||||
|
/// mnc of DU cells
|
||||||
|
uint16_t mnc[F1AP_MAX_NB_CELLS];
|
||||||
|
/// mnc digit length of DU cells
|
||||||
|
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];
|
||||||
|
// NR Global Cell Id
|
||||||
|
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
|
||||||
|
/// NRPCI
|
||||||
|
uint16_t nrpci[F1AP_MAX_NB_CELLS];
|
||||||
|
/// num SI messages per DU cell
|
||||||
|
uint8_t num_SI[F1AP_MAX_NB_CELLS];
|
||||||
|
/// SI message containers (up to 21 messages per cell)
|
||||||
|
uint8_t *SI_container[F1AP_MAX_NB_CELLS][21];
|
||||||
|
int SI_container_length[F1AP_MAX_NB_CELLS][21];
|
||||||
|
} f1ap_setup_resp_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_setup_failure_s {
|
||||||
|
uint16_t cause;
|
||||||
|
uint16_t time_to_wait;
|
||||||
|
uint16_t criticality_diagnostics;
|
||||||
|
} f1ap_setup_failure_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_dl_rrc_message_s {
|
||||||
|
|
||||||
|
uint32_t gNB_CU_ue_id;
|
||||||
|
uint32_t gNB_DU_ue_id;
|
||||||
|
uint32_t old_gNB_DU_ue_id;
|
||||||
|
uint16_t rnti;
|
||||||
|
uint8_t srb_id;
|
||||||
|
uint8_t execute_duplication;
|
||||||
|
uint8_t *rrc_container;
|
||||||
|
int rrc_container_length;
|
||||||
|
union {
|
||||||
|
// both map 0..255 => 1..256
|
||||||
|
uint8_t en_dc;
|
||||||
|
uint8_t ngran;
|
||||||
|
} RAT_frequency_priority_information;
|
||||||
|
} f1ap_dl_rrc_message_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_initial_ul_rrc_message_s {
|
||||||
|
uint32_t gNB_DU_ue_id;
|
||||||
|
/// mcc of DU cell
|
||||||
|
uint16_t mcc;
|
||||||
|
/// mnc of DU cell
|
||||||
|
uint16_t mnc;
|
||||||
|
/// mnc digit length of DU cells
|
||||||
|
uint8_t mnc_digit_length;
|
||||||
|
/// nr cell id
|
||||||
|
uint64_t nr_cellid;
|
||||||
|
/// crnti
|
||||||
|
uint16_t crnti;
|
||||||
|
uint8_t *rrc_container;
|
||||||
|
int rrc_container_length;
|
||||||
|
uint8_t *du2cu_rrc_container;
|
||||||
|
int du2cu_rrc_container_length;
|
||||||
|
} f1ap_initial_ul_rrc_message_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_ul_rrc_message_s {
|
||||||
|
uint16_t rnti;
|
||||||
|
uint8_t srb_id;
|
||||||
|
uint8_t *rrc_container;
|
||||||
|
int rrc_container_length;
|
||||||
|
} f1ap_ul_rrc_message_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_up_tnl_s {
|
||||||
|
in_addr_t tl_address; // currently only IPv4 supported
|
||||||
|
uint32_t gtp_teid;
|
||||||
|
} f1ap_up_tnl_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_drb_to_be_setup_s {
|
||||||
|
uint8_t drb_id;
|
||||||
|
f1ap_up_tnl_t up_ul_tnl[2];
|
||||||
|
uint8_t up_ul_tnl_length;
|
||||||
|
rlc_mode_t rlc_mode;
|
||||||
|
} f1ap_drb_to_be_setup_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_ue_context_setup_req_s {
|
||||||
|
uint32_t gNB_CU_ue_id; // BK: need to replace by use from rnti
|
||||||
|
uint32_t *gNB_DU_ue_id;
|
||||||
|
uint16_t rnti;
|
||||||
|
// SpCell Info
|
||||||
|
uint16_t mcc;
|
||||||
|
uint16_t mnc;
|
||||||
|
uint8_t mnc_digit_length;
|
||||||
|
uint64_t nr_cellid;
|
||||||
|
uint8_t servCellIndex;
|
||||||
|
uint8_t *cellULConfigured;
|
||||||
|
uint32_t servCellId;
|
||||||
|
uint8_t *cu_to_du_rrc_information;
|
||||||
|
uint8_t cu_to_du_rrc_information_length;
|
||||||
|
f1ap_drb_to_be_setup_t *drbs_to_be_setup; // BK: need to replace by s1ap_initial_context_setup_req
|
||||||
|
uint8_t drbs_to_be_setup_length; // BK: need to replace by s1ap_initial_context_setup_req
|
||||||
|
s1ap_initial_context_setup_req_t *s1ap_initial_context_setup_req;
|
||||||
|
// coniatner for the rrc_eNB_generate_SecurityModeCommand message
|
||||||
|
uint8_t *rrc_container;
|
||||||
|
int rrc_container_length;
|
||||||
|
} f1ap_ue_context_setup_req_t;
|
||||||
|
|
||||||
|
typedef enum F1ap_Cause_e {
|
||||||
|
F1AP_CAUSE_NOTHING, /* No components present */
|
||||||
|
F1AP_CAUSE_RADIO_NETWORK,
|
||||||
|
F1AP_CAUSE_TRANSPORT,
|
||||||
|
F1AP_CAUSE_PROTOCOL,
|
||||||
|
F1AP_CAUSE_MISC,
|
||||||
|
} f1ap_Cause_t;
|
||||||
|
|
||||||
|
typedef struct f1ap_ue_context_release_s {
|
||||||
|
uint16_t rnti;
|
||||||
|
f1ap_Cause_t cause;
|
||||||
|
long cause_value;
|
||||||
|
uint8_t *rrc_container;
|
||||||
|
int rrc_container_length;
|
||||||
|
} f1ap_ue_context_release_req_t, f1ap_ue_context_release_cmd_t,
|
||||||
|
f1ap_ue_context_release_cplt_t;
|
||||||
|
|
||||||
|
#endif /* F1AP_MESSAGES_TYPES_H_ */
|
||||||
@@ -390,7 +390,7 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define IDLE 0
|
//#define IDLE 0
|
||||||
#define NEED_RADIO_CONFIG 3
|
#define NEED_RADIO_CONFIG 3
|
||||||
#define RADIO_CONFIG_TX 2
|
#define RADIO_CONFIG_TX 2
|
||||||
#define RADIO_CONFIG_OK 1
|
#define RADIO_CONFIG_OK 1
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "ral_messages_def.h"
|
#include "ral_messages_def.h"
|
||||||
#endif
|
#endif
|
||||||
#include "s1ap_messages_def.h"
|
#include "s1ap_messages_def.h"
|
||||||
|
#include "f1ap_messages_def.h"
|
||||||
#include "x2ap_messages_def.h"
|
#include "x2ap_messages_def.h"
|
||||||
#include "sctp_messages_def.h"
|
#include "sctp_messages_def.h"
|
||||||
#include "udp_messages_def.h"
|
#include "udp_messages_def.h"
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
#include "as_message.h"
|
#include "as_message.h"
|
||||||
#include "rrc_types.h"
|
#include "rrc_types.h"
|
||||||
#include "s1ap_messages_types.h"
|
#include "s1ap_messages_types.h"
|
||||||
#include "LTE_SystemInformationBlockType2.h"
|
#include "f1ap_messages_types.h"
|
||||||
|
#include "LTE_SystemInformationBlockType2.h"
|
||||||
#include "LTE_SL-OffsetIndicator-r12.h"
|
#include "LTE_SL-OffsetIndicator-r12.h"
|
||||||
#include "LTE_SubframeBitmapSL-r12.h"
|
#include "LTE_SubframeBitmapSL-r12.h"
|
||||||
#include "LTE_SL-CP-Len-r12.h"
|
#include "LTE_SL-CP-Len-r12.h"
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000)
|
|||||||
// GTP_V1U task
|
// GTP_V1U task
|
||||||
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000)
|
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000)
|
||||||
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
|
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
|
||||||
|
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200)
|
||||||
|
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200)
|
||||||
/// X2ap task, acts as both source and target
|
/// X2ap task, acts as both source and target
|
||||||
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
|
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
|
||||||
/// Sctp task (Used by both S1AP and X2AP)
|
/// Sctp task (Used by both S1AP and X2AP)
|
||||||
@@ -54,7 +56,7 @@ TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
|
|||||||
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
|
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
|
||||||
/// eNB Agent task
|
/// eNB Agent task
|
||||||
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
|
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
|
||||||
|
TASK_DEF(TASK_PROTO_AGENT, TASK_PRIORITY_MED, 200)
|
||||||
// UE tasks and sub-tasks:
|
// UE tasks and sub-tasks:
|
||||||
|
|
||||||
/// Radio Resource Control task
|
/// Radio Resource Control task
|
||||||
|
|||||||
@@ -40,9 +40,6 @@
|
|||||||
|
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
/*Flags showing if a mac agent has already been registered*/
|
|
||||||
unsigned int mac_agent_registered[NUM_MAX_ENB];
|
|
||||||
|
|
||||||
/*Array containing the Agent-MAC interfaces*/
|
/*Array containing the Agent-MAC interfaces*/
|
||||||
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
||||||
|
|
||||||
@@ -83,7 +80,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
|
|
||||||
for (i = 0; i < report_config->nr_ue; i++) {
|
for (i = 0; i < report_config->nr_ue; i++) {
|
||||||
|
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||||
|
|
||||||
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
||||||
ue_report[i]->has_rnti = 1;
|
ue_report[i]->has_rnti = 1;
|
||||||
@@ -102,12 +99,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ue_report[i]->bsr = elem;
|
ue_report[i]->bsr = elem;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_BSR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check flag for creation of PHR report */
|
/* Check flag for creation of PHR report */
|
||||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) {
|
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) {
|
||||||
ue_report[i]->phr = flexran_get_ue_phr (enb_id, UE_id); // eNB_UE_list->UE_template[UE_PCCID(enb_id,UE_id)][UE_id].phr_info;
|
ue_report[i]->phr = flexran_get_ue_phr (enb_id, UE_id); // eNB_UE_list->UE_template[UE_PCCID(enb_id,UE_id)][UE_id].phr_info;
|
||||||
ue_report[i]->has_phr = 1;
|
ue_report[i]->has_phr = 1;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +147,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
// Add RLC buffer status reports to the full report
|
// Add RLC buffer status reports to the full report
|
||||||
if (ue_report[i]->n_rlc_report > 0)
|
if (ue_report[i]->n_rlc_report > 0)
|
||||||
ue_report[i]->rlc_report = rlc_reports;
|
ue_report[i]->rlc_report = rlc_reports;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RLC_BS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +160,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
// found in stats_common.pb-c.h. See
|
// found in stats_common.pb-c.h. See
|
||||||
// flex_ce_type in FlexRAN specification
|
// flex_ce_type in FlexRAN specification
|
||||||
ue_report[i]->has_pending_mac_ces = 1;
|
ue_report[i]->has_pending_mac_ces = 1;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_CE_BS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check flag for creation of DL CQI report */
|
/* Check flag for creation of DL CQI report */
|
||||||
@@ -386,7 +385,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
dl_report->csi_report = csi_reports;
|
dl_report->csi_report = csi_reports;
|
||||||
//Add the DL CQI report to the stats report
|
//Add the DL CQI report to the stats report
|
||||||
ue_report[i]->dl_cqi_report = dl_report;
|
ue_report[i]->dl_cqi_report = dl_report;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_DL_CQI;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check flag for creation of paging buffer status report */
|
/* Check flag for creation of paging buffer status report */
|
||||||
@@ -431,6 +430,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
paging_report->paging_info = p_info;
|
paging_report->paging_info = p_info;
|
||||||
//Add the paging report to the UE report
|
//Add the paging report to the UE report
|
||||||
ue_report[i]->pbr = paging_report;
|
ue_report[i]->pbr = paging_report;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PBS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check flag for creation of UL CQI report */
|
/* Check flag for creation of UL CQI report */
|
||||||
@@ -502,7 +502,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
}
|
}
|
||||||
// Add full UL CQI report to the UE report
|
// Add full UL CQI report to the UE report
|
||||||
ue_report[i]->ul_cqi_report = full_ul_report;
|
ue_report[i]->ul_cqi_report = full_ul_report;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_UL_CQI;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
|
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
|
||||||
@@ -598,7 +598,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
|
|
||||||
|
|
||||||
ue_report[i]->mac_stats = macstats;
|
ue_report[i]->mac_stats = macstats;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -640,6 +640,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
|
ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
|
||||||
ni_report->has_p0_nominal_pucch = 1;
|
ni_report->has_p0_nominal_pucch = 1;
|
||||||
cell_report[i]->noise_inter_report = ni_report;
|
cell_report[i]->noise_inter_report = ni_report;
|
||||||
|
cell_report[i]->flags |= PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -660,14 +661,9 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg) {
|
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexStatsReply *reply) {
|
||||||
//TODO: Need to deallocate memory for the stats reply message
|
|
||||||
if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG)
|
|
||||||
goto error;
|
|
||||||
free(msg->stats_reply_msg->header);
|
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
Protocol__FlexStatsReply *reply = msg->stats_reply_msg;
|
|
||||||
Protocol__FlexDlCqiReport *dl_report;
|
Protocol__FlexDlCqiReport *dl_report;
|
||||||
Protocol__FlexUlCqiReport *ul_report;
|
Protocol__FlexUlCqiReport *ul_report;
|
||||||
Protocol__FlexPagingBufferReport *paging_report;
|
Protocol__FlexPagingBufferReport *paging_report;
|
||||||
@@ -758,25 +754,24 @@ int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg) {
|
|||||||
free(ul_report->pucch_dbm[j]);
|
free(ul_report->pucch_dbm[j]);
|
||||||
}
|
}
|
||||||
free(ul_report->pucch_dbm);
|
free(ul_report->pucch_dbm);
|
||||||
|
free(ul_report);
|
||||||
|
}
|
||||||
|
if (reply->ue_report[i]->flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
|
||||||
|
for (j = 0; j < reply->ue_report[i]->mac_stats->n_mac_sdus_dl; j++)
|
||||||
|
free(reply->ue_report[i]->mac_stats->mac_sdus_dl[j]);
|
||||||
|
free(reply->ue_report[i]->mac_stats->mac_sdus_dl);
|
||||||
|
free(reply->ue_report[i]->mac_stats);
|
||||||
}
|
}
|
||||||
free(reply->ue_report[i]);
|
|
||||||
}
|
}
|
||||||
free(reply->ue_report);
|
|
||||||
|
|
||||||
// Free memory for all Cell reports
|
// Free memory for all Cell reports
|
||||||
for (i = 0; i < reply->n_cell_report; i++) {
|
for (i = 0; i < reply->n_cell_report; i++) {
|
||||||
free(reply->cell_report[i]->noise_inter_report);
|
if (reply->cell_report[i]->flags & PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE) {
|
||||||
free(reply->cell_report[i]);
|
free(reply->cell_report[i]->noise_inter_report);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free(reply->cell_report);
|
|
||||||
|
|
||||||
free(reply);
|
|
||||||
free(msg);
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
|
||||||
//LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
|
int flexran_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
|
||||||
@@ -905,7 +900,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
|||||||
|
|
||||||
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
|
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
|
||||||
|
|
||||||
sf_trigger_msg->n_dl_info = flexran_get_num_ues(mod_id);
|
sf_trigger_msg->n_dl_info = flexran_get_mac_num_ues(mod_id);
|
||||||
|
|
||||||
Protocol__FlexDlInfo **dl_info = NULL;
|
Protocol__FlexDlInfo **dl_info = NULL;
|
||||||
|
|
||||||
@@ -921,9 +916,9 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
|||||||
dl_info[i] = malloc(sizeof(Protocol__FlexDlInfo));
|
dl_info[i] = malloc(sizeof(Protocol__FlexDlInfo));
|
||||||
if(dl_info[i] == NULL)
|
if(dl_info[i] == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||||
protocol__flex_dl_info__init(dl_info[i]);
|
protocol__flex_dl_info__init(dl_info[i]);
|
||||||
dl_info[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
dl_info[i]->rnti = flexran_get_mac_ue_crnti(mod_id, UE_id);
|
||||||
dl_info[i]->has_rnti = 1;
|
dl_info[i]->has_rnti = 1;
|
||||||
/*Fill in the right id of this round's HARQ process for this UE*/
|
/*Fill in the right id of this round's HARQ process for this UE*/
|
||||||
// uint8_t harq_id;
|
// uint8_t harq_id;
|
||||||
@@ -957,7 +952,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
|||||||
/* Fill in the number of UL reception status related info, based on the number of currently
|
/* Fill in the number of UL reception status related info, based on the number of currently
|
||||||
* transmitting UEs
|
* transmitting UEs
|
||||||
*/
|
*/
|
||||||
sf_trigger_msg->n_ul_info = flexran_get_num_ues(mod_id);
|
sf_trigger_msg->n_ul_info = flexran_get_mac_num_ues(mod_id);
|
||||||
|
|
||||||
Protocol__FlexUlInfo **ul_info = NULL;
|
Protocol__FlexUlInfo **ul_info = NULL;
|
||||||
|
|
||||||
@@ -972,9 +967,9 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
|||||||
goto error;
|
goto error;
|
||||||
protocol__flex_ul_info__init(ul_info[i]);
|
protocol__flex_ul_info__init(ul_info[i]);
|
||||||
|
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||||
|
|
||||||
ul_info[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
ul_info[i]->rnti = flexran_get_mac_ue_crnti(mod_id, UE_id);
|
||||||
ul_info[i]->has_rnti = 1;
|
ul_info[i]->has_rnti = 1;
|
||||||
/* Fill in the Tx power control command for this UE (if available),
|
/* Fill in the Tx power control command for this UE (if available),
|
||||||
* primary carrier */
|
* primary carrier */
|
||||||
@@ -1357,11 +1352,17 @@ void flexran_agent_send_sf_trigger(mid_t mod_id) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
int flexran_agent_register_mac_xface(mid_t mod_id)
|
||||||
if (mac_agent_registered[mod_id]) {
|
{
|
||||||
|
if (agent_mac_xface[mod_id]) {
|
||||||
LOG_E(MAC, "MAC agent for eNB %d is already registered\n", mod_id);
|
LOG_E(MAC, "MAC agent for eNB %d is already registered\n", mod_id);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
AGENT_MAC_xface *xface = malloc(sizeof(AGENT_MAC_xface));
|
||||||
|
if (!xface) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not allocate memory for MAC agent xface %d\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
//xface->agent_ctxt = &shared_ctxt[mod_id];
|
//xface->agent_ctxt = &shared_ctxt[mod_id];
|
||||||
xface->flexran_agent_send_sr_info = flexran_agent_send_sr_info;
|
xface->flexran_agent_send_sr_info = flexran_agent_send_sr_info;
|
||||||
@@ -1371,14 +1372,125 @@ int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
|||||||
|
|
||||||
xface->dl_scheduler_loaded_lib = NULL;
|
xface->dl_scheduler_loaded_lib = NULL;
|
||||||
xface->ul_scheduler_loaded_lib = NULL;
|
xface->ul_scheduler_loaded_lib = NULL;
|
||||||
mac_agent_registered[mod_id] = 1;
|
|
||||||
agent_mac_xface[mod_id] = xface;
|
agent_mac_xface[mod_id] = xface;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||||
|
Protocol__FlexCellConfig *conf) {
|
||||||
|
if (!conf->si_config) {
|
||||||
|
conf->si_config = malloc(sizeof(Protocol__FlexSiConfig));
|
||||||
|
if (conf->si_config)
|
||||||
|
protocol__flex_si_config__init(conf->si_config);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conf->si_config) {
|
||||||
|
conf->si_config->sfn = flexran_get_current_system_frame_num(mod_id);
|
||||||
|
conf->si_config->has_sfn = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get a pointer to the config which is maintained in the agent throughout
|
||||||
|
* its lifetime */
|
||||||
|
conf->slice_config = flexran_agent_get_slice_config(mod_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void flexran_agent_fill_mac_ue_config(mid_t mod_id, mid_t ue_id,
|
||||||
|
Protocol__FlexUeConfig *ue_conf)
|
||||||
|
{
|
||||||
|
if (ue_conf->has_rnti && ue_conf->rnti != flexran_get_mac_ue_crnti(mod_id, ue_id)) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "ue_config existing RNTI %x does not match MAC RNTI %x\n",
|
||||||
|
ue_conf->rnti, flexran_get_mac_ue_crnti(mod_id, ue_id));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ue_conf->rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
|
||||||
|
ue_conf->has_rnti = 1;
|
||||||
|
|
||||||
|
ue_conf->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, ue_id);
|
||||||
|
ue_conf->has_dl_slice_id = 1;
|
||||||
|
ue_conf->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, ue_id);
|
||||||
|
ue_conf->has_ul_slice_id = 1;
|
||||||
|
|
||||||
|
ue_conf->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id, ue_id);
|
||||||
|
ue_conf->has_ue_aggregated_max_bitrate_ul = 1;
|
||||||
|
|
||||||
|
ue_conf->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id, ue_id);
|
||||||
|
ue_conf->has_ue_aggregated_max_bitrate_dl = 1;
|
||||||
|
|
||||||
|
/* TODO update through RAN API */
|
||||||
|
//config->has_pcell_carrier_index = 1;
|
||||||
|
//config->pcell_carrier_index = UE_PCCID(mod_id, i);
|
||||||
|
|
||||||
|
//TODO: Set carrier aggregation support (boolean)
|
||||||
|
}
|
||||||
|
|
||||||
|
void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id,
|
||||||
|
Protocol__FlexLcUeConfig *lc_ue_conf)
|
||||||
|
{
|
||||||
|
lc_ue_conf->rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
|
||||||
|
lc_ue_conf->has_rnti = 1;
|
||||||
|
|
||||||
|
lc_ue_conf->n_lc_config = flexran_get_num_ue_lcs(mod_id, ue_id);
|
||||||
|
if (lc_ue_conf->n_lc_config == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Protocol__FlexLcConfig **lc_config =
|
||||||
|
calloc(lc_ue_conf->n_lc_config, sizeof(Protocol__FlexLcConfig *));
|
||||||
|
if (!lc_config) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not allocate memory for lc_config of UE %x\n", lc_ue_conf->rnti);
|
||||||
|
lc_ue_conf->n_lc_config = 0;
|
||||||
|
return; // can not allocate memory, skip rest
|
||||||
|
}
|
||||||
|
for (int j = 0; j < lc_ue_conf->n_lc_config; j++) {
|
||||||
|
lc_config[j] = malloc(sizeof(Protocol__FlexLcConfig));
|
||||||
|
if (!lc_config[j]) continue; // go over this error, try entry
|
||||||
|
protocol__flex_lc_config__init(lc_config[j]);
|
||||||
|
|
||||||
|
lc_config[j]->has_lcid = 1;
|
||||||
|
lc_config[j]->lcid = j+1;
|
||||||
|
|
||||||
|
const int lcg = flexran_get_lcg(mod_id, ue_id, j+1);
|
||||||
|
if (lcg >= 0 && lcg <= 3) {
|
||||||
|
lc_config[j]->has_lcg = 1;
|
||||||
|
lc_config[j]->lcg = flexran_get_lcg(mod_id, ue_id, j+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lc_config[j]->has_direction = 1;
|
||||||
|
lc_config[j]->direction = flexran_get_direction(ue_id, j+1);
|
||||||
|
//TODO: Bearer type. One of FLQBT_* values. Currently only default bearer supported
|
||||||
|
lc_config[j]->has_qos_bearer_type = 1;
|
||||||
|
lc_config[j]->qos_bearer_type = PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_NON_GBR;
|
||||||
|
|
||||||
|
//TODO: Set the QCI defined in TS 23.203, coded as defined in TS 36.413
|
||||||
|
// One less than the actual QCI value. Needs to be generalized
|
||||||
|
lc_config[j]->has_qci = 1;
|
||||||
|
lc_config[j]->qci = 1;
|
||||||
|
if (lc_config[j]->direction == PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_GBR) {
|
||||||
|
/* TODO all of the need to be taken from API */
|
||||||
|
//TODO: Set the max bitrate (UL)
|
||||||
|
lc_config[j]->has_e_rab_max_bitrate_ul = 0;
|
||||||
|
lc_config[j]->e_rab_max_bitrate_ul = 0;
|
||||||
|
//TODO: Set the max bitrate (DL)
|
||||||
|
lc_config[j]->has_e_rab_max_bitrate_dl = 0;
|
||||||
|
lc_config[j]->e_rab_max_bitrate_dl = 0;
|
||||||
|
//TODO: Set the guaranteed bitrate (UL)
|
||||||
|
lc_config[j]->has_e_rab_guaranteed_bitrate_ul = 0;
|
||||||
|
lc_config[j]->e_rab_guaranteed_bitrate_ul = 0;
|
||||||
|
//TODO: Set the guaranteed bitrate (DL)
|
||||||
|
lc_config[j]->has_e_rab_guaranteed_bitrate_dl = 0;
|
||||||
|
lc_config[j]->e_rab_guaranteed_bitrate_dl = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lc_ue_conf->lc_config = lc_config;
|
||||||
|
}
|
||||||
|
|
||||||
|
int flexran_agent_unregister_mac_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
if (!agent_mac_xface[mod_id]) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "MAC agent CM for eNB %d is not registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
AGENT_MAC_xface *xface = agent_mac_xface[mod_id];
|
||||||
//xface->agent_ctxt = NULL;
|
//xface->agent_ctxt = NULL;
|
||||||
xface->flexran_agent_send_sr_info = NULL;
|
xface->flexran_agent_send_sr_info = NULL;
|
||||||
xface->flexran_agent_send_sf_trigger = NULL;
|
xface->flexran_agent_send_sf_trigger = NULL;
|
||||||
@@ -1387,12 +1499,17 @@ int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
|||||||
|
|
||||||
xface->dl_scheduler_loaded_lib = NULL;
|
xface->dl_scheduler_loaded_lib = NULL;
|
||||||
xface->ul_scheduler_loaded_lib = NULL;
|
xface->ul_scheduler_loaded_lib = NULL;
|
||||||
mac_agent_registered[mod_id] = 0;
|
free(xface);
|
||||||
agent_mac_xface[mod_id] = NULL;
|
agent_mac_xface[mod_id] = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AGENT_MAC_xface *flexran_agent_get_mac_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
return agent_mac_xface[mod_id];
|
||||||
|
}
|
||||||
|
|
||||||
void flexran_create_config_structures(mid_t mod_id)
|
void flexran_create_config_structures(mid_t mod_id)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#include "flexran_agent_common.h"
|
#include "flexran_agent_common.h"
|
||||||
#include "flexran_agent_extern.h"
|
#include "flexran_agent_extern.h"
|
||||||
|
// for flexran_agent_get_mac_xface()
|
||||||
|
#include "flexran_agent_extern.h"
|
||||||
|
|
||||||
|
|
||||||
/* Initialization function for the agent structures etc */
|
/* Initialization function for the agent structures etc */
|
||||||
@@ -51,7 +53,7 @@ int flexran_agent_mac_destroy_sf_trigger(Protocol__FlexranMessage *msg);
|
|||||||
|
|
||||||
/* Statistics reply protocol message constructor and destructor */
|
/* Statistics reply protocol message constructor and destructor */
|
||||||
int flexran_agent_mac_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
|
int flexran_agent_mac_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
|
||||||
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg);
|
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexStatsReply *reply);
|
||||||
|
|
||||||
/* DL MAC scheduling decision protocol message constructor (empty command) and destructor */
|
/* DL MAC scheduling decision protocol message constructor (empty command) and destructor */
|
||||||
int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMessage **msg);
|
int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMessage **msg);
|
||||||
@@ -81,11 +83,23 @@ void flexran_agent_send_update_mac_stats(mid_t mod_id);
|
|||||||
/// Provide to the scheduler a pending dl_mac_config message
|
/// Provide to the scheduler a pending dl_mac_config message
|
||||||
void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMessage **msg);
|
void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMessage **msg);
|
||||||
|
|
||||||
|
/* Fill the MAC part of an cell_config message */
|
||||||
|
void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||||
|
Protocol__FlexCellConfig *conf);
|
||||||
|
|
||||||
|
/* Fill the MAC part of a ue_config message */
|
||||||
|
void flexran_agent_fill_mac_ue_config(mid_t mod_id, mid_t ue_id,
|
||||||
|
Protocol__FlexUeConfig *ue_conf);
|
||||||
|
|
||||||
|
/* Fill the lc_ue_config->lc_config message */
|
||||||
|
void flexran_agent_fill_mac_lc_ue_config(mid_t mod_id, mid_t ue_id,
|
||||||
|
Protocol__FlexLcUeConfig *lc_ue_conf);
|
||||||
|
|
||||||
/*Register technology specific interface callbacks*/
|
/*Register technology specific interface callbacks*/
|
||||||
int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface);
|
int flexran_agent_register_mac_xface(mid_t mod_id);
|
||||||
|
|
||||||
/*Unregister technology specific callbacks*/
|
/*Unregister technology specific callbacks*/
|
||||||
int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface*xface);
|
int flexran_agent_unregister_mac_xface(mid_t mod_id);
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
* FlexRAN agent - slice configuration *
|
* FlexRAN agent - slice configuration *
|
||||||
|
|||||||
@@ -790,9 +790,9 @@ int parse_dl_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser) {
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
// Check what key needs to be set
|
// Check what key needs to be set
|
||||||
if (mac_agent_registered[mod_id]) {
|
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||||
LOG_D(ENB_APP, "Setting parameter %s\n", event.data.scalar.value);
|
LOG_D(ENB_APP, "Setting parameter %s\n", event.data.scalar.value);
|
||||||
param = dlsym(agent_mac_xface[mod_id]->dl_scheduler_loaded_lib,
|
param = dlsym(flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib,
|
||||||
(char *) event.data.scalar.value);
|
(char *) event.data.scalar.value);
|
||||||
if (param == NULL) {
|
if (param == NULL) {
|
||||||
goto error;
|
goto error;
|
||||||
@@ -845,9 +845,9 @@ int parse_ul_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser) {
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
// Check what key needs to be set
|
// Check what key needs to be set
|
||||||
if (mac_agent_registered[mod_id]) {
|
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||||
LOG_D(ENB_APP, "Setting parameter %s\n", event.data.scalar.value);
|
LOG_D(ENB_APP, "Setting parameter %s\n", event.data.scalar.value);
|
||||||
param = dlsym(agent_mac_xface[mod_id]->ul_scheduler_loaded_lib,
|
param = dlsym(flexran_agent_get_mac_xface(mod_id)->ul_scheduler_loaded_lib,
|
||||||
(char *) event.data.scalar.value);
|
(char *) event.data.scalar.value);
|
||||||
if (param == NULL) {
|
if (param == NULL) {
|
||||||
goto error;
|
goto error;
|
||||||
@@ -891,11 +891,11 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
|
|||||||
LOG_I(FLEXRAN_AGENT, "Loading function: %s\n", function_name);
|
LOG_I(FLEXRAN_AGENT, "Loading function: %s\n", function_name);
|
||||||
void *loaded_scheduler = dlsym(lib, function_name);
|
void *loaded_scheduler = dlsym(lib, function_name);
|
||||||
if (loaded_scheduler) {
|
if (loaded_scheduler) {
|
||||||
if (mac_agent_registered[mod_id]) {
|
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||||
if (agent_mac_xface[mod_id]->dl_scheduler_loaded_lib != NULL) {
|
if (flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib != NULL) {
|
||||||
dlclose(agent_mac_xface[mod_id]->dl_scheduler_loaded_lib);
|
dlclose(flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib);
|
||||||
}
|
}
|
||||||
agent_mac_xface[mod_id]->dl_scheduler_loaded_lib = lib;
|
flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib = lib;
|
||||||
LOG_I(FLEXRAN_AGENT, "New DL UE scheduler: %s\n", function_name);
|
LOG_I(FLEXRAN_AGENT, "New DL UE scheduler: %s\n", function_name);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -28,42 +28,36 @@
|
|||||||
|
|
||||||
#include "flexran_agent_pdcp.h"
|
#include "flexran_agent_pdcp.h"
|
||||||
|
|
||||||
|
|
||||||
/*Trigger boolean for PDCP measurement*/
|
|
||||||
bool triggered_pdcp = false;
|
|
||||||
/*Flags showing if a pdcp agent has already been registered*/
|
|
||||||
unsigned int pdcp_agent_registered[NUM_MAX_ENB];
|
|
||||||
|
|
||||||
/*Array containing the Agent-PDCP interfaces*/
|
/*Array containing the Agent-PDCP interfaces*/
|
||||||
AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
|
AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
|
||||||
|
|
||||||
// MAX_MOBILES_PER_ENB
|
// MAX_MOBILES_PER_ENB
|
||||||
|
|
||||||
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
|
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
|
||||||
const mid_t ue_id,
|
uint16_t uid,
|
||||||
Protocol__FlexPdcpStats *pdcp_aggr_stats){
|
Protocol__FlexPdcpStats *pdcp_aggr_stats){
|
||||||
|
|
||||||
int lcid=0;
|
int lcid=0;
|
||||||
/* only calculate the DRBs */
|
/* only calculate the DRBs */
|
||||||
//LOG_I(FLEXRAN_AGENT, "enb %d ue %d \n", mod_id, ue_id);
|
//LOG_I(FLEXRAN_AGENT, "enb %d ue %d \n", mod_id, uid);
|
||||||
|
|
||||||
for (lcid=NUM_MAX_SRB ; lcid < NUM_MAX_SRB + NUM_MAX_DRB; lcid++){
|
for (lcid=NUM_MAX_SRB ; lcid < NUM_MAX_SRB + NUM_MAX_DRB; lcid++){
|
||||||
|
|
||||||
pdcp_aggr_stats->pkt_tx += flexran_get_pdcp_tx(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_tx += flexran_get_pdcp_tx(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_tx_bytes += flexran_get_pdcp_tx_bytes(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_tx_bytes += flexran_get_pdcp_tx_bytes(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_tx_w += flexran_get_pdcp_tx_w(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_tx_w += flexran_get_pdcp_tx_w(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_tx_bytes_w += flexran_get_pdcp_tx_bytes_w(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_tx_bytes_w += flexran_get_pdcp_tx_bytes_w(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_tx_aiat += flexran_get_pdcp_tx_aiat(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_tx_aiat += flexran_get_pdcp_tx_aiat(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_tx_aiat_w += flexran_get_pdcp_tx_aiat_w(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_tx_aiat_w += flexran_get_pdcp_tx_aiat_w(mod_id, uid, lcid);
|
||||||
|
|
||||||
|
|
||||||
pdcp_aggr_stats->pkt_rx += flexran_get_pdcp_rx(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx += flexran_get_pdcp_rx(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_rx_bytes += flexran_get_pdcp_rx_bytes(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx_bytes += flexran_get_pdcp_rx_bytes(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_rx_w += flexran_get_pdcp_rx_w(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx_w += flexran_get_pdcp_rx_w(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_rx_bytes_w += flexran_get_pdcp_rx_bytes_w(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx_bytes_w += flexran_get_pdcp_rx_bytes_w(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_rx_aiat += flexran_get_pdcp_rx_aiat(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx_aiat += flexran_get_pdcp_rx_aiat(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_rx_aiat_w += flexran_get_pdcp_rx_aiat_w(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx_aiat_w += flexran_get_pdcp_rx_aiat_w(mod_id, uid, lcid);
|
||||||
pdcp_aggr_stats->pkt_rx_oo += flexran_get_pdcp_rx_oo(mod_id,ue_id,lcid);
|
pdcp_aggr_stats->pkt_rx_oo += flexran_get_pdcp_rx_oo(mod_id, uid, lcid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +72,6 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
|
|
||||||
// Protocol__FlexHeader *header;
|
// Protocol__FlexHeader *header;
|
||||||
int i;
|
int i;
|
||||||
int UE_id;
|
|
||||||
// int cc_id = 0;
|
// int cc_id = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -86,7 +79,8 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
if (report_config->nr_ue > 0) {
|
if (report_config->nr_ue > 0) {
|
||||||
|
|
||||||
for (i = 0; i < report_config->nr_ue; i++) {
|
for (i = 0; i < report_config->nr_ue; i++) {
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
const rnti_t rnti = report_config->ue_report_type[i].ue_rnti;
|
||||||
|
const uint16_t uid = flexran_get_pdcp_uid_from_rnti(mod_id, rnti);
|
||||||
|
|
||||||
/* Check flag for creation of buffer status report */
|
/* Check flag for creation of buffer status report */
|
||||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS) {
|
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS) {
|
||||||
@@ -97,7 +91,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
goto error;
|
goto error;
|
||||||
protocol__flex_pdcp_stats__init(pdcp_aggr_stats);
|
protocol__flex_pdcp_stats__init(pdcp_aggr_stats);
|
||||||
|
|
||||||
flexran_agent_pdcp_aggregate_stats(mod_id, UE_id, pdcp_aggr_stats);
|
flexran_agent_pdcp_aggregate_stats(mod_id, uid, pdcp_aggr_stats);
|
||||||
|
|
||||||
pdcp_aggr_stats->has_pkt_tx=1;
|
pdcp_aggr_stats->has_pkt_tx=1;
|
||||||
pdcp_aggr_stats->has_pkt_tx_bytes =1;
|
pdcp_aggr_stats->has_pkt_tx_bytes =1;
|
||||||
@@ -106,7 +100,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
pdcp_aggr_stats->has_pkt_tx_aiat =1;
|
pdcp_aggr_stats->has_pkt_tx_aiat =1;
|
||||||
pdcp_aggr_stats->has_pkt_tx_aiat_w =1;
|
pdcp_aggr_stats->has_pkt_tx_aiat_w =1;
|
||||||
|
|
||||||
pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, UE_id, DEFAULT_DRB);
|
pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, uid, DEFAULT_DRB);
|
||||||
pdcp_aggr_stats->has_pkt_tx_sn =1;
|
pdcp_aggr_stats->has_pkt_tx_sn =1;
|
||||||
|
|
||||||
pdcp_aggr_stats->has_pkt_rx =1;
|
pdcp_aggr_stats->has_pkt_rx =1;
|
||||||
@@ -117,14 +111,14 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
pdcp_aggr_stats->has_pkt_rx_aiat_w =1;
|
pdcp_aggr_stats->has_pkt_rx_aiat_w =1;
|
||||||
pdcp_aggr_stats->has_pkt_rx_oo =1;
|
pdcp_aggr_stats->has_pkt_rx_oo =1;
|
||||||
|
|
||||||
pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, UE_id, DEFAULT_DRB);
|
pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, uid, DEFAULT_DRB);
|
||||||
pdcp_aggr_stats->has_pkt_rx_sn =1;
|
pdcp_aggr_stats->has_pkt_rx_sn =1;
|
||||||
|
|
||||||
pdcp_aggr_stats->sfn = flexran_get_pdcp_sfn(mod_id);
|
pdcp_aggr_stats->sfn = flexran_get_pdcp_sfn(mod_id);
|
||||||
pdcp_aggr_stats->has_sfn =1;
|
pdcp_aggr_stats->has_sfn =1;
|
||||||
|
|
||||||
ue_report[i]->pdcp_stats = pdcp_aggr_stats;
|
ue_report[i]->pdcp_stats = pdcp_aggr_stats;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -144,30 +138,51 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int flexran_agent_pdcp_destroy_stats_reply(Protocol__FlexStatsReply *reply)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < reply->n_ue_report; ++i) {
|
||||||
|
if (reply->ue_report[i]->pdcp_stats)
|
||||||
|
free(reply->ue_report[i]->pdcp_stats);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int flexran_agent_register_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface *xface) {
|
int flexran_agent_register_pdcp_xface(mid_t mod_id)
|
||||||
if (pdcp_agent_registered[mod_id]) {
|
{
|
||||||
LOG_E(PDCP, "PDCP agent for eNB %d is already registered\n", mod_id);
|
if (agent_pdcp_xface[mod_id]) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "PDCP agent CM for eNB %d is already registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
AGENT_PDCP_xface *xface = malloc(sizeof(AGENT_PDCP_xface));
|
||||||
|
if (!xface) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not allocate memory for PDCP agent xface %d\n", mod_id);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//xface->flexran_pdcp_stats_measurement = NULL;
|
//xface->flexran_pdcp_stats_measurement = NULL;
|
||||||
|
|
||||||
pdcp_agent_registered[mod_id] = 1;
|
|
||||||
agent_pdcp_xface[mod_id] = xface;
|
agent_pdcp_xface[mod_id] = xface;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_unregister_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface *xface) {
|
int flexran_agent_unregister_pdcp_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
if (!agent_pdcp_xface[mod_id]) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "PDCP agent CM for eNB %d is not registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
//xface->agent_ctxt = NULL;
|
//xface->agent_ctxt = NULL;
|
||||||
//xface->flexran_pdcp_stats_measurement = NULL;
|
//xface->flexran_pdcp_stats_measurement = NULL;
|
||||||
|
|
||||||
|
free(agent_pdcp_xface[mod_id]);
|
||||||
pdcp_agent_registered[mod_id] = 0;
|
|
||||||
agent_pdcp_xface[mod_id] = NULL;
|
agent_pdcp_xface[mod_id] = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AGENT_PDCP_xface *flexran_agent_get_pdcp_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
return agent_pdcp_xface[mod_id];
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,6 +39,8 @@
|
|||||||
#include "flexran_agent_defs.h"
|
#include "flexran_agent_defs.h"
|
||||||
#include "flexran_agent_pdcp_defs.h"
|
#include "flexran_agent_pdcp_defs.h"
|
||||||
#include "flexran_agent_ran_api.h"
|
#include "flexran_agent_ran_api.h"
|
||||||
|
// for flexran_agent_get_pdcp_xface()
|
||||||
|
#include "flexran_agent_extern.h"
|
||||||
|
|
||||||
/**********************************
|
/**********************************
|
||||||
* FlexRAN agent - technology PDCP API
|
* FlexRAN agent - technology PDCP API
|
||||||
@@ -49,16 +51,17 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
|
|||||||
const report_config_t *report_config,
|
const report_config_t *report_config,
|
||||||
Protocol__FlexUeStatsReport **ue_report,
|
Protocol__FlexUeStatsReport **ue_report,
|
||||||
Protocol__FlexCellStatsReport **cell_report);
|
Protocol__FlexCellStatsReport **cell_report);
|
||||||
|
int flexran_agent_pdcp_destroy_stats_reply(Protocol__FlexStatsReply *reply);
|
||||||
|
|
||||||
/* Get the stats from RAN API and aggregate them per USER*/
|
/* Get the stats from RAN API and aggregate them per USER*/
|
||||||
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
|
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
|
||||||
const mid_t ue_id,
|
uint16_t uid,
|
||||||
Protocol__FlexPdcpStats *pdcp_aggr_stats);
|
Protocol__FlexPdcpStats *pdcp_aggr_stats);
|
||||||
|
|
||||||
/*Register technology specific interface callbacks*/
|
/*Register technology specific interface callbacks*/
|
||||||
int flexran_agent_register_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface *xface);
|
int flexran_agent_register_pdcp_xface(mid_t mod_id);
|
||||||
|
|
||||||
/*Unregister technology specific callbacks*/
|
/*Unregister technology specific callbacks*/
|
||||||
int flexran_agent_unregister_pdcp_xface(mid_t mod_id, AGENT_PDCP_xface*xface);
|
int flexran_agent_unregister_pdcp_xface(mid_t mod_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,179 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file flexran_agent_phy.c
|
||||||
|
* \brief FlexRAN agent Control Module PHY
|
||||||
|
* \author Robert Schmidt
|
||||||
|
* \date Oct 2018
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "flexran_agent_phy.h"
|
||||||
|
#include "flexran_agent_ran_api.h"
|
||||||
|
|
||||||
|
/* Array containing the Agent-PHY interfaces */
|
||||||
|
AGENT_PHY_xface *agent_phy_xface[NUM_MAX_ENB];
|
||||||
|
|
||||||
|
void flexran_agent_fill_phy_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||||
|
Protocol__FlexCellConfig *conf) {
|
||||||
|
conf->phy_cell_id = flexran_get_cell_id(mod_id, cc_id);
|
||||||
|
conf->has_phy_cell_id = 1;
|
||||||
|
|
||||||
|
conf->pusch_hopping_offset = flexran_get_hopping_offset(mod_id, cc_id);
|
||||||
|
conf->has_pusch_hopping_offset = 1;
|
||||||
|
|
||||||
|
conf->hopping_mode = flexran_get_hopping_mode(mod_id, cc_id);
|
||||||
|
conf->has_hopping_mode = 1;
|
||||||
|
|
||||||
|
conf->n_sb = flexran_get_n_SB(mod_id, cc_id);
|
||||||
|
conf->has_n_sb = 1;
|
||||||
|
|
||||||
|
conf->phich_resource = flexran_get_phich_resource(mod_id, cc_id);
|
||||||
|
conf->has_phich_resource = 1;
|
||||||
|
|
||||||
|
conf->phich_duration = flexran_get_phich_duration(mod_id, cc_id);
|
||||||
|
conf->has_phich_duration = 1;
|
||||||
|
|
||||||
|
conf->init_nr_pdcch_ofdm_sym = flexran_get_num_pdcch_symb(mod_id, cc_id);
|
||||||
|
conf->has_init_nr_pdcch_ofdm_sym = 1;
|
||||||
|
|
||||||
|
conf->dl_bandwidth = flexran_get_N_RB_DL(mod_id, cc_id);
|
||||||
|
conf->has_dl_bandwidth = 1;
|
||||||
|
|
||||||
|
conf->ul_bandwidth = flexran_get_N_RB_UL(mod_id, cc_id);
|
||||||
|
conf->has_ul_bandwidth = 1;
|
||||||
|
|
||||||
|
conf->ul_cyclic_prefix_length = flexran_get_ul_cyclic_prefix_length(mod_id, cc_id);
|
||||||
|
conf->has_ul_cyclic_prefix_length = 1;
|
||||||
|
|
||||||
|
conf->dl_cyclic_prefix_length = flexran_get_dl_cyclic_prefix_length(mod_id, cc_id);
|
||||||
|
conf->has_dl_cyclic_prefix_length = 1;
|
||||||
|
|
||||||
|
conf->antenna_ports_count = flexran_get_antenna_ports(mod_id, cc_id);
|
||||||
|
conf->has_antenna_ports_count = 1;
|
||||||
|
|
||||||
|
conf->duplex_mode = flexran_get_duplex_mode(mod_id, cc_id);
|
||||||
|
conf->has_duplex_mode = 1;
|
||||||
|
|
||||||
|
conf->subframe_assignment = flexran_get_subframe_assignment(mod_id, cc_id);
|
||||||
|
conf->has_subframe_assignment = 1;
|
||||||
|
|
||||||
|
conf->special_subframe_patterns = flexran_get_special_subframe_assignment(mod_id, cc_id);
|
||||||
|
conf->has_special_subframe_patterns = 1;
|
||||||
|
|
||||||
|
//TODO: Fill in with actual value, The MBSFN radio frame period
|
||||||
|
conf->n_mbsfn_subframe_config_rfperiod = 0;
|
||||||
|
uint32_t *elem_rfperiod = malloc(sizeof(uint32_t) * conf->n_mbsfn_subframe_config_rfperiod);
|
||||||
|
if (elem_rfperiod)
|
||||||
|
for(int j = 0; j < conf->n_mbsfn_subframe_config_rfperiod; j++)
|
||||||
|
elem_rfperiod[j] = 1;
|
||||||
|
conf->mbsfn_subframe_config_rfperiod = elem_rfperiod;
|
||||||
|
|
||||||
|
//TODO: Fill in with actual value, The MBSFN radio frame offset
|
||||||
|
conf->n_mbsfn_subframe_config_rfoffset = 0;
|
||||||
|
uint32_t *elem_rfoffset = malloc(sizeof(uint32_t) * conf->n_mbsfn_subframe_config_rfoffset);
|
||||||
|
if (elem_rfoffset)
|
||||||
|
for(int j = 0; j < conf->n_mbsfn_subframe_config_rfoffset; j++)
|
||||||
|
elem_rfoffset[j] = 1;
|
||||||
|
conf->mbsfn_subframe_config_rfoffset = elem_rfoffset;
|
||||||
|
|
||||||
|
//TODO: Fill in with actual value, Bitmap indicating the MBSFN subframes
|
||||||
|
conf->n_mbsfn_subframe_config_sfalloc = 0;
|
||||||
|
uint32_t *elem_sfalloc = malloc(sizeof(uint32_t) * conf->n_mbsfn_subframe_config_sfalloc);
|
||||||
|
if (elem_sfalloc)
|
||||||
|
for(int j = 0; j < conf->n_mbsfn_subframe_config_sfalloc; j++)
|
||||||
|
elem_sfalloc[j] = 1;
|
||||||
|
conf->mbsfn_subframe_config_sfalloc = elem_sfalloc;
|
||||||
|
|
||||||
|
conf->prach_config_index = flexran_get_prach_ConfigIndex(mod_id, cc_id);
|
||||||
|
conf->has_prach_config_index = 1;
|
||||||
|
|
||||||
|
conf->prach_freq_offset = flexran_get_prach_FreqOffset(mod_id, cc_id);
|
||||||
|
conf->has_prach_freq_offset = 1;
|
||||||
|
|
||||||
|
conf->max_harq_msg3tx = flexran_get_maxHARQ_Msg3Tx(mod_id, cc_id);
|
||||||
|
conf->has_max_harq_msg3tx = 1;
|
||||||
|
|
||||||
|
conf->n1pucch_an = flexran_get_n1pucch_an(mod_id, cc_id);
|
||||||
|
conf->has_n1pucch_an = 1;
|
||||||
|
|
||||||
|
conf->deltapucch_shift = flexran_get_deltaPUCCH_Shift(mod_id, cc_id);
|
||||||
|
conf->has_deltapucch_shift = 1;
|
||||||
|
|
||||||
|
conf->nrb_cqi = flexran_get_nRB_CQI(mod_id, cc_id);
|
||||||
|
conf->has_nrb_cqi = 1;
|
||||||
|
|
||||||
|
conf->srs_subframe_config = flexran_get_srs_SubframeConfig(mod_id, cc_id);
|
||||||
|
conf->has_srs_subframe_config = 1;
|
||||||
|
|
||||||
|
conf->srs_bw_config = flexran_get_srs_BandwidthConfig(mod_id, cc_id);
|
||||||
|
conf->has_srs_bw_config = 1;
|
||||||
|
|
||||||
|
conf->srs_mac_up_pts = flexran_get_srs_MaxUpPts(mod_id, cc_id);
|
||||||
|
conf->has_srs_mac_up_pts = 1;
|
||||||
|
|
||||||
|
conf->dl_freq = flexran_agent_get_operating_dl_freq (mod_id, cc_id);
|
||||||
|
conf->has_dl_freq = 1;
|
||||||
|
|
||||||
|
conf->ul_freq = flexran_agent_get_operating_ul_freq (mod_id, cc_id);
|
||||||
|
conf->has_ul_freq = 1;
|
||||||
|
|
||||||
|
conf->eutra_band = flexran_agent_get_operating_eutra_band (mod_id, cc_id);
|
||||||
|
conf->has_eutra_band = 1;
|
||||||
|
|
||||||
|
conf->dl_pdsch_power = flexran_agent_get_operating_pdsch_refpower(mod_id, cc_id);
|
||||||
|
conf->has_dl_pdsch_power = 1;
|
||||||
|
|
||||||
|
conf->enable_64qam = flexran_get_enable64QAM(mod_id, cc_id);
|
||||||
|
conf->has_enable_64qam = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int flexran_agent_register_phy_xface(mid_t mod_id) {
|
||||||
|
if (agent_phy_xface[mod_id]) {
|
||||||
|
LOG_E(PHY, "PHY agent for eNB %d is already registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGENT_PHY_xface *xface = malloc(sizeof(AGENT_PHY_xface));
|
||||||
|
|
||||||
|
if (!xface) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not allocate memory for PHY agent xface %d\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
agent_phy_xface[mod_id] = xface;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int flexran_agent_unregister_phy_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
if (!agent_phy_xface[mod_id]) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "PHY agent for eNB %d is not registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
free(agent_phy_xface[mod_id]);
|
||||||
|
agent_phy_xface[mod_id] = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
return agent_phy_xface[mod_id];
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file flexran_agent_phy.h
|
||||||
|
* \brief FlexRAN agent Control Module PHY header
|
||||||
|
* \author Robert Schmidt
|
||||||
|
* \date Oct 2018
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FLEXRAN_AGENT_PHY_H_
|
||||||
|
#define FLEXRAN_AGENT_PHY_H_
|
||||||
|
|
||||||
|
#include "header.pb-c.h"
|
||||||
|
#include "flexran.pb-c.h"
|
||||||
|
#include "stats_messages.pb-c.h"
|
||||||
|
#include "stats_common.pb-c.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "flexran_agent_common.h"
|
||||||
|
#include "flexran_agent_defs.h"
|
||||||
|
#include "flexran_agent_phy_defs.h"
|
||||||
|
#include "flexran_agent_ran_api.h"
|
||||||
|
// for flexran_agent_get_phy_xface()
|
||||||
|
#include "flexran_agent_extern.h"
|
||||||
|
|
||||||
|
/**********************************
|
||||||
|
* FlexRAN agent - technology PHY API
|
||||||
|
**********************************/
|
||||||
|
|
||||||
|
/* Fill the PHY part of an cell_config message */
|
||||||
|
void flexran_agent_fill_phy_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||||
|
Protocol__FlexCellConfig *conf);
|
||||||
|
|
||||||
|
/* Register technology specific interface callbacks */
|
||||||
|
int flexran_agent_register_phy_xface(mid_t mod_id);
|
||||||
|
|
||||||
|
/* Unregister technology specific callbacks */
|
||||||
|
int flexran_agent_unregister_phy_xface(mid_t mod_id);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
#ifndef __FLEXRAN_AGENT_PHY_PRIMITIVES_H__
|
||||||
|
#define __FLEXRAN_AGENT_PHY_PRIMITIVES_H__
|
||||||
|
|
||||||
|
#include "flexran_agent_defs.h"
|
||||||
|
#include "flexran.pb-c.h"
|
||||||
|
#include "header.pb-c.h"
|
||||||
|
|
||||||
|
/* FLEXRAN AGENT-PHY Interface */
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
/* currently empty, will be used to control RU */
|
||||||
|
|
||||||
|
} AGENT_PHY_xface;
|
||||||
|
|
||||||
|
#endif /* __FLEXRAN_AGENT_PHY_PRIMITIVES_H__ */
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "flexran_agent_rrc.h"
|
#include "flexran_agent_rrc.h"
|
||||||
|
#include "flexran_agent_ran_api.h"
|
||||||
|
|
||||||
#include "liblfds700.h"
|
#include "liblfds700.h"
|
||||||
|
|
||||||
@@ -36,9 +36,6 @@
|
|||||||
/*Trigger boolean for RRC measurement*/
|
/*Trigger boolean for RRC measurement*/
|
||||||
bool triggered_rrc = false;
|
bool triggered_rrc = false;
|
||||||
|
|
||||||
/*Flags showing if an rrc agent has already been registered*/
|
|
||||||
unsigned int rrc_agent_registered[NUM_MAX_ENB];
|
|
||||||
|
|
||||||
/*Array containing the Agent-RRC interfaces*/
|
/*Array containing the Agent-RRC interfaces*/
|
||||||
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
||||||
|
|
||||||
@@ -71,154 +68,21 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
protocol__flex_ue_config__init(config);
|
protocol__flex_ue_config__init(config);
|
||||||
if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED) {
|
switch (state_change) {
|
||||||
// Simply set the rnti of the UE
|
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED:
|
||||||
config->has_rnti = 1;
|
config->has_rnti = 1;
|
||||||
config->rnti = rnti;
|
config->rnti = rnti;
|
||||||
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED
|
break;
|
||||||
|| state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) {
|
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED:
|
||||||
int i = find_UE_id(mod_id, rnti);
|
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED:
|
||||||
config->has_rnti = 1;
|
flexran_agent_fill_rrc_ue_config(mod_id, rnti, config);
|
||||||
config->rnti = rnti;
|
/* we don't call into the MAC CM here; it will be called later through an
|
||||||
config->imsi = flexran_get_ue_imsi(mod_id, i);
|
* ue_config_request */
|
||||||
config->has_imsi = 1;
|
break;
|
||||||
config->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, i);
|
case PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED:
|
||||||
config->has_dl_slice_id = 1;
|
default:
|
||||||
config->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, i);
|
LOG_E(FLEXRAN_AGENT, "state change FLUESC_MOVED or unknown state occured for RNTI %x\n",
|
||||||
config->has_ul_slice_id = 1;
|
rnti);
|
||||||
if(flexran_get_time_alignment_timer(mod_id,i) != -1) {
|
|
||||||
config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i);
|
|
||||||
config->has_time_alignment_timer = 1;
|
|
||||||
}
|
|
||||||
if(flexran_get_meas_gap_config(mod_id,i) != -1){
|
|
||||||
config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i);
|
|
||||||
config->has_meas_gap_config_pattern = 1;
|
|
||||||
}
|
|
||||||
if(config->has_meas_gap_config_pattern == 1 &&
|
|
||||||
config->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
|
|
||||||
config->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id,i);
|
|
||||||
config->has_meas_gap_config_sf_offset = 1;
|
|
||||||
}
|
|
||||||
//TODO: Set the SPS configuration (Optional)
|
|
||||||
//Not supported for now, so we do not set it
|
|
||||||
|
|
||||||
//TODO: Set the SR configuration (Optional)
|
|
||||||
//We do not set it for now
|
|
||||||
|
|
||||||
//TODO: Set the CQI configuration (Optional)
|
|
||||||
//We do not set it for now
|
|
||||||
|
|
||||||
if(flexran_get_ue_transmission_mode(mod_id,i) != -1) {
|
|
||||||
config->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i);
|
|
||||||
config->has_transmission_mode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i);
|
|
||||||
config->has_ue_aggregated_max_bitrate_ul = 1;
|
|
||||||
|
|
||||||
config->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i);
|
|
||||||
config->has_ue_aggregated_max_bitrate_dl = 1;
|
|
||||||
|
|
||||||
Protocol__FlexUeCapabilities *c_capabilities;
|
|
||||||
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
|
|
||||||
protocol__flex_ue_capabilities__init(c_capabilities);
|
|
||||||
c_capabilities->has_half_duplex = 1;
|
|
||||||
c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, i);
|
|
||||||
c_capabilities->has_intra_sf_hopping = 1;
|
|
||||||
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, i);
|
|
||||||
c_capabilities->has_type2_sb_1 = 1;
|
|
||||||
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, i);
|
|
||||||
c_capabilities->has_ue_category = 1;
|
|
||||||
c_capabilities->ue_category = flexran_get_ue_category(mod_id, i);
|
|
||||||
c_capabilities->has_res_alloc_type1 = 1;
|
|
||||||
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, i);
|
|
||||||
//Set the capabilites to the message
|
|
||||||
config->capabilities = c_capabilities;
|
|
||||||
|
|
||||||
if(flexran_get_ue_transmission_antenna(mod_id,i) != -1) {
|
|
||||||
config->has_ue_transmission_antenna = 1;
|
|
||||||
config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_tti_bundling(mod_id,i) != -1) {
|
|
||||||
config->has_tti_bundling = 1;
|
|
||||||
config->tti_bundling = flexran_get_tti_bundling(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_maxHARQ_TX(mod_id,i) != -1){
|
|
||||||
config->has_max_harq_tx = 1;
|
|
||||||
config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_beta_offset_ack_index(mod_id,i) != -1) {
|
|
||||||
config->has_beta_offset_ack_index = 1;
|
|
||||||
config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_beta_offset_ri_index(mod_id,i) != -1) {
|
|
||||||
config->has_beta_offset_ri_index = 1;
|
|
||||||
config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_beta_offset_cqi_index(mod_id,i) != -1) {
|
|
||||||
config->has_beta_offset_cqi_index = 1;
|
|
||||||
config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* assume primary carrier */
|
|
||||||
if(flexran_get_ack_nack_simultaneous_trans(mod_id,i,0) != -1) {
|
|
||||||
config->has_ack_nack_simultaneous_trans = 1;
|
|
||||||
config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,i,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) {
|
|
||||||
config->has_simultaneous_ack_nack_cqi = 1;
|
|
||||||
config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) {
|
|
||||||
config->has_aperiodic_cqi_rep_mode = 1;
|
|
||||||
int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i);
|
|
||||||
if (mode > 4) {
|
|
||||||
config->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
|
|
||||||
} else {
|
|
||||||
config->aperiodic_cqi_rep_mode = mode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) {
|
|
||||||
config->has_tdd_ack_nack_feedback = 1;
|
|
||||||
config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) {
|
|
||||||
config->has_ack_nack_repetition_factor = 1;
|
|
||||||
config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_extended_bsr_size(mod_id, i) != -1) {
|
|
||||||
config->has_extended_bsr_size = 1;
|
|
||||||
config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i);
|
|
||||||
}
|
|
||||||
|
|
||||||
config->has_pcell_carrier_index = 1;
|
|
||||||
config->pcell_carrier_index = UE_PCCID(mod_id, i);
|
|
||||||
//TODO: Set carrier aggregation support (boolean)
|
|
||||||
config->has_ca_support = 0;
|
|
||||||
config->ca_support = 0;
|
|
||||||
if(config->has_ca_support){
|
|
||||||
//TODO: Set cross carrier scheduling support (boolean)
|
|
||||||
config->has_cross_carrier_sched_support = 1;
|
|
||||||
config->cross_carrier_sched_support = 0;
|
|
||||||
//TODO: Set secondary cells configuration
|
|
||||||
// We do not set it for now. No carrier aggregation support
|
|
||||||
|
|
||||||
//TODO: Set deactivation timer for secondary cell
|
|
||||||
config->has_scell_deactivation_timer = 0;
|
|
||||||
config->scell_deactivation_timer = 0;
|
|
||||||
}
|
|
||||||
} else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED) {
|
|
||||||
// TODO: Not supported for now. Leave blank
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_state_change_msg->config = config;
|
ue_state_change_msg->config = config;
|
||||||
@@ -242,16 +106,18 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
|||||||
return;
|
return;
|
||||||
error:
|
error:
|
||||||
if (err_code != 0)
|
if (err_code != 0)
|
||||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
|
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n",
|
||||||
|
err_code, rnti);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
|
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
|
||||||
if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG)
|
if(msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG)
|
||||||
goto error;
|
goto error;
|
||||||
free(msg->ue_state_change_msg->header);
|
free(msg->ue_state_change_msg->header);
|
||||||
//TODO: Free the contents of the UE config structure
|
if (msg->ue_state_change_msg->config->capabilities)
|
||||||
|
free(msg->ue_state_change_msg->config->capabilities);
|
||||||
|
free(msg->ue_state_change_msg->config);
|
||||||
free(msg->ue_state_change_msg);
|
free(msg->ue_state_change_msg);
|
||||||
free(msg);
|
free(msg);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -264,30 +130,27 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
|
|||||||
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
|
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
|
||||||
void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t* measResults) {
|
void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t* measResults) {
|
||||||
|
|
||||||
//int i;
|
|
||||||
// int priority = 0; // Warning Preventing
|
// int priority = 0; // Warning Preventing
|
||||||
// void *data;
|
// void *data;
|
||||||
// int size;
|
// int size;
|
||||||
// err_code_t err_code = -100;
|
// err_code_t err_code = -100;
|
||||||
triggered_rrc = true;
|
triggered_rrc = true;
|
||||||
//int num;
|
|
||||||
|
|
||||||
/* TODO do we need this at the current state? meas_stats is never put into a
|
/* TODO do we need this at the current state? meas_stats is never put into a
|
||||||
* protobuf message?!
|
* protobuf message?!
|
||||||
num = flexran_get_num_ues (mod_id);
|
int num = flexran_get_rrc_num_ues (mod_id);
|
||||||
|
rnti_t rntis[num];
|
||||||
|
flexran_get_rrc_rnti_list(mod_id, rntis, num);
|
||||||
|
|
||||||
meas_stats = malloc(sizeof(rrc_meas_stats) * num);
|
meas_stats = malloc(sizeof(rrc_meas_stats) * num);
|
||||||
|
|
||||||
for (i = 0; i < num; i++){
|
for (int i = 0; i < num; i++){
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
const rnti_t rnti = rntis[i];
|
||||||
meas_stats[i].rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
meas_stats[i].rnti = rnti;
|
||||||
meas_stats[i].meas_id = flexran_get_rrc_pcell_measid(mod_id, UE_id);
|
meas_stats[i].meas_id = flexran_get_rrc_pcell_measid(mod_id, rnti);
|
||||||
meas_stats[i].rsrp = flexran_get_rrc_pcell_rsrp(mod_id, UE_id) - 140;
|
meas_stats[i].rsrp = flexran_get_rrc_pcell_rsrp(mod_id, rnti) - 140;
|
||||||
// measResults->measResultPCell.rsrpResult - 140;
|
// measResults->measResultPCell.rsrpResult - 140;
|
||||||
meas_stats[i].rsrq = flexran_get_rrc_pcell_rsrq(mod_id, UE_id)/2 - 20;
|
meas_stats[i].rsrq = flexran_get_rrc_pcell_rsrq(mod_id, rnti)/2 - 20;
|
||||||
// (measResults->measResultPCell.rsrqResult)/2 - 20;
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
// repl->neigh_meas = NULL;
|
// repl->neigh_meas = NULL;
|
||||||
|
|
||||||
@@ -496,17 +359,11 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
Protocol__FlexUeStatsReport **ue_report,
|
Protocol__FlexUeStatsReport **ue_report,
|
||||||
Protocol__FlexCellStatsReport **cell_report) {
|
Protocol__FlexCellStatsReport **cell_report) {
|
||||||
|
|
||||||
|
|
||||||
// Protocol__FlexHeader *header;
|
|
||||||
int i,j;
|
|
||||||
int UE_id;
|
|
||||||
|
|
||||||
/* Allocate memory for list of UE reports */
|
|
||||||
if (report_config->nr_ue > 0) {
|
if (report_config->nr_ue > 0) {
|
||||||
|
rnti_t rntis[report_config->nr_ue];
|
||||||
for (i = 0; i < report_config->nr_ue; i++) {
|
flexran_get_rrc_rnti_list(mod_id, rntis, report_config->nr_ue);
|
||||||
|
for (int i = 0; i < report_config->nr_ue; i++) {
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
const rnti_t rnti = rntis[i];
|
||||||
|
|
||||||
/* Check flag for creation of buffer status report */
|
/* Check flag for creation of buffer status report */
|
||||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS) {
|
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS) {
|
||||||
@@ -518,15 +375,14 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
goto error;
|
goto error;
|
||||||
protocol__flex_rrc_measurements__init(rrc_measurements);
|
protocol__flex_rrc_measurements__init(rrc_measurements);
|
||||||
|
|
||||||
rrc_measurements->measid = flexran_get_rrc_pcell_measid(mod_id, UE_id);
|
rrc_measurements->measid = flexran_get_rrc_pcell_measid(mod_id, rnti);
|
||||||
rrc_measurements->has_measid = 1;
|
rrc_measurements->has_measid = 1;
|
||||||
|
|
||||||
rrc_measurements->pcell_rsrp = flexran_get_rrc_pcell_rsrp(mod_id, UE_id);
|
rrc_measurements->pcell_rsrp = flexran_get_rrc_pcell_rsrp(mod_id, rnti);
|
||||||
rrc_measurements->has_pcell_rsrp = 1;
|
rrc_measurements->has_pcell_rsrp = 1;
|
||||||
|
|
||||||
rrc_measurements->pcell_rsrq = flexran_get_rrc_pcell_rsrq(mod_id, UE_id);
|
|
||||||
rrc_measurements->has_pcell_rsrq = 1 ;
|
|
||||||
|
|
||||||
|
rrc_measurements->pcell_rsrq = flexran_get_rrc_pcell_rsrq(mod_id, rnti);
|
||||||
|
rrc_measurements->has_pcell_rsrq = 1 ;
|
||||||
|
|
||||||
/* Target Cell, Neghibouring*/
|
/* Target Cell, Neghibouring*/
|
||||||
Protocol__FlexNeighCellsMeasurements *neigh_meas;
|
Protocol__FlexNeighCellsMeasurements *neigh_meas;
|
||||||
@@ -536,7 +392,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
protocol__flex_neigh_cells_measurements__init(neigh_meas);
|
protocol__flex_neigh_cells_measurements__init(neigh_meas);
|
||||||
|
|
||||||
|
|
||||||
neigh_meas->n_eutra_meas = flexran_get_rrc_num_ncell(mod_id, UE_id);
|
neigh_meas->n_eutra_meas = flexran_get_rrc_num_ncell(mod_id, rnti);
|
||||||
|
|
||||||
Protocol__FlexEutraMeasurements **eutra_meas = NULL;
|
Protocol__FlexEutraMeasurements **eutra_meas = NULL;
|
||||||
|
|
||||||
@@ -546,7 +402,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
if (eutra_meas == NULL)
|
if (eutra_meas == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
for (j = 0; j < neigh_meas->n_eutra_meas; j++ ){
|
for (int j = 0; j < neigh_meas->n_eutra_meas; j++ ){
|
||||||
|
|
||||||
eutra_meas[j] = malloc(sizeof(Protocol__FlexEutraMeasurements));
|
eutra_meas[j] = malloc(sizeof(Protocol__FlexEutraMeasurements));
|
||||||
if (eutra_meas[j] == NULL)
|
if (eutra_meas[j] == NULL)
|
||||||
@@ -554,7 +410,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
|
|
||||||
protocol__flex_eutra_measurements__init(eutra_meas[j]);
|
protocol__flex_eutra_measurements__init(eutra_meas[j]);
|
||||||
|
|
||||||
eutra_meas[j]->phys_cell_id = flexran_get_rrc_neigh_phy_cell_id(mod_id, UE_id, j);
|
eutra_meas[j]->phys_cell_id = flexran_get_rrc_neigh_phy_cell_id(mod_id, rnti, j);
|
||||||
eutra_meas[j]->has_phys_cell_id = 1;
|
eutra_meas[j]->has_phys_cell_id = 1;
|
||||||
|
|
||||||
|
|
||||||
@@ -565,10 +421,10 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
|
|
||||||
protocol__flex_eutra_ref_signal_meas__init(meas_result);
|
protocol__flex_eutra_ref_signal_meas__init(meas_result);
|
||||||
|
|
||||||
meas_result->rsrp = flexran_get_rrc_neigh_rsrp(mod_id, UE_id, eutra_meas[j]->phys_cell_id);
|
meas_result->rsrp = flexran_get_rrc_neigh_rsrp(mod_id, rnti, eutra_meas[j]->phys_cell_id);
|
||||||
meas_result->has_rsrp = 1;
|
meas_result->has_rsrp = 1;
|
||||||
|
|
||||||
meas_result->rsrq = flexran_get_rrc_neigh_rsrq(mod_id, UE_id, eutra_meas[j]->phys_cell_id);
|
meas_result->rsrq = flexran_get_rrc_neigh_rsrq(mod_id, rnti, eutra_meas[j]->phys_cell_id);
|
||||||
meas_result->has_rsrq = 1;
|
meas_result->has_rsrq = 1;
|
||||||
|
|
||||||
eutra_meas[j]->meas_result = meas_result;
|
eutra_meas[j]->meas_result = meas_result;
|
||||||
@@ -582,6 +438,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ue_report[i]->rrc_measurements = rrc_measurements;
|
ue_report[i]->rrc_measurements = rrc_measurements;
|
||||||
|
ue_report[i]->flags |= PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,6 +475,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
// ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
|
// ni_report->p0_nominal_pucch = flexran_get_p0_nominal_pucch(enb_id, 0);
|
||||||
// ni_report->has_p0_nominal_pucch = 1;
|
// ni_report->has_p0_nominal_pucch = 1;
|
||||||
// cell_report[i]->noise_inter_report = ni_report;
|
// cell_report[i]->noise_inter_report = ni_report;
|
||||||
|
// cell_report[i]->flags |= PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -630,12 +488,10 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
||||||
for (i = 0; i < report_config->nr_ue; i++){
|
for (int i = 0; i < report_config->nr_ue; i++){
|
||||||
|
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
if (ue_report[i]->rrc_measurements && ue_report[i]->rrc_measurements->neigh_meas != NULL){
|
||||||
|
for (int j = 0; j < ue_report[i]->rrc_measurements->neigh_meas->n_eutra_meas; j++){
|
||||||
if (ue_report[i]->rrc_measurements->neigh_meas != NULL){
|
|
||||||
for (j = 0; j < flexran_get_rrc_num_ncell(mod_id, UE_id); j++){
|
|
||||||
|
|
||||||
free(ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]);
|
free(ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]);
|
||||||
}
|
}
|
||||||
@@ -651,10 +507,131 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexStatsReply *reply)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < reply->n_ue_report; i++){
|
||||||
|
if (reply->ue_report[i]->rrc_measurements && reply->ue_report[i]->rrc_measurements->neigh_meas){
|
||||||
|
for (int j = 0; j < reply->ue_report[i]->rrc_measurements->neigh_meas->n_eutra_meas; j++){
|
||||||
|
free(reply->ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]->meas_result);
|
||||||
|
free(reply->ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]);
|
||||||
|
}
|
||||||
|
free(reply->ue_report[i]->rrc_measurements->neigh_meas->eutra_meas);
|
||||||
|
free(reply->ue_report[i]->rrc_measurements->neigh_meas);
|
||||||
|
free(reply->ue_report[i]->rrc_measurements);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface) {
|
void flexran_agent_fill_rrc_ue_config(mid_t mod_id, rnti_t rnti,
|
||||||
if (rrc_agent_registered[mod_id]) {
|
Protocol__FlexUeConfig *ue_conf)
|
||||||
LOG_E(RRC, "RRC agent for eNB %d is already registered\n", mod_id);
|
{
|
||||||
|
if (ue_conf->has_rnti && ue_conf->rnti != rnti) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "ue_config existing RNTI %x does not match RRC RNTI %x\n",
|
||||||
|
ue_conf->rnti, rnti);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ue_conf->has_rnti = 1;
|
||||||
|
ue_conf->rnti = rnti;
|
||||||
|
ue_conf->imsi = flexran_get_ue_imsi(mod_id, rnti);
|
||||||
|
ue_conf->has_imsi = 1;
|
||||||
|
|
||||||
|
//TODO: Set the DRX configuration (optional)
|
||||||
|
//Not supported for now, so we do not set it
|
||||||
|
|
||||||
|
ue_conf->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, rnti);
|
||||||
|
ue_conf->has_time_alignment_timer = 1;
|
||||||
|
|
||||||
|
ue_conf->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, rnti);
|
||||||
|
ue_conf->has_meas_gap_config_pattern = 1;
|
||||||
|
|
||||||
|
if(ue_conf->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
|
||||||
|
ue_conf->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, rnti);
|
||||||
|
ue_conf->has_meas_gap_config_sf_offset = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: Set the SPS configuration (Optional)
|
||||||
|
//Not supported for now, so we do not set it
|
||||||
|
|
||||||
|
//TODO: Set the SR configuration (Optional)
|
||||||
|
//We do not set it for now
|
||||||
|
|
||||||
|
//TODO: Set the CQI configuration (Optional)
|
||||||
|
//We do not set it for now
|
||||||
|
|
||||||
|
ue_conf->transmission_mode = flexran_get_ue_transmission_mode(mod_id, rnti);
|
||||||
|
ue_conf->has_transmission_mode = 1;
|
||||||
|
|
||||||
|
Protocol__FlexUeCapabilities *c_capabilities;
|
||||||
|
c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
|
||||||
|
if (c_capabilities) {
|
||||||
|
protocol__flex_ue_capabilities__init(c_capabilities);
|
||||||
|
|
||||||
|
c_capabilities->has_half_duplex = 1;
|
||||||
|
c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, rnti);
|
||||||
|
|
||||||
|
c_capabilities->has_intra_sf_hopping = 1;
|
||||||
|
c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, rnti);
|
||||||
|
|
||||||
|
c_capabilities->has_type2_sb_1 = 1;
|
||||||
|
c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, rnti);
|
||||||
|
|
||||||
|
c_capabilities->has_ue_category = 1;
|
||||||
|
c_capabilities->ue_category = flexran_get_ue_category(mod_id, rnti);
|
||||||
|
|
||||||
|
c_capabilities->has_res_alloc_type1 = 1;
|
||||||
|
c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->capabilities = c_capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
|
ue_conf->has_ue_transmission_antenna = 1;
|
||||||
|
ue_conf->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_tti_bundling = 1;
|
||||||
|
ue_conf->tti_bundling = flexran_get_tti_bundling(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_max_harq_tx = 1;
|
||||||
|
ue_conf->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_beta_offset_ack_index = 1;
|
||||||
|
ue_conf->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_beta_offset_ri_index = 1;
|
||||||
|
ue_conf->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_beta_offset_cqi_index = 1;
|
||||||
|
ue_conf->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, rnti);
|
||||||
|
|
||||||
|
/* assume primary carrier */
|
||||||
|
ue_conf->has_ack_nack_simultaneous_trans = 1;
|
||||||
|
ue_conf->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,0);
|
||||||
|
|
||||||
|
ue_conf->has_simultaneous_ack_nack_cqi = 1;
|
||||||
|
ue_conf->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_aperiodic_cqi_rep_mode = 1;
|
||||||
|
ue_conf->aperiodic_cqi_rep_mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_tdd_ack_nack_feedback = 1;
|
||||||
|
ue_conf->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_ack_nack_repetition_factor = 1;
|
||||||
|
ue_conf->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, rnti);
|
||||||
|
|
||||||
|
ue_conf->has_extended_bsr_size = 1;
|
||||||
|
ue_conf->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, rnti);
|
||||||
|
}
|
||||||
|
|
||||||
|
int flexran_agent_register_rrc_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
if (agent_rrc_xface[mod_id]) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "RRC agent for eNB %d is already registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
AGENT_RRC_xface *xface = malloc(sizeof(AGENT_RRC_xface));
|
||||||
|
if (!xface) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not allocate memory for RRC agent xface %d\n", mod_id);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -663,21 +640,98 @@ int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface) {
|
|||||||
xface->flexran_agent_notify_ue_state_change = flexran_agent_ue_state_change;
|
xface->flexran_agent_notify_ue_state_change = flexran_agent_ue_state_change;
|
||||||
xface->flexran_trigger_rrc_measurements = flexran_trigger_rrc_measurements;
|
xface->flexran_trigger_rrc_measurements = flexran_trigger_rrc_measurements;
|
||||||
|
|
||||||
rrc_agent_registered[mod_id] = 1;
|
|
||||||
agent_rrc_xface[mod_id] = xface;
|
agent_rrc_xface[mod_id] = xface;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_unregister_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface) {
|
void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||||
|
Protocol__FlexCellConfig *conf) {
|
||||||
|
|
||||||
|
if (!conf->si_config) {
|
||||||
|
conf->si_config = malloc(sizeof(Protocol__FlexSiConfig));
|
||||||
|
if (conf->si_config)
|
||||||
|
protocol__flex_si_config__init(conf->si_config);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conf->si_config) {
|
||||||
|
// TODO THIS IS DU RRC
|
||||||
|
conf->si_config->sib1_length = flexran_get_sib1_length(mod_id, cc_id);
|
||||||
|
conf->si_config->has_sib1_length = 1;
|
||||||
|
|
||||||
|
conf->si_config->si_window_length = (uint32_t) flexran_get_si_window_length(mod_id, cc_id);
|
||||||
|
conf->si_config->has_si_window_length = 1;
|
||||||
|
|
||||||
|
conf->si_config->n_si_message = 0;
|
||||||
|
|
||||||
|
/* Protocol__FlexSiMessage **si_message; */
|
||||||
|
/* si_message = malloc(sizeof(Protocol__FlexSiMessage *) * si_config->n_si_message); */
|
||||||
|
/* if(si_message == NULL) */
|
||||||
|
/* goto error; */
|
||||||
|
/* for(j = 0; j < si_config->n_si_message; j++){ */
|
||||||
|
/* si_message[j] = malloc(sizeof(Protocol__FlexSiMessage)); */
|
||||||
|
/* if(si_message[j] == NULL) */
|
||||||
|
/* goto error; */
|
||||||
|
/* protocol__flex_si_message__init(si_message[j]); */
|
||||||
|
/* //TODO: Fill in with actual value, Periodicity of SI msg in radio frames */
|
||||||
|
/* si_message[j]->periodicity = 1; //SIPeriod */
|
||||||
|
/* si_message[j]->has_periodicity = 1; */
|
||||||
|
/* //TODO: Fill in with actual value, rhe length of the SI message in bytes */
|
||||||
|
/* si_message[j]->length = 10; */
|
||||||
|
/* si_message[j]->has_length = 1; */
|
||||||
|
/* } */
|
||||||
|
/* if(si_config->n_si_message > 0){ */
|
||||||
|
/* si_config->si_message = si_message; */
|
||||||
|
/* } */
|
||||||
|
}
|
||||||
|
|
||||||
|
conf->ra_response_window_size = flexran_get_ra_ResponseWindowSize(mod_id, cc_id);
|
||||||
|
conf->has_ra_response_window_size = 1;
|
||||||
|
|
||||||
|
// belongs to MAC but is read in RRC
|
||||||
|
conf->mac_contention_resolution_timer = flexran_get_mac_ContentionResolutionTimer(mod_id, cc_id);
|
||||||
|
conf->has_mac_contention_resolution_timer = 1;
|
||||||
|
|
||||||
|
conf->ul_pusch_power = flexran_agent_get_operating_pusch_p0 (mod_id, cc_id);
|
||||||
|
conf->has_ul_pusch_power = 1;
|
||||||
|
|
||||||
|
conf->n_plmn_id = flexran_get_rrc_num_plmn_ids(mod_id);
|
||||||
|
conf->plmn_id = calloc(conf->n_plmn_id, sizeof(Protocol__FlexPlmn *));
|
||||||
|
if (conf->plmn_id) {
|
||||||
|
for (int i = 0; i < conf->n_plmn_id; i++) {
|
||||||
|
conf->plmn_id[i] = malloc(sizeof(Protocol__FlexPlmn));
|
||||||
|
if (!conf->plmn_id[i]) continue;
|
||||||
|
protocol__flex_plmn__init(conf->plmn_id[i]);
|
||||||
|
conf->plmn_id[i]->mcc = flexran_get_rrc_mcc(mod_id, i);
|
||||||
|
conf->plmn_id[i]->has_mcc = 1;
|
||||||
|
conf->plmn_id[i]->mnc = flexran_get_rrc_mnc(mod_id, i);
|
||||||
|
conf->plmn_id[i]->has_mnc = 1;
|
||||||
|
conf->plmn_id[i]->mnc_length = flexran_get_rrc_mnc_digit_length(mod_id, i);
|
||||||
|
conf->plmn_id[i]->has_mnc_length = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
conf->n_plmn_id = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int flexran_agent_unregister_rrc_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
if (!agent_rrc_xface[mod_id]) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "RRC agent for eNB %d is not registered\n", mod_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
//xface->agent_ctxt = NULL;
|
//xface->agent_ctxt = NULL;
|
||||||
// xface->flexran_agent_send_update_rrc_stats = NULL;
|
// xface->flexran_agent_send_update_rrc_stats = NULL;
|
||||||
|
|
||||||
xface->flexran_agent_notify_ue_state_change = NULL;
|
agent_rrc_xface[mod_id]->flexran_agent_notify_ue_state_change = NULL;
|
||||||
xface->flexran_trigger_rrc_measurements = NULL;
|
agent_rrc_xface[mod_id]->flexran_trigger_rrc_measurements = NULL;
|
||||||
rrc_agent_registered[mod_id] = 0;
|
free(agent_rrc_xface[mod_id]);
|
||||||
agent_rrc_xface[mod_id] = NULL;
|
agent_rrc_xface[mod_id] = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id)
|
||||||
|
{
|
||||||
|
return agent_rrc_xface[mod_id];
|
||||||
|
}
|
||||||
|
|||||||
@@ -37,11 +37,10 @@
|
|||||||
|
|
||||||
#include "flexran_agent_common.h"
|
#include "flexran_agent_common.h"
|
||||||
#include "flexran_agent_rrc_defs.h"
|
#include "flexran_agent_rrc_defs.h"
|
||||||
|
// for flexran_agent_get_rrc_xface()
|
||||||
|
#include "flexran_agent_extern.h"
|
||||||
|
|
||||||
|
|
||||||
/* Initialization function for the agent structures etc */
|
|
||||||
void flexran_agent_init_rrc_agent(mid_t mod_id);
|
|
||||||
|
|
||||||
/* UE state change message constructor and destructor */
|
/* UE state change message constructor and destructor */
|
||||||
void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change);
|
void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change);
|
||||||
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
|
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
|
||||||
@@ -59,12 +58,20 @@ void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t *);
|
|||||||
|
|
||||||
/* Statistics reply protocol message constructor and destructor */
|
/* Statistics reply protocol message constructor and destructor */
|
||||||
int flexran_agent_rrc_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
|
int flexran_agent_rrc_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
|
||||||
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexranMessage *msg);
|
int flexran_agent_rrc_destroy_stats_reply(Protocol__FlexStatsReply *reply);
|
||||||
|
|
||||||
|
/* Fill the RRC part of a ue_config message */
|
||||||
|
void flexran_agent_fill_rrc_ue_config(mid_t mod_id, rnti_t rnti,
|
||||||
|
Protocol__FlexUeConfig *ue_conf);
|
||||||
|
|
||||||
|
/* Fill the RRC part of an cell_config message */
|
||||||
|
void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id,
|
||||||
|
Protocol__FlexCellConfig *conf);
|
||||||
|
|
||||||
/*Register technology specific interface callbacks*/
|
/*Register technology specific interface callbacks*/
|
||||||
int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface);
|
int flexran_agent_register_rrc_xface(mid_t mod_id);
|
||||||
|
|
||||||
/*Unregister technology specific callbacks*/
|
/*Unregister technology specific callbacks*/
|
||||||
int flexran_agent_unregister_rrc_xface(mid_t mod_id, AGENT_RRC_xface*xface);
|
int flexran_agent_unregister_rrc_xface(mid_t mod_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -218,6 +218,9 @@ enum flex_aperiodic_cqi_report_mode {
|
|||||||
FLACRM_RM30 = 3;
|
FLACRM_RM30 = 3;
|
||||||
FLACRM_RM31 = 4;
|
FLACRM_RM31 = 4;
|
||||||
FLACRM_NONE = 5;
|
FLACRM_NONE = 5;
|
||||||
|
FLACRM_RM32_v1250 = 6;
|
||||||
|
FLACRM_RM10_v1310 = 7;
|
||||||
|
FLACRM_RM11_v1310 = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum flex_tdd_ack_nack_feedback_mode {
|
enum flex_tdd_ack_nack_feedback_mode {
|
||||||
@@ -259,3 +262,9 @@ enum flex_ue_state_change_type {
|
|||||||
FLUESC_DEACTIVATED = 2;
|
FLUESC_DEACTIVATED = 2;
|
||||||
FLUESC_MOVED = 3;
|
FLUESC_MOVED = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message flex_plmn {
|
||||||
|
optional uint32 mcc = 1;
|
||||||
|
optional uint32 mnc = 2;
|
||||||
|
optional uint32 mnc_length = 3;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import "config_common.proto";
|
|||||||
|
|
||||||
message flex_cell_config {
|
message flex_cell_config {
|
||||||
optional uint32 phy_cell_id = 1; // The PCI of this cell
|
optional uint32 phy_cell_id = 1; // The PCI of this cell
|
||||||
optional uint32 cell_id = 2; // The PLMN cell id of this cell
|
|
||||||
optional uint32 pusch_hopping_offset = 3; // PUSCH resources in RBs for hopping
|
optional uint32 pusch_hopping_offset = 3; // PUSCH resources in RBs for hopping
|
||||||
optional uint32 hopping_mode = 4; // One of the FLHM_* enum values
|
optional uint32 hopping_mode = 4; // One of the FLHM_* enum values
|
||||||
optional uint32 n_sb = 5; // The number of subbands
|
optional uint32 n_sb = 5; // The number of subbands
|
||||||
@@ -43,6 +42,7 @@ message flex_cell_config {
|
|||||||
optional uint32 eutra_band= 37; // operating band
|
optional uint32 eutra_band= 37; // operating band
|
||||||
optional int32 dl_pdsch_power = 38; // operating downlink power
|
optional int32 dl_pdsch_power = 38; // operating downlink power
|
||||||
optional int32 ul_pusch_power = 39; // operating uplink power
|
optional int32 ul_pusch_power = 39; // operating uplink power
|
||||||
|
repeated flex_plmn plmn_id = 40; // The PLMN cell id of this cell
|
||||||
|
|
||||||
optional flex_slice_config slice_config = 42;
|
optional flex_slice_config slice_config = 42;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ message flexran_message {
|
|||||||
flex_agent_reconfiguration agent_reconfiguration_msg = 17;
|
flex_agent_reconfiguration agent_reconfiguration_msg = 17;
|
||||||
flex_rrc_triggering rrc_triggering = 18;
|
flex_rrc_triggering rrc_triggering = 18;
|
||||||
flex_ul_mac_config ul_mac_config_msg = 19;
|
flex_ul_mac_config ul_mac_config_msg = 19;
|
||||||
|
flex_disconnect disconnect_msg = 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,9 +65,21 @@ enum flexran_err {
|
|||||||
//
|
//
|
||||||
// Maintenance and discovery messages
|
// Maintenance and discovery messages
|
||||||
//
|
//
|
||||||
|
enum flex_bs_capability {
|
||||||
|
LOPHY = 0;
|
||||||
|
HIPHY = 1;
|
||||||
|
LOMAC = 2;
|
||||||
|
HIMAC = 3;
|
||||||
|
RLC = 4;
|
||||||
|
PDCP = 5;
|
||||||
|
SDAP = 6;
|
||||||
|
RRC = 7;
|
||||||
|
}
|
||||||
|
|
||||||
message flex_hello {
|
message flex_hello {
|
||||||
optional flex_header header = 1;
|
optional flex_header header = 1;
|
||||||
|
optional uint64 bs_id = 2; // Unique id to distinguish the eNB
|
||||||
|
repeated flex_bs_capability capabilities = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message flex_echo_request {
|
message flex_echo_request {
|
||||||
@@ -131,7 +144,6 @@ message flex_enb_config_request {
|
|||||||
|
|
||||||
message flex_enb_config_reply {
|
message flex_enb_config_reply {
|
||||||
optional flex_header header = 1;
|
optional flex_header header = 1;
|
||||||
optional uint64 eNB_id = 2; // Unique id to distinguish the eNB
|
|
||||||
repeated flex_cell_config cell_config = 3;
|
repeated flex_cell_config cell_config = 3;
|
||||||
optional uint32 device_spec = 4;
|
optional uint32 device_spec = 4;
|
||||||
}
|
}
|
||||||
@@ -223,4 +235,6 @@ message flex_echo_reply_latency {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message flex_disconnect {
|
||||||
|
optional flex_header header = 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ enum flex_type {
|
|||||||
FLPT_HELLO = 0;
|
FLPT_HELLO = 0;
|
||||||
FLPT_ECHO_REQUEST = 1;
|
FLPT_ECHO_REQUEST = 1;
|
||||||
FLPT_ECHO_REPLY = 2;
|
FLPT_ECHO_REPLY = 2;
|
||||||
|
FLPT_DISCONNECT = 20;
|
||||||
|
|
||||||
// Statistics and measurement messages
|
// Statistics and measurement messages
|
||||||
FLPT_STATS_REQUEST = 3;
|
FLPT_STATS_REQUEST = 3;
|
||||||
|
|||||||
+146
-148
@@ -34,6 +34,7 @@
|
|||||||
#include "enb_config.h"
|
#include "enb_config.h"
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include "common/ran_context.h"
|
#include "common/ran_context.h"
|
||||||
|
#include "targets/RT/USER/lte-softmodem.h"
|
||||||
|
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
# include "s1ap_eNB.h"
|
# include "s1ap_eNB.h"
|
||||||
# include "sctp_eNB_task.h"
|
# include "sctp_eNB_task.h"
|
||||||
# include "gtpv1u_eNB_task.h"
|
# include "gtpv1u_eNB_task.h"
|
||||||
|
# include "flexran_agent.h"
|
||||||
|
|
||||||
# include "x2ap_eNB.h"
|
# include "x2ap_eNB.h"
|
||||||
# include "x2ap_messages_types.h"
|
# include "x2ap_messages_types.h"
|
||||||
@@ -49,74 +51,47 @@
|
|||||||
#include "openair1/PHY/INIT/phy_init.h"
|
#include "openair1/PHY/INIT/phy_init.h"
|
||||||
extern unsigned char NB_eNB_INST;
|
extern unsigned char NB_eNB_INST;
|
||||||
|
|
||||||
|
|
||||||
extern RAN_CONTEXT_t RC;
|
extern RAN_CONTEXT_t RC;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
# define ENB_REGISTER_RETRY_DELAY 10
|
# define ENB_REGISTER_RETRY_DELAY 10
|
||||||
|
|
||||||
|
|
||||||
#include "targets/RT/USER/lte-softmodem.h"
|
#include "targets/RT/USER/lte-softmodem.h"
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
static void configure_phy(module_id_t enb_id, const Enb_properties_array_t* enb_properties)
|
|
||||||
{
|
|
||||||
MessageDef *msg_p;
|
|
||||||
int CC_id;
|
|
||||||
|
|
||||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, PHY_CONFIGURATION_REQ);
|
|
||||||
|
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).frame_type[CC_id] = enb_properties->properties[enb_id]->frame_type[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).prefix_type[CC_id] = enb_properties->properties[enb_id]->prefix_type[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).downlink_frequency[CC_id] = enb_properties->properties[enb_id]->downlink_frequency[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[CC_id] = enb_properties->properties[enb_id]->uplink_frequency_offset[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).nb_antennas_tx[CC_id] = enb_properties->properties[enb_id]->nb_antennas_tx[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).nb_antennas_rx[CC_id] = enb_properties->properties[enb_id]->nb_antennas_rx[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).tx_gain[CC_id] = enb_properties->properties[enb_id]->tx_gain[CC_id];
|
|
||||||
PHY_CONFIGURATION_REQ (msg_p).rx_gain[CC_id] = enb_properties->properties[enb_id]->rx_gain[CC_id];
|
|
||||||
}
|
|
||||||
|
|
||||||
itti_send_msg_to_task (TASK_PHY_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
|
||||||
static void configure_rrc(uint32_t enb_id) {
|
|
||||||
MessageDef *msg_p = NULL;
|
|
||||||
// int CC_id;
|
|
||||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
|
||||||
|
|
||||||
if (RC.rrc[enb_id]) {
|
|
||||||
RCconfig_RRC(msg_p,enb_id, RC.rrc[enb_id]);
|
|
||||||
LOG_I(ENB_APP,"Sending configuration message to RRC task\n");
|
|
||||||
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
|
||||||
} else AssertFatal(0,"RRC context for eNB %d not allocated\n",enb_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end) { //, const Enb_properties_array_t *enb_properties)
|
static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, uint32_t enb_id_end) {
|
||||||
uint32_t enb_id;
|
uint32_t enb_id;
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
uint32_t register_enb_pending = 0;
|
uint32_t register_enb_pending = 0;
|
||||||
|
|
||||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||||
{
|
{
|
||||||
/* note: there is an implicit relationship between the data structure and the message name */
|
if (NODE_IS_DU(node_type)) { // F1AP registration
|
||||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
// configure F1AP here for F1C
|
||||||
RCconfig_S1(msg_p, enb_id);
|
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
|
||||||
|
msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
|
||||||
|
RCconfig_DU_F1(msg_p, enb_id);
|
||||||
|
|
||||||
if (enb_id == 0) RCconfig_gtpu();
|
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||||
|
itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||||
|
// configure GTPu here for F1U
|
||||||
|
}
|
||||||
|
else { // S1AP registration
|
||||||
|
/* note: there is an implicit relationship between the data structure and the message name */
|
||||||
|
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||||
|
RCconfig_S1(msg_p, enb_id);
|
||||||
|
|
||||||
|
if (enb_id == 0) RCconfig_gtpu();
|
||||||
|
|
||||||
|
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
|
||||||
|
|
||||||
|
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||||
|
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||||
|
}
|
||||||
|
|
||||||
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
|
|
||||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
|
||||||
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
|
||||||
register_enb_pending++;
|
register_enb_pending++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,48 +124,26 @@ void *eNB_app_task(void *args_p) {
|
|||||||
uint32_t enb_id_start = 0;
|
uint32_t enb_id_start = 0;
|
||||||
uint32_t enb_id_end = enb_id_start + enb_nb;
|
uint32_t enb_id_end = enb_id_start + enb_nb;
|
||||||
uint32_t register_enb_pending=0;
|
uint32_t register_enb_pending=0;
|
||||||
uint32_t registered_enb;
|
uint32_t registered_enb=0;
|
||||||
long enb_register_retry_timer_id;
|
long enb_register_retry_timer_id;
|
||||||
uint32_t x2_register_enb_pending = 0;
|
uint32_t x2_register_enb_pending = 0;
|
||||||
uint32_t x2_registered_enb = 0;
|
uint32_t x2_registered_enb = 0;
|
||||||
long x2_enb_register_retry_timer_id;
|
long x2_enb_register_retry_timer_id;
|
||||||
uint32_t enb_id;
|
|
||||||
MessageDef *msg_p = NULL;
|
MessageDef *msg_p = NULL;
|
||||||
instance_t instance;
|
instance_t instance;
|
||||||
int result;
|
int result;
|
||||||
/* for no gcc warnings */
|
/* for no gcc warnings */
|
||||||
(void)instance;
|
(void)instance;
|
||||||
itti_mark_task_ready (TASK_ENB_APP);
|
itti_mark_task_ready (TASK_ENB_APP);
|
||||||
LOG_I(PHY, "%s() Task ready initialise structures\n", __FUNCTION__);
|
|
||||||
RCconfig_L1();
|
|
||||||
RCconfig_macrlc();
|
|
||||||
LOG_I(PHY, "%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst);
|
|
||||||
|
|
||||||
if (RC.nb_L1_inst>0) AssertFatal(l1_north_init_eNB()==0,"could not initialize L1 north interface\n");
|
|
||||||
|
|
||||||
AssertFatal (enb_nb <= RC.nb_inst,
|
|
||||||
"Number of eNB is greater than eNB defined in configuration file (%d/%d)!",
|
|
||||||
enb_nb, RC.nb_inst);
|
|
||||||
LOG_I(ENB_APP,"Allocating eNB_RRC_INST for %d instances\n",RC.nb_inst);
|
|
||||||
RC.rrc = (eNB_RRC_INST **)malloc(RC.nb_inst*sizeof(eNB_RRC_INST *));
|
|
||||||
LOG_I(PHY, "%s() RC.nb_inst:%d RC.rrc:%p\n", __FUNCTION__, RC.nb_inst, RC.rrc);
|
|
||||||
|
|
||||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
|
||||||
RC.rrc[enb_id] = (eNB_RRC_INST *)malloc(sizeof(eNB_RRC_INST));
|
|
||||||
LOG_I(PHY, "%s() Creating RRC instance RC.rrc[%d]:%p (%d of %d)\n", __FUNCTION__, enb_id, RC.rrc[enb_id], enb_id+1, enb_id_end);
|
|
||||||
memset((void *)RC.rrc[enb_id],0,sizeof(eNB_RRC_INST));
|
|
||||||
configure_rrc(enb_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* Try to register each eNB */
|
||||||
|
// This assumes that node_type of all RRC instances is the same
|
||||||
if (EPC_MODE_ENABLED) {
|
if (EPC_MODE_ENABLED) {
|
||||||
/* Try to register each eNB */
|
register_enb_pending = eNB_app_register(RC.rrc[0]->node_type, enb_id_start, enb_id_end);
|
||||||
registered_enb = 0;
|
|
||||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_x2ap_enabled()) {
|
|
||||||
/* Try to register each eNB with each other */
|
/* Try to register each eNB with each other */
|
||||||
x2_registered_enb = 0;
|
if (is_x2ap_enabled() && !NODE_IS_DU(RC.rrc[0]->node_type)) {
|
||||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,20 +153,21 @@ void *eNB_app_task(void *args_p) {
|
|||||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||||
|
|
||||||
switch (ITTI_MSG_ID(msg_p)) {
|
switch (ITTI_MSG_ID(msg_p)) {
|
||||||
case TERMINATE_MESSAGE:
|
case TERMINATE_MESSAGE:
|
||||||
LOG_W(ENB_APP, " *** Exiting ENB_APP thread\n");
|
LOG_W(ENB_APP, " *** Exiting ENB_APP thread\n");
|
||||||
itti_exit_task ();
|
itti_exit_task ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MESSAGE_TEST:
|
case MESSAGE_TEST:
|
||||||
LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
|
LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SOFT_RESTART_MESSAGE:
|
case SOFT_RESTART_MESSAGE:
|
||||||
handle_reconfiguration(instance);
|
handle_reconfiguration(instance);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S1AP_REGISTER_ENB_CNF:
|
case S1AP_REGISTER_ENB_CNF:
|
||||||
|
AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
|
||||||
if (EPC_MODE_ENABLED) {
|
if (EPC_MODE_ENABLED) {
|
||||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||||
@@ -243,87 +197,131 @@ void *eNB_app_task(void *args_p) {
|
|||||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||||
/* Restart the registration process */
|
/* Restart the registration process */
|
||||||
registered_enb = 0;
|
registered_enb = 0;
|
||||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* if (EPC_MODE_ENABLED) */
|
} /* if (EPC_MODE_ENABLED) */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S1AP_DEREGISTERED_ENB_IND:
|
case F1AP_SETUP_RESP:
|
||||||
if (EPC_MODE_ENABLED) {
|
AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/eNB\n");
|
||||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
|
||||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
|
||||||
/* TODO handle recovering of registration */
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
LOG_I(ENB_APP, "Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
|
||||||
|
F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
|
||||||
|
|
||||||
case TIMER_HAS_EXPIRED:
|
handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
|
||||||
if (EPC_MODE_ENABLED) {
|
|
||||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
|
||||||
|
|
||||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
DevAssert(register_enb_pending > 0);
|
||||||
|
register_enb_pending--;
|
||||||
|
|
||||||
|
/* Check if at least eNB is registered with one MME */
|
||||||
|
if (F1AP_SETUP_RESP(msg_p).num_cells_to_activate > 0) {
|
||||||
|
registered_enb++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check if all register eNB requests have been processed */
|
||||||
|
if (register_enb_pending == 0) {
|
||||||
|
if (registered_enb == enb_nb) {
|
||||||
|
/* If all eNB cells are registered, start L2L1 task */
|
||||||
|
MessageDef *msg_init_p;
|
||||||
|
|
||||||
|
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||||
|
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||||
|
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||||
|
|
||||||
|
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||||
|
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||||
|
NULL, &enb_register_retry_timer_id) < 0) {
|
||||||
|
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||||
|
|
||||||
|
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||||
/* Restart the registration process */
|
/* Restart the registration process */
|
||||||
registered_enb = 0;
|
registered_enb = 0;
|
||||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);//, enb_properties_p);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
break;
|
||||||
|
|
||||||
|
case S1AP_DEREGISTERED_ENB_IND:
|
||||||
|
if (EPC_MODE_ENABLED) {
|
||||||
|
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||||
|
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||||
|
/* TODO handle recovering of registration */
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TIMER_HAS_EXPIRED:
|
||||||
|
if (EPC_MODE_ENABLED) {
|
||||||
|
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||||
|
|
||||||
|
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||||
|
/* Restart the registration process */
|
||||||
|
registered_enb = 0;
|
||||||
|
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type, enb_id_start, enb_id_end);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
||||||
|
/* Restart the registration process */
|
||||||
|
x2_registered_enb = 0;
|
||||||
|
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||||
|
}
|
||||||
|
} /* if (EPC_MODE_ENABLED) */
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case X2AP_DEREGISTERED_ENB_IND:
|
||||||
|
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||||
|
X2AP_DEREGISTERED_ENB_IND(msg_p).nb_x2);
|
||||||
|
/* TODO handle recovering of registration */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case X2AP_REGISTER_ENB_CNF:
|
||||||
|
LOG_I(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||||
|
X2AP_REGISTER_ENB_CNF(msg_p).nb_x2);
|
||||||
|
DevAssert(x2_register_enb_pending > 0);
|
||||||
|
x2_register_enb_pending--;
|
||||||
|
|
||||||
|
/* Check if at least eNB is registered with one target eNB */
|
||||||
|
if (X2AP_REGISTER_ENB_CNF(msg_p).nb_x2 > 0) {
|
||||||
|
x2_registered_enb++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check if all register eNB requests have been processed */
|
||||||
|
if (x2_register_enb_pending == 0) {
|
||||||
|
if (x2_registered_enb == enb_nb) {
|
||||||
|
/* If all eNB are registered, start RRC HO task */
|
||||||
|
} else {
|
||||||
|
uint32_t x2_not_associated = enb_nb - x2_registered_enb;
|
||||||
|
LOG_W(ENB_APP, " %d eNB %s not associated with the target\n",
|
||||||
|
x2_not_associated, x2_not_associated > 1 ? "are" : "is");
|
||||||
|
|
||||||
|
// timer to retry
|
||||||
|
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||||
|
if (timer_setup (X2AP_ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP,
|
||||||
|
INSTANCE_DEFAULT, TIMER_ONE_SHOT, NULL,
|
||||||
|
&x2_enb_register_retry_timer_id) < 0) {
|
||||||
|
LOG_E(ENB_APP, " Can not start eNB X2AP register: retry timer, use \"sleep\" instead!\n");
|
||||||
|
sleep(X2AP_ENB_REGISTER_RETRY_DELAY);
|
||||||
/* Restart the registration process */
|
/* Restart the registration process */
|
||||||
x2_registered_enb = 0;
|
x2_registered_enb = 0;
|
||||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||||
}
|
}
|
||||||
} /* if (EPC_MODE_ENABLED) */
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case X2AP_DEREGISTERED_ENB_IND:
|
|
||||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
|
||||||
X2AP_DEREGISTERED_ENB_IND(msg_p).nb_x2);
|
|
||||||
/* TODO handle recovering of registration */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case X2AP_REGISTER_ENB_CNF:
|
|
||||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
|
|
||||||
X2AP_REGISTER_ENB_CNF(msg_p).nb_x2);
|
|
||||||
DevAssert(x2_register_enb_pending > 0);
|
|
||||||
x2_register_enb_pending--;
|
|
||||||
|
|
||||||
/* Check if at least eNB is registered with one target eNB */
|
|
||||||
if (X2AP_REGISTER_ENB_CNF(msg_p).nb_x2 > 0) {
|
|
||||||
x2_registered_enb++;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if all register eNB requests have been processed */
|
break;
|
||||||
if (x2_register_enb_pending == 0) {
|
|
||||||
if (x2_registered_enb == enb_nb) {
|
|
||||||
/* If all eNB are registered, start RRC HO task */
|
|
||||||
} else {
|
|
||||||
uint32_t x2_not_associated = enb_nb - x2_registered_enb;
|
|
||||||
LOG_W(ENB_APP, " %d eNB %s not associated with the target\n",
|
|
||||||
x2_not_associated, x2_not_associated > 1 ? "are" : "is");
|
|
||||||
|
|
||||||
// timer to retry
|
default:
|
||||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||||
if (timer_setup (X2AP_ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP,
|
break;
|
||||||
INSTANCE_DEFAULT, TIMER_ONE_SHOT, NULL,
|
|
||||||
&x2_enb_register_retry_timer_id) < 0) {
|
|
||||||
LOG_E(ENB_APP, " Can not start eNB X2AP register: retry timer, use \"sleep\" instead!\n");
|
|
||||||
sleep(X2AP_ENB_REGISTER_RETRY_DELAY);
|
|
||||||
/* Restart the registration process */
|
|
||||||
x2_registered_enb = 0;
|
|
||||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||||
|
|||||||
+1362
-927
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@
|
|||||||
#include "PHY/impl_defs_lte.h"
|
#include "PHY/impl_defs_lte.h"
|
||||||
#include "PHY/defs_eNB.h"
|
#include "PHY/defs_eNB.h"
|
||||||
#include "s1ap_messages_types.h"
|
#include "s1ap_messages_types.h"
|
||||||
|
#include "f1ap_messages_types.h"
|
||||||
#include "LTE_SystemInformationBlockType2.h"
|
#include "LTE_SystemInformationBlockType2.h"
|
||||||
#include "rrc_messages_types.h"
|
#include "rrc_messages_types.h"
|
||||||
#include "RRC/LTE/rrc_defs.h"
|
#include "RRC/LTE/rrc_defs.h"
|
||||||
@@ -63,6 +64,9 @@
|
|||||||
// Hard to find a defined value for max enb...
|
// Hard to find a defined value for max enb...
|
||||||
#define MAX_ENB 16
|
#define MAX_ENB 16
|
||||||
|
|
||||||
|
#define MAX_DU 4
|
||||||
|
#define CU_BALANCING_ALL 127
|
||||||
|
#define CU_BALANCING_ROUND_ROBIN 126
|
||||||
|
|
||||||
typedef struct mme_ip_address_s {
|
typedef struct mme_ip_address_s {
|
||||||
unsigned ipv4:1;
|
unsigned ipv4:1;
|
||||||
@@ -72,6 +76,13 @@ typedef struct mme_ip_address_s {
|
|||||||
char *ipv6_address;
|
char *ipv6_address;
|
||||||
} mme_ip_address_t;
|
} mme_ip_address_t;
|
||||||
|
|
||||||
|
typedef struct cu_params {
|
||||||
|
const char *local_ipv4_address;
|
||||||
|
const uint16_t local_port;
|
||||||
|
const char *remote_ipv4_address;
|
||||||
|
const int16_t remote_port;
|
||||||
|
} cudu_params_t;
|
||||||
|
|
||||||
typedef struct ru_config_s {
|
typedef struct ru_config_s {
|
||||||
// indicates if local or remote rf is used (1 == LOCAL)
|
// indicates if local or remote rf is used (1 == LOCAL)
|
||||||
unsigned local_rf:1;
|
unsigned local_rf:1;
|
||||||
@@ -93,7 +104,7 @@ typedef struct ru_config_s {
|
|||||||
extern void RCconfig_RU(void);
|
extern void RCconfig_RU(void);
|
||||||
extern void RCconfig_flexran(void);
|
extern void RCconfig_flexran(void);
|
||||||
extern void RCconfig_L1(void);
|
extern void RCconfig_L1(void);
|
||||||
extern void RCconfig_macrlc(void);
|
extern void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]);
|
||||||
extern void UE_config_stub_pnf(void);
|
extern void UE_config_stub_pnf(void);
|
||||||
extern int RCconfig_gtpu(void );
|
extern int RCconfig_gtpu(void );
|
||||||
extern void RCConfig(void);
|
extern void RCConfig(void);
|
||||||
@@ -101,12 +112,17 @@ extern void RCConfig(void);
|
|||||||
void enb_config_display(void);
|
void enb_config_display(void);
|
||||||
void ru_config_display(void);
|
void ru_config_display(void);
|
||||||
|
|
||||||
int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
|
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1);
|
||||||
int RCconfig_S1(MessageDef *msg_p, uint32_t i);
|
int RCconfig_S1(MessageDef *msg_p, uint32_t i);
|
||||||
|
|
||||||
|
void read_config_and_init(void);
|
||||||
int RCconfig_X2(MessageDef *msg_p, uint32_t i);
|
int RCconfig_X2(MessageDef *msg_p, uint32_t i);
|
||||||
|
|
||||||
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname);
|
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname);
|
||||||
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath);
|
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath);
|
||||||
|
|
||||||
|
int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i);
|
||||||
|
void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
|
||||||
|
|
||||||
#endif /* ENB_CONFIG_H_ */
|
#endif /* ENB_CONFIG_H_ */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ typedef enum {
|
|||||||
#define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances"
|
#define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances"
|
||||||
#define CONFIG_STRING_RU_SDR_ADDRS "sdr_addrs"
|
#define CONFIG_STRING_RU_SDR_ADDRS "sdr_addrs"
|
||||||
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
|
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
|
||||||
|
#define CONFIG_STRING_RU_SF_EXTENSION "sf_extension"
|
||||||
|
#define CONFIG_STRING_RU_END_OF_BURST_DELAY "end_of_burst_delay"
|
||||||
|
|
||||||
#define RU_LOCAL_IF_NAME_IDX 0
|
#define RU_LOCAL_IF_NAME_IDX 0
|
||||||
#define RU_LOCAL_ADDRESS_IDX 1
|
#define RU_LOCAL_ADDRESS_IDX 1
|
||||||
@@ -122,6 +124,8 @@ typedef enum {
|
|||||||
#define RU_NBIOTRRC_LIST_IDX 17
|
#define RU_NBIOTRRC_LIST_IDX 17
|
||||||
#define RU_SDR_ADDRS 18
|
#define RU_SDR_ADDRS 18
|
||||||
#define RU_SDR_CLK_SRC 19
|
#define RU_SDR_CLK_SRC 19
|
||||||
|
#define RU_SF_EXTENSION_IDX 20
|
||||||
|
#define RU_END_OF_BURST_DELAY_IDX 21
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -149,7 +153,9 @@ typedef enum {
|
|||||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||||
|
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||||
|
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -197,7 +203,7 @@ typedef enum {
|
|||||||
#define ENB_CONFIG_STRING_REMOTE_S_PORTC "remote_s_portc"
|
#define ENB_CONFIG_STRING_REMOTE_S_PORTC "remote_s_portc"
|
||||||
#define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
|
#define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
|
||||||
#define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
#define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
||||||
|
#define ENB_CONFIG_STRING_NR_CELLID "nr_cellid"
|
||||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* cell configuration parameters */
|
/* cell configuration parameters */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
@@ -217,6 +223,7 @@ typedef enum {
|
|||||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||||
}
|
}
|
||||||
#define ENB_ENB_ID_IDX 0
|
#define ENB_ENB_ID_IDX 0
|
||||||
#define ENB_CELL_TYPE_IDX 1
|
#define ENB_CELL_TYPE_IDX 1
|
||||||
@@ -232,6 +239,7 @@ typedef enum {
|
|||||||
#define ENB_REMOTE_S_PORTC_IDX 11
|
#define ENB_REMOTE_S_PORTC_IDX 11
|
||||||
#define ENB_LOCAL_S_PORTD_IDX 12
|
#define ENB_LOCAL_S_PORTD_IDX 12
|
||||||
#define ENB_REMOTE_S_PORTD_IDX 13
|
#define ENB_REMOTE_S_PORTD_IDX 13
|
||||||
|
#define ENB_NRCELLID_IDX 14
|
||||||
|
|
||||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||||
#define ENBPARAMS_CHECK { \
|
#define ENBPARAMS_CHECK { \
|
||||||
@@ -957,6 +965,58 @@ typedef struct srb1_params_s {
|
|||||||
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* CU/DU configuration section names*/
|
||||||
|
#define CONFIG_STRING_DU_LIST "DU"
|
||||||
|
#define CONFIG_STRING_CU_LIST "CU"
|
||||||
|
#define DU_TYPE_LTE 0
|
||||||
|
#define DU_TYPE_WIFI 1
|
||||||
|
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||||
|
#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U"
|
||||||
|
#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U"
|
||||||
|
#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U"
|
||||||
|
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||||
|
#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE"
|
||||||
|
|
||||||
|
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||||
|
#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U"
|
||||||
|
#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U"
|
||||||
|
#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U"
|
||||||
|
#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE"
|
||||||
|
|
||||||
|
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||||
|
|
||||||
|
#define CUPARAMS_DESC { \
|
||||||
|
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DUPARAMS_DESC { \
|
||||||
|
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||||
|
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CU_BAL_DESC { \
|
||||||
|
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CU_INTERFACE_F1U 0
|
||||||
|
#define CU_ADDRESS_F1U 1
|
||||||
|
#define CU_PORT_F1U 2
|
||||||
|
#define CU_TYPE_F1U 3
|
||||||
|
|
||||||
|
#define DU_INTERFACE_F1U 0
|
||||||
|
#define DU_ADDRESS_F1U 1
|
||||||
|
#define DU_PORT_F1U 2
|
||||||
|
#define DU_TYPE_F1U 3
|
||||||
|
#define DU_TECH 4
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* MACRLC configuration section names */
|
/* MACRLC configuration section names */
|
||||||
|
|||||||
@@ -180,4 +180,3 @@ typedef struct ccparams_sidelink_s {
|
|||||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \
|
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,12 @@
|
|||||||
* \version 0.1
|
* \version 0.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
#include "flexran_agent.h"
|
#include "flexran_agent.h"
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
void *send_thread(void *args);
|
|
||||||
void *receive_thread(void *args);
|
void *receive_thread(void *args);
|
||||||
pthread_t new_thread(void *(*f)(void *), void *b);
|
pthread_t new_thread(void *(*f)(void *), void *b);
|
||||||
Protocol__FlexranMessage *flexran_agent_timeout(void* args);
|
Protocol__FlexranMessage *flexran_agent_timeout(void* args);
|
||||||
@@ -110,10 +111,11 @@ void *receive_thread(void *args) {
|
|||||||
err_code_t err_code=0;
|
err_code_t err_code=0;
|
||||||
|
|
||||||
Protocol__FlexranMessage *msg;
|
Protocol__FlexranMessage *msg;
|
||||||
|
pthread_setname_np(pthread_self(), "flexran_rx_thr");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
while (flexran_agent_msg_recv(d->mod_id, FLEXRAN_AGENT_DEFAULT, &data, &size, &priority) == 0) {
|
while ((size = flexran_agent_msg_recv(d->mod_id, FLEXRAN_AGENT_DEFAULT, &data, &priority)) > 0) {
|
||||||
|
|
||||||
LOG_D(FLEXRAN_AGENT,"received message with size %d\n", size);
|
LOG_D(FLEXRAN_AGENT,"received message with size %d\n", size);
|
||||||
|
|
||||||
@@ -201,6 +203,11 @@ int flexran_agent_start(mid_t mod_id)
|
|||||||
/*Create the async channel info*/
|
/*Create the async channel info*/
|
||||||
flexran_agent_async_channel_t *channel_info = flexran_agent_async_channel_info(mod_id, in_ip, in_port);
|
flexran_agent_async_channel_t *channel_info = flexran_agent_async_channel_info(mod_id, in_ip, in_port);
|
||||||
|
|
||||||
|
if (!channel_info) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not create channel_info\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
/*Create a channel using the async channel info*/
|
/*Create a channel using the async channel info*/
|
||||||
channel_id = flexran_agent_create_channel((void *) channel_info,
|
channel_id = flexran_agent_create_channel((void *) channel_info,
|
||||||
flexran_agent_async_msg_send,
|
flexran_agent_async_msg_send,
|
||||||
@@ -209,12 +216,14 @@ int flexran_agent_start(mid_t mod_id)
|
|||||||
|
|
||||||
|
|
||||||
if (channel_id <= 0) {
|
if (channel_id <= 0) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not create channel\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
flexran_agent_channel_t *channel = get_channel(channel_id);
|
flexran_agent_channel_t *channel = get_channel(channel_id);
|
||||||
|
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not get channel for channel_id %d\n", channel_id);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,21 +235,48 @@ int flexran_agent_start(mid_t mod_id)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*Initialize the continuous stats update mechanism*/
|
/*Initialize the continuous stats update mechanism*/
|
||||||
flexran_agent_init_cont_stats_update(mod_id);
|
if (flexran_agent_init_cont_stats_update(mod_id) < 0) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not initialize continuous stats updates\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
new_thread(receive_thread, flexran);
|
new_thread(receive_thread, flexran);
|
||||||
|
|
||||||
/*Initialize and register the mac xface. Must be modified later
|
/* Register and initialize the control modules depending on capabilities.
|
||||||
*for more flexibility in agent management */
|
* After registering, calling flexran_agent_get_*_xface() tells whether a
|
||||||
|
* control module is operational */
|
||||||
|
uint16_t caps = flexran_get_capabilities_mask(mod_id);
|
||||||
|
LOG_I(FLEXRAN_AGENT, "Agent handles BS ID %ld, capabilities=0x%x => handling%s%s%s%s%s%s%s%s\n",
|
||||||
|
flexran_get_bs_id(mod_id), caps,
|
||||||
|
FLEXRAN_CAP_LOPHY(caps) ? " LOPHY" : "",
|
||||||
|
FLEXRAN_CAP_HIPHY(caps) ? " HIPHY" : "",
|
||||||
|
FLEXRAN_CAP_LOMAC(caps) ? " LOMAC" : "",
|
||||||
|
FLEXRAN_CAP_HIMAC(caps) ? " HIMAC" : "",
|
||||||
|
FLEXRAN_CAP_RLC(caps) ? " RLC" : "",
|
||||||
|
FLEXRAN_CAP_PDCP(caps) ? " PDCP" : "",
|
||||||
|
FLEXRAN_CAP_SDAP(caps) ? " SDAP" : "",
|
||||||
|
FLEXRAN_CAP_RRC(caps) ? " RRC" : "");
|
||||||
|
|
||||||
AGENT_MAC_xface *mac_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
|
if (FLEXRAN_CAP_LOPHY(caps) || FLEXRAN_CAP_HIPHY(caps)) {
|
||||||
flexran_agent_register_mac_xface(mod_id, mac_agent_xface);
|
flexran_agent_register_phy_xface(mod_id);
|
||||||
|
LOG_I(FLEXRAN_AGENT, "registered PHY interface/CM for eNB %d\n", mod_id);
|
||||||
|
}
|
||||||
|
|
||||||
AGENT_RRC_xface *rrc_agent_xface = (AGENT_RRC_xface *) malloc(sizeof(AGENT_RRC_xface));
|
if (FLEXRAN_CAP_LOMAC(caps) || FLEXRAN_CAP_HIMAC(caps)) {
|
||||||
flexran_agent_register_rrc_xface(mod_id, rrc_agent_xface);
|
flexran_agent_register_mac_xface(mod_id);
|
||||||
|
flexran_agent_init_mac_agent(mod_id);
|
||||||
|
LOG_I(FLEXRAN_AGENT, "registered MAC interface/CM for eNB %d\n", mod_id);
|
||||||
|
}
|
||||||
|
|
||||||
AGENT_PDCP_xface *pdcp_agent_xface = (AGENT_PDCP_xface *) malloc(sizeof(AGENT_PDCP_xface));
|
if (FLEXRAN_CAP_RRC(caps)) {
|
||||||
flexran_agent_register_pdcp_xface(mod_id, pdcp_agent_xface);
|
flexran_agent_register_rrc_xface(mod_id);
|
||||||
|
LOG_I(FLEXRAN_AGENT, "registered RRC interface/CM for eNB %d\n", mod_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FLEXRAN_CAP_PDCP(caps)) {
|
||||||
|
flexran_agent_register_pdcp_xface(mod_id);
|
||||||
|
LOG_I(FLEXRAN_AGENT, "registered PDCP interface/CM for eNB %d\n", mod_id);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* initilize a timer
|
* initilize a timer
|
||||||
@@ -248,11 +284,6 @@ int flexran_agent_start(mid_t mod_id)
|
|||||||
|
|
||||||
flexran_agent_init_timer();
|
flexran_agent_init_timer();
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize the mac agent
|
|
||||||
*/
|
|
||||||
flexran_agent_init_mac_agent(mod_id);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* start the enb agent task for tx and interaction with the underlying network function
|
* start the enb agent task for tx and interaction with the underlying network function
|
||||||
*/
|
*/
|
||||||
@@ -288,7 +319,7 @@ int flexran_agent_start(mid_t mod_id)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
LOG_I(FLEXRAN_AGENT,"there was an error\n");
|
LOG_E(FLEXRAN_AGENT, "%s(): there was an error\n", __func__);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "flexran_agent_defs.h"
|
#include "flexran_agent_defs.h"
|
||||||
#include "flexran_agent_net_comm.h"
|
#include "flexran_agent_net_comm.h"
|
||||||
#include "flexran_agent_ran_api.h"
|
#include "flexran_agent_ran_api.h"
|
||||||
|
#include "flexran_agent_phy.h"
|
||||||
#include "flexran_agent_mac.h"
|
#include "flexran_agent_mac.h"
|
||||||
#include "flexran_agent_rrc.h"
|
#include "flexran_agent_rrc.h"
|
||||||
#include "flexran_agent_pdcp.h"
|
#include "flexran_agent_pdcp.h"
|
||||||
|
|||||||
@@ -36,13 +36,18 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
|||||||
flexran_agent_async_channel_t *channel;
|
flexran_agent_async_channel_t *channel;
|
||||||
channel = (flexran_agent_async_channel_t *) malloc(sizeof(flexran_agent_channel_t));
|
channel = (flexran_agent_async_channel_t *) malloc(sizeof(flexran_agent_channel_t));
|
||||||
|
|
||||||
if (channel == NULL)
|
if (channel == NULL) {
|
||||||
goto error;
|
LOG_E(FLEXRAN_AGENT, "could not allocate memory for flexran_agent_async_channel_t\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
channel->enb_id = mod_id;
|
channel->enb_id = mod_id;
|
||||||
/*Create a socket*/
|
/*Create a socket*/
|
||||||
channel->link = new_link_client(dst_ip, dst_port);
|
channel->link = new_link_client(dst_ip, dst_port);
|
||||||
if (channel->link == NULL) goto error;
|
if (channel->link == NULL) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not create new link client\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
LOG_I(FLEXRAN_AGENT,"starting enb agent client for module id %d on ipv4 %s, port %d\n",
|
LOG_I(FLEXRAN_AGENT,"starting enb agent client for module id %d on ipv4 %s, port %d\n",
|
||||||
channel->enb_id,
|
channel->enb_id,
|
||||||
@@ -53,21 +58,32 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
|||||||
* create a message queue
|
* create a message queue
|
||||||
*/
|
*/
|
||||||
// Set size of queues statically for now
|
// Set size of queues statically for now
|
||||||
channel->send_queue = new_message_queue(500);
|
// channel->send_queue = new_message_queue(500);
|
||||||
if (channel->send_queue == NULL) goto error;
|
// not using the circular buffer: affects the PDCP split
|
||||||
channel->receive_queue = new_message_queue(500);
|
channel->send_queue = new_message_queue();
|
||||||
if (channel->receive_queue == NULL) goto error;
|
if (channel->send_queue == NULL) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not create send_queue\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
// not using the circular buffer: affects the PDCP split
|
||||||
|
//channel->receive_queue = new_message_queue(500);
|
||||||
|
channel->receive_queue = new_message_queue();
|
||||||
|
if (channel->receive_queue == NULL) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not create send_queue\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/* create a link manager */
|
||||||
* create a link manager
|
|
||||||
*/
|
|
||||||
channel->manager = create_link_manager(channel->send_queue, channel->receive_queue, channel->link);
|
channel->manager = create_link_manager(channel->send_queue, channel->receive_queue, channel->link);
|
||||||
if (channel->manager == NULL) goto error;
|
if (channel->manager == NULL) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "could not create link_manager\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
return channel;
|
return channel;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
LOG_I(FLEXRAN_AGENT,"there was an error\n");
|
LOG_I(FLEXRAN_AGENT, "%s(): there was an error\n", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,11 +94,11 @@ int flexran_agent_async_msg_send(void *data, int size, int priority, void *chann
|
|||||||
return message_put(channel->send_queue, data, size, priority);
|
return message_put(channel->send_queue, data, size, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info) {
|
int flexran_agent_async_msg_recv(void **data, int *priority, void *channel_info) {
|
||||||
flexran_agent_async_channel_t *channel;
|
flexran_agent_async_channel_t *channel;
|
||||||
channel = (flexran_agent_async_channel_t *)channel_info;
|
channel = (flexran_agent_async_channel_t *)channel_info;
|
||||||
|
|
||||||
return message_get(channel->receive_queue, data, size, priority);
|
return message_get(channel->receive_queue, data, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
void flexran_agent_async_release(flexran_agent_channel_t *channel) {
|
void flexran_agent_async_release(flexran_agent_channel_t *channel) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
|||||||
int flexran_agent_async_msg_send(void *data, int size, int priority, void *channel_info);
|
int flexran_agent_async_msg_send(void *data, int size, int priority, void *channel_info);
|
||||||
|
|
||||||
/* Receive a message from a given channel */
|
/* Receive a message from a given channel */
|
||||||
int flexran_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info);
|
int flexran_agent_async_msg_recv(void **data, int *priority, void *channel_info);
|
||||||
|
|
||||||
/* Release a channel */
|
/* Release a channel */
|
||||||
void flexran_agent_async_release(flexran_agent_channel_t *channel);
|
void flexran_agent_async_release(flexran_agent_channel_t *channel);
|
||||||
|
|||||||
@@ -35,6 +35,9 @@
|
|||||||
#include "flexran_agent_extern.h"
|
#include "flexran_agent_extern.h"
|
||||||
#include "flexran_agent_net_comm.h"
|
#include "flexran_agent_net_comm.h"
|
||||||
#include "flexran_agent_ran_api.h"
|
#include "flexran_agent_ran_api.h"
|
||||||
|
#include "flexran_agent_phy.h"
|
||||||
|
#include "flexran_agent_mac.h"
|
||||||
|
#include "flexran_agent_rrc.h"
|
||||||
//#include "PHY/extern.h"
|
//#include "PHY/extern.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "flexran_agent_mac_internal.h"
|
#include "flexran_agent_mac_internal.h"
|
||||||
@@ -121,6 +124,10 @@ int flexran_agent_hello(mid_t mod_id, const void *params, Protocol__FlexranMessa
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
hello_msg->header = header;
|
hello_msg->header = header;
|
||||||
|
hello_msg->bs_id = flexran_get_bs_id(mod_id);
|
||||||
|
hello_msg->has_bs_id = 1;
|
||||||
|
hello_msg->n_capabilities = flexran_get_capabilities(mod_id, &hello_msg->capabilities);
|
||||||
|
|
||||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||||
|
|
||||||
if(*msg == NULL)
|
if(*msg == NULL)
|
||||||
@@ -153,6 +160,7 @@ int flexran_agent_destroy_hello(Protocol__FlexranMessage *msg) {
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
free(msg->hello_msg->header);
|
free(msg->hello_msg->header);
|
||||||
|
free(msg->hello_msg->capabilities);
|
||||||
free(msg->hello_msg);
|
free(msg->hello_msg);
|
||||||
free(msg);
|
free(msg);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -283,25 +291,26 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
free(msg->enb_config_reply_msg->header);
|
free(msg->enb_config_reply_msg->header);
|
||||||
int i, j;
|
|
||||||
Protocol__FlexEnbConfigReply *reply = msg->enb_config_reply_msg;
|
Protocol__FlexEnbConfigReply *reply = msg->enb_config_reply_msg;
|
||||||
|
|
||||||
for(i = 0; i < reply->n_cell_config; i++) {
|
for (int i = 0; i < reply->n_cell_config; i++) {
|
||||||
free(reply->cell_config[i]->mbsfn_subframe_config_rfoffset);
|
if (reply->cell_config[i]->mbsfn_subframe_config_rfoffset)
|
||||||
free(reply->cell_config[i]->mbsfn_subframe_config_rfperiod);
|
free(reply->cell_config[i]->mbsfn_subframe_config_rfoffset);
|
||||||
free(reply->cell_config[i]->mbsfn_subframe_config_sfalloc);
|
if (reply->cell_config[i]->mbsfn_subframe_config_rfperiod)
|
||||||
|
free(reply->cell_config[i]->mbsfn_subframe_config_rfperiod);
|
||||||
|
if (reply->cell_config[i]->mbsfn_subframe_config_sfalloc);
|
||||||
|
free(reply->cell_config[i]->mbsfn_subframe_config_sfalloc);
|
||||||
|
|
||||||
if (reply->cell_config[i]->si_config != NULL) {
|
if (reply->cell_config[i]->si_config) {
|
||||||
for(j = 0; j < reply->cell_config[i]->si_config->n_si_message; j++) {
|
for(int j = 0; j < reply->cell_config[i]->si_config->n_si_message; j++) {
|
||||||
free(reply->cell_config[i]->si_config->si_message[j]);
|
free(reply->cell_config[i]->si_config->si_message[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(reply->cell_config[i]->si_config->si_message);
|
free(reply->cell_config[i]->si_config->si_message);
|
||||||
free(reply->cell_config[i]->si_config);
|
free(reply->cell_config[i]->si_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reply->cell_config[i]->slice_config != NULL) {
|
if (reply->cell_config[i]->slice_config) {
|
||||||
for (j = 0; j < reply->cell_config[i]->slice_config->n_dl; ++j) {
|
for (int j = 0; j < reply->cell_config[i]->slice_config->n_dl; ++j) {
|
||||||
if (reply->cell_config[i]->slice_config->dl[j]->n_sorting > 0)
|
if (reply->cell_config[i]->slice_config->dl[j]->n_sorting > 0)
|
||||||
free(reply->cell_config[i]->slice_config->dl[j]->sorting);
|
free(reply->cell_config[i]->slice_config->dl[j]->sorting);
|
||||||
|
|
||||||
@@ -310,8 +319,7 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(reply->cell_config[i]->slice_config->dl);
|
free(reply->cell_config[i]->slice_config->dl);
|
||||||
|
for (int j = 0; j < reply->cell_config[i]->slice_config->n_ul; ++j) {
|
||||||
for (j = 0; j < reply->cell_config[i]->slice_config->n_ul; ++j) {
|
|
||||||
if (reply->cell_config[i]->slice_config->ul[j]->n_sorting > 0)
|
if (reply->cell_config[i]->slice_config->ul[j]->n_sorting > 0)
|
||||||
free(reply->cell_config[i]->slice_config->ul[j]->sorting);
|
free(reply->cell_config[i]->slice_config->ul[j]->sorting);
|
||||||
|
|
||||||
@@ -472,8 +480,6 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
|||||||
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
||||||
Protocol__FlexLcConfigRequest *lc_config_request_msg = input->lc_config_request_msg;
|
Protocol__FlexLcConfigRequest *lc_config_request_msg = input->lc_config_request_msg;
|
||||||
xid = (lc_config_request_msg->header)->xid;
|
xid = (lc_config_request_msg->header)->xid;
|
||||||
int i, j;
|
|
||||||
int UE_id;
|
|
||||||
Protocol__FlexLcConfigReply *lc_config_reply_msg;
|
Protocol__FlexLcConfigReply *lc_config_reply_msg;
|
||||||
lc_config_reply_msg = malloc(sizeof(Protocol__FlexLcConfigReply));
|
lc_config_reply_msg = malloc(sizeof(Protocol__FlexLcConfigReply));
|
||||||
|
|
||||||
@@ -486,9 +492,16 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
lc_config_reply_msg->header = header;
|
lc_config_reply_msg->header = header;
|
||||||
lc_config_reply_msg->n_lc_ue_config = flexran_get_num_ues(mod_id);
|
|
||||||
Protocol__FlexLcUeConfig **lc_ue_config;
|
|
||||||
|
|
||||||
|
/* the lc_config_reply entirely depends on MAC except for the
|
||||||
|
* mac_eNB_get_rrc_status() function (which in the current OAI implementation
|
||||||
|
* is reachable if F1 is present). Therefore we check here wether MAC CM is
|
||||||
|
* present and the message gets properly filled if it is or remains empty if
|
||||||
|
* not */
|
||||||
|
lc_config_reply_msg->n_lc_ue_config =
|
||||||
|
flexran_agent_get_mac_xface(mod_id) ? flexran_get_mac_num_ues(mod_id) : 0;
|
||||||
|
|
||||||
|
Protocol__FlexLcUeConfig **lc_ue_config = NULL;
|
||||||
if (lc_config_reply_msg->n_lc_ue_config > 0) {
|
if (lc_config_reply_msg->n_lc_ue_config > 0) {
|
||||||
lc_ue_config = malloc(sizeof(Protocol__FlexLcUeConfig *) * lc_config_reply_msg->n_lc_ue_config);
|
lc_ue_config = malloc(sizeof(Protocol__FlexLcUeConfig *) * lc_config_reply_msg->n_lc_ue_config);
|
||||||
|
|
||||||
@@ -497,76 +510,13 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fill the config for each UE
|
// Fill the config for each UE
|
||||||
for (i = 0; i < lc_config_reply_msg->n_lc_ue_config; i++) {
|
for (int i = 0; i < lc_config_reply_msg->n_lc_ue_config; i++) {
|
||||||
lc_ue_config[i] = malloc(sizeof(Protocol__FlexLcUeConfig));
|
lc_ue_config[i] = malloc(sizeof(Protocol__FlexLcUeConfig));
|
||||||
|
if (!lc_ue_config[i]) goto error;
|
||||||
|
|
||||||
protocol__flex_lc_ue_config__init(lc_ue_config[i]);
|
protocol__flex_lc_ue_config__init(lc_ue_config[i]);
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||||
lc_ue_config[i]->has_rnti = 1;
|
flexran_agent_fill_mac_lc_ue_config(mod_id, UE_id, lc_ue_config[i]);
|
||||||
lc_ue_config[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
|
||||||
//TODO: Set the number of LC configurations that will be reported for this UE
|
|
||||||
//Set this according to the current state of the UE. This is only a temporary fix
|
|
||||||
int status = 0;
|
|
||||||
status = mac_eNB_get_rrc_status(mod_id, flexran_get_ue_crnti(mod_id, UE_id));
|
|
||||||
|
|
||||||
/* TODO needs to be revised and appropriate API to be implemented */
|
|
||||||
if (status < RRC_CONNECTED) {
|
|
||||||
lc_ue_config[i]->n_lc_config = 0;
|
|
||||||
} else if (status == RRC_CONNECTED) {
|
|
||||||
lc_ue_config[i]->n_lc_config = 1;
|
|
||||||
} else {
|
|
||||||
lc_ue_config[i]->n_lc_config = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
Protocol__FlexLcConfig **lc_config;
|
|
||||||
|
|
||||||
if (lc_ue_config[i]->n_lc_config > 0) {
|
|
||||||
lc_config = malloc(sizeof(Protocol__FlexLcConfig *) * lc_ue_config[i]->n_lc_config);
|
|
||||||
|
|
||||||
if (lc_config == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (j = 0; j < lc_ue_config[i]->n_lc_config; j++) {
|
|
||||||
lc_config[j] = malloc(sizeof(Protocol__FlexLcConfig));
|
|
||||||
protocol__flex_lc_config__init(lc_config[j]);
|
|
||||||
lc_config[j]->has_lcid = 1;
|
|
||||||
lc_config[j]->lcid = j+1;
|
|
||||||
int lcg = flexran_get_lcg(mod_id, UE_id, j+1);
|
|
||||||
|
|
||||||
if (lcg >= 0 && lcg <= 3) {
|
|
||||||
lc_config[j]->has_lcg = 1;
|
|
||||||
lc_config[j]->lcg = flexran_get_lcg(mod_id, UE_id, j+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
lc_config[j]->has_direction = 1;
|
|
||||||
lc_config[j]->direction = flexran_get_direction(UE_id, j+1);
|
|
||||||
//TODO: Bearer type. One of FLQBT_* values. Currently only default bearer supported
|
|
||||||
lc_config[j]->has_qos_bearer_type = 1;
|
|
||||||
lc_config[j]->qos_bearer_type = PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_NON_GBR;
|
|
||||||
//TODO: Set the QCI defined in TS 23.203, coded as defined in TS 36.413
|
|
||||||
// One less than the actual QCI value. Needs to be generalized
|
|
||||||
lc_config[j]->has_qci = 1;
|
|
||||||
lc_config[j]->qci = 1;
|
|
||||||
|
|
||||||
if (lc_config[j]->direction == PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_GBR) {
|
|
||||||
/* TODO all of the need to be taken from API */
|
|
||||||
//TODO: Set the max bitrate (UL)
|
|
||||||
lc_config[j]->has_e_rab_max_bitrate_ul = 0;
|
|
||||||
lc_config[j]->e_rab_max_bitrate_ul = 0;
|
|
||||||
//TODO: Set the max bitrate (DL)
|
|
||||||
lc_config[j]->has_e_rab_max_bitrate_dl = 0;
|
|
||||||
lc_config[j]->e_rab_max_bitrate_dl = 0;
|
|
||||||
//TODO: Set the guaranteed bitrate (UL)
|
|
||||||
lc_config[j]->has_e_rab_guaranteed_bitrate_ul = 0;
|
|
||||||
lc_config[j]->e_rab_guaranteed_bitrate_ul = 0;
|
|
||||||
//TODO: Set the guaranteed bitrate (DL)
|
|
||||||
lc_config[j]->has_e_rab_guaranteed_bitrate_dl = 0;
|
|
||||||
lc_config[j]->e_rab_guaranteed_bitrate_dl = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lc_ue_config[i]->lc_config = lc_config;
|
|
||||||
}
|
|
||||||
} // end for UE
|
} // end for UE
|
||||||
|
|
||||||
lc_config_reply_msg->lc_ue_config = lc_ue_config;
|
lc_config_reply_msg->lc_ue_config = lc_ue_config;
|
||||||
@@ -604,14 +554,24 @@ error:
|
|||||||
* ************************************
|
* ************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
int sort_ue_config(const void *a, const void *b)
|
||||||
|
{
|
||||||
|
const Protocol__FlexUeConfig *fa = a;
|
||||||
|
const Protocol__FlexUeConfig *fb = b;
|
||||||
|
|
||||||
|
if (fa->rnti < fb->rnti)
|
||||||
|
return -1;
|
||||||
|
else if (fa->rnti < fb->rnti)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
|
int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
|
||||||
xid_t xid;
|
xid_t xid;
|
||||||
Protocol__FlexHeader *header = NULL;
|
Protocol__FlexHeader *header = NULL;
|
||||||
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
||||||
Protocol__FlexUeConfigRequest *ue_config_request_msg = input->ue_config_request_msg;
|
Protocol__FlexUeConfigRequest *ue_config_request_msg = input->ue_config_request_msg;
|
||||||
xid = (ue_config_request_msg->header)->xid;
|
xid = (ue_config_request_msg->header)->xid;
|
||||||
int i;
|
|
||||||
int UE_id;
|
|
||||||
Protocol__FlexUeConfigReply *ue_config_reply_msg;
|
Protocol__FlexUeConfigReply *ue_config_reply_msg;
|
||||||
ue_config_reply_msg = malloc(sizeof(Protocol__FlexUeConfigReply));
|
ue_config_reply_msg = malloc(sizeof(Protocol__FlexUeConfigReply));
|
||||||
|
|
||||||
@@ -624,7 +584,22 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
ue_config_reply_msg->header = header;
|
ue_config_reply_msg->header = header;
|
||||||
ue_config_reply_msg->n_ue_config = flexran_get_num_ues(mod_id);
|
|
||||||
|
ue_config_reply_msg->n_ue_config = 0;
|
||||||
|
if (flexran_agent_get_rrc_xface(mod_id))
|
||||||
|
ue_config_reply_msg->n_ue_config = flexran_get_rrc_num_ues(mod_id);
|
||||||
|
else if (flexran_agent_get_mac_xface(mod_id))
|
||||||
|
ue_config_reply_msg->n_ue_config = flexran_get_mac_num_ues(mod_id);
|
||||||
|
|
||||||
|
if (flexran_agent_get_rrc_xface(mod_id) && flexran_agent_get_mac_xface(mod_id)
|
||||||
|
&& flexran_get_rrc_num_ues(mod_id) != flexran_get_mac_num_ues(mod_id)) {
|
||||||
|
const int nrrc = flexran_get_rrc_num_ues(mod_id);
|
||||||
|
const int nmac = flexran_get_mac_num_ues(mod_id);
|
||||||
|
ue_config_reply_msg->n_ue_config = nrrc < nmac ? nrrc : nmac;
|
||||||
|
LOG_E(FLEXRAN_AGENT, "%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %lu UEs\n",
|
||||||
|
__func__, nrrc, nmac, ue_config_reply_msg->n_ue_config);
|
||||||
|
}
|
||||||
|
|
||||||
Protocol__FlexUeConfig **ue_config;
|
Protocol__FlexUeConfig **ue_config;
|
||||||
|
|
||||||
if (ue_config_reply_msg->n_ue_config > 0) {
|
if (ue_config_reply_msg->n_ue_config > 0) {
|
||||||
@@ -633,157 +608,20 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
|||||||
if (ue_config == NULL) {
|
if (ue_config == NULL) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
rnti_t rntis[ue_config_reply_msg->n_ue_config];
|
||||||
for (i = 0; i < ue_config_reply_msg->n_ue_config; i++) {
|
flexran_get_rrc_rnti_list(mod_id, rntis, ue_config_reply_msg->n_ue_config);
|
||||||
|
for (int i = 0; i < ue_config_reply_msg->n_ue_config; i++) {
|
||||||
|
const rnti_t rnti = rntis[i];
|
||||||
ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig));
|
ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig));
|
||||||
protocol__flex_ue_config__init(ue_config[i]);
|
protocol__flex_ue_config__init(ue_config[i]);
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
|
||||||
ue_config[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_rnti = 1;
|
|
||||||
ue_config[i]->imsi = flexran_get_ue_imsi(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_imsi = 1;
|
|
||||||
ue_config[i]->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_dl_slice_id = 1;
|
|
||||||
ue_config[i]->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_ul_slice_id = 1;
|
|
||||||
//TODO: Set the DRX configuration (optional)
|
|
||||||
//Not supported for now, so we do not set it
|
|
||||||
|
|
||||||
if (flexran_get_time_alignment_timer(mod_id, UE_id) != -1) {
|
if (flexran_agent_get_rrc_xface(mod_id))
|
||||||
ue_config[i]->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, UE_id);
|
flexran_agent_fill_rrc_ue_config(mod_id, rnti, ue_config[i]);
|
||||||
ue_config[i]->has_time_alignment_timer = 1;
|
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||||
}
|
const int UE_id = flexran_get_mac_ue_id_rnti(mod_id, rnti);
|
||||||
|
flexran_agent_fill_mac_ue_config(mod_id, UE_id, ue_config[i]);
|
||||||
if (flexran_get_meas_gap_config(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_meas_gap_config_pattern = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ue_config[i]->has_meas_gap_config_pattern == 1 &&
|
|
||||||
ue_config[i]->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) {
|
|
||||||
ue_config[i]->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_meas_gap_config_sf_offset = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Set the SPS configuration (Optional)
|
|
||||||
//Not supported for noe, so we do not set it
|
|
||||||
|
|
||||||
//TODO: Set the SR configuration (Optional)
|
|
||||||
//We do not set it for now
|
|
||||||
|
|
||||||
//TODO: Set the CQI configuration (Optional)
|
|
||||||
//We do not set it for now
|
|
||||||
|
|
||||||
if (flexran_get_ue_transmission_mode(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->transmission_mode = flexran_get_ue_transmission_mode(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_transmission_mode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ue_config[i]->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_ue_aggregated_max_bitrate_ul = 1;
|
|
||||||
ue_config[i]->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id, UE_id);
|
|
||||||
ue_config[i]->has_ue_aggregated_max_bitrate_dl = 1;
|
|
||||||
Protocol__FlexUeCapabilities *capabilities;
|
|
||||||
capabilities = malloc(sizeof(Protocol__FlexUeCapabilities));
|
|
||||||
protocol__flex_ue_capabilities__init(capabilities);
|
|
||||||
capabilities->has_half_duplex = 1;
|
|
||||||
capabilities->half_duplex = flexran_get_half_duplex(mod_id, UE_id);
|
|
||||||
capabilities->has_intra_sf_hopping = 1;
|
|
||||||
capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, UE_id);
|
|
||||||
capabilities->has_type2_sb_1 = 1;
|
|
||||||
capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, UE_id);
|
|
||||||
capabilities->has_ue_category = 1;
|
|
||||||
capabilities->ue_category = flexran_get_ue_category(mod_id, UE_id);
|
|
||||||
capabilities->has_res_alloc_type1 = 1;
|
|
||||||
capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, UE_id);
|
|
||||||
//Set the capabilites to the message
|
|
||||||
ue_config[i]->capabilities = capabilities;
|
|
||||||
|
|
||||||
if (flexran_get_ue_transmission_antenna(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_ue_transmission_antenna = 1;
|
|
||||||
ue_config[i]->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_tti_bundling(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_tti_bundling = 1;
|
|
||||||
ue_config[i]->tti_bundling = flexran_get_tti_bundling(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_maxHARQ_TX(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_max_harq_tx = 1;
|
|
||||||
ue_config[i]->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_beta_offset_ack_index(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_beta_offset_ack_index = 1;
|
|
||||||
ue_config[i]->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_beta_offset_ri_index(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_beta_offset_ri_index = 1;
|
|
||||||
ue_config[i]->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_beta_offset_cqi_index(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_beta_offset_cqi_index = 1;
|
|
||||||
ue_config[i]->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* assume primary carrier */
|
|
||||||
if (flexran_get_ack_nack_simultaneous_trans(mod_id, UE_id, 0) != -1) {
|
|
||||||
ue_config[i]->has_ack_nack_simultaneous_trans = 1;
|
|
||||||
ue_config[i]->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id, UE_id, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_simultaneous_ack_nack_cqi(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_simultaneous_ack_nack_cqi = 1;
|
|
||||||
ue_config[i]->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_aperiodic_cqi_rep_mode(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_aperiodic_cqi_rep_mode = 1;
|
|
||||||
int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, UE_id);
|
|
||||||
|
|
||||||
if (mode > 4) {
|
|
||||||
ue_config[i]->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
|
|
||||||
} else {
|
|
||||||
ue_config[i]->aperiodic_cqi_rep_mode = mode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_tdd_ack_nack_feedback_mode(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_tdd_ack_nack_feedback = 1;
|
|
||||||
ue_config[i]->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flexran_get_ack_nack_repetition_factor(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_ack_nack_repetition_factor = 1;
|
|
||||||
ue_config[i]->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flexran_get_extended_bsr_size(mod_id, UE_id) != -1) {
|
|
||||||
ue_config[i]->has_extended_bsr_size = 1;
|
|
||||||
ue_config[i]->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, UE_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Set carrier aggregation support (boolean)
|
|
||||||
ue_config[i]->has_ca_support = 0;
|
|
||||||
ue_config[i]->ca_support = 0;
|
|
||||||
ue_config[i]->has_pcell_carrier_index = 1;
|
|
||||||
ue_config[i]->pcell_carrier_index = UE_PCCID(mod_id, UE_id);
|
|
||||||
|
|
||||||
if(ue_config[i]->has_ca_support) {
|
|
||||||
//TODO: Set cross carrier scheduling support (boolean)
|
|
||||||
ue_config[i]->has_cross_carrier_sched_support = 0;
|
|
||||||
ue_config[i]->cross_carrier_sched_support = 0;
|
|
||||||
//TODO: Set secondary cells configuration
|
|
||||||
// We do not set it for now. No carrier aggregation support
|
|
||||||
//TODO: Set deactivation timer for secondary cell
|
|
||||||
ue_config[i]->has_scell_deactivation_timer = 0;
|
|
||||||
ue_config[i]->scell_deactivation_timer = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_config_reply_msg->ue_config = ue_config;
|
ue_config_reply_msg->ue_config = ue_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -867,7 +705,6 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
|||||||
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
||||||
Protocol__FlexEnbConfigRequest *enb_config_req_msg = input->enb_config_request_msg;
|
Protocol__FlexEnbConfigRequest *enb_config_req_msg = input->enb_config_request_msg;
|
||||||
xid = (enb_config_req_msg->header)->xid;
|
xid = (enb_config_req_msg->header)->xid;
|
||||||
int i, j;
|
|
||||||
Protocol__FlexEnbConfigReply *enb_config_reply_msg;
|
Protocol__FlexEnbConfigReply *enb_config_reply_msg;
|
||||||
enb_config_reply_msg = malloc(sizeof(Protocol__FlexEnbConfigReply));
|
enb_config_reply_msg = malloc(sizeof(Protocol__FlexEnbConfigReply));
|
||||||
|
|
||||||
@@ -880,8 +717,6 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
enb_config_reply_msg->header = header;
|
enb_config_reply_msg->header = header;
|
||||||
enb_config_reply_msg->enb_id = RC.flexran[mod_id]->agent_id;
|
|
||||||
enb_config_reply_msg->has_enb_id = 1;
|
|
||||||
enb_config_reply_msg->n_cell_config = MAX_NUM_CCs;
|
enb_config_reply_msg->n_cell_config = MAX_NUM_CCs;
|
||||||
Protocol__FlexCellConfig **cell_conf;
|
Protocol__FlexCellConfig **cell_conf;
|
||||||
|
|
||||||
@@ -890,200 +725,19 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
|||||||
|
|
||||||
if(cell_conf == NULL)
|
if(cell_conf == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
for(int i = 0; i < enb_config_reply_msg->n_cell_config; i++){
|
||||||
for(i = 0; i < enb_config_reply_msg->n_cell_config; i++) {
|
|
||||||
cell_conf[i] = malloc(sizeof(Protocol__FlexCellConfig));
|
cell_conf[i] = malloc(sizeof(Protocol__FlexCellConfig));
|
||||||
|
if (!cell_conf[i]) goto error;
|
||||||
protocol__flex_cell_config__init(cell_conf[i]);
|
protocol__flex_cell_config__init(cell_conf[i]);
|
||||||
cell_conf[i]->phy_cell_id = flexran_get_cell_id(mod_id,i);
|
if (flexran_agent_get_phy_xface(mod_id))
|
||||||
cell_conf[i]->has_phy_cell_id = 1;
|
flexran_agent_fill_phy_cell_config(mod_id, i, cell_conf[i]);
|
||||||
cell_conf[i]->cell_id = i;
|
if (flexran_agent_get_rrc_xface(mod_id))
|
||||||
cell_conf[i]->has_cell_id = 1;
|
flexran_agent_fill_rrc_cell_config(mod_id, i, cell_conf[i]);
|
||||||
cell_conf[i]->pusch_hopping_offset = flexran_get_hopping_offset(mod_id,i);
|
if (flexran_agent_get_mac_xface(mod_id))
|
||||||
cell_conf[i]->has_pusch_hopping_offset = 1;
|
flexran_agent_fill_mac_cell_config(mod_id, i, cell_conf[i]);
|
||||||
|
|
||||||
if (flexran_get_hopping_mode(mod_id,i) == 0) {
|
|
||||||
cell_conf[i]->hopping_mode = PROTOCOL__FLEX_HOPPING_MODE__FLHM_INTER;
|
|
||||||
} else if(flexran_get_hopping_mode(mod_id,i) == 1) {
|
|
||||||
cell_conf[i]->hopping_mode = PROTOCOL__FLEX_HOPPING_MODE__FLHM_INTERINTRA;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_hopping_mode = 1;
|
|
||||||
cell_conf[i]->n_sb = flexran_get_n_SB(mod_id,i);
|
|
||||||
cell_conf[i]->has_n_sb = 1;
|
|
||||||
|
|
||||||
if (flexran_get_phich_resource(mod_id,i) == 0) {
|
|
||||||
cell_conf[i]->phich_resource = PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_ONE_SIXTH; //0
|
|
||||||
} else if (flexran_get_phich_resource(mod_id,i) == 1) {
|
|
||||||
cell_conf[i]->phich_resource = PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_HALF; //1
|
|
||||||
} else if (flexran_get_phich_resource(mod_id,i) == 2) {
|
|
||||||
cell_conf[i]->phich_resource = PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_ONE; // 2
|
|
||||||
} else if (flexran_get_phich_resource(mod_id,i) == 3) {
|
|
||||||
cell_conf[i]->phich_resource = PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_TWO;//3
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_phich_resource = 1;
|
|
||||||
|
|
||||||
if (flexran_get_phich_duration(mod_id,i) == 0) {
|
|
||||||
cell_conf[i]->phich_duration = PROTOCOL__FLEX_PHICH_DURATION__FLPD_NORMAL;
|
|
||||||
} else if(flexran_get_phich_duration(mod_id,i) == 1) {
|
|
||||||
cell_conf[i]->phich_duration = PROTOCOL__FLEX_PHICH_DURATION__FLPD_EXTENDED;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_phich_duration = 1;
|
|
||||||
cell_conf[i]->init_nr_pdcch_ofdm_sym = flexran_get_num_pdcch_symb(mod_id,i);
|
|
||||||
cell_conf[i]->has_init_nr_pdcch_ofdm_sym = 1;
|
|
||||||
Protocol__FlexSiConfig *si_config;
|
|
||||||
si_config = malloc(sizeof(Protocol__FlexSiConfig));
|
|
||||||
|
|
||||||
if(si_config == NULL)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
protocol__flex_si_config__init(si_config);
|
|
||||||
si_config->sfn = flexran_get_current_system_frame_num(mod_id);
|
|
||||||
si_config->has_sfn = 1;
|
|
||||||
si_config->sib1_length = flexran_get_sib1_length(mod_id,i);
|
|
||||||
si_config->has_sib1_length = 1;
|
|
||||||
si_config->si_window_length = (uint32_t) flexran_get_si_window_length(mod_id, i);
|
|
||||||
si_config->has_si_window_length = 1;
|
|
||||||
si_config->n_si_message = 0;
|
|
||||||
/* Protocol__FlexSiMessage **si_message; */
|
|
||||||
/* si_message = malloc(sizeof(Protocol__FlexSiMessage *) * si_config->n_si_message); */
|
|
||||||
/* if(si_message == NULL) */
|
|
||||||
/* goto error; */
|
|
||||||
/* for(j = 0; j < si_config->n_si_message; j++){ */
|
|
||||||
/* si_message[j] = malloc(sizeof(Protocol__FlexSiMessage)); */
|
|
||||||
/* if(si_message[j] == NULL) */
|
|
||||||
/* goto error; */
|
|
||||||
/* protocol__flex_si_message__init(si_message[j]); */
|
|
||||||
/* //TODO: Fill in with actual value, Periodicity of SI msg in radio frames */
|
|
||||||
/* si_message[j]->periodicity = 1; //SIPeriod */
|
|
||||||
/* si_message[j]->has_periodicity = 1; */
|
|
||||||
/* //TODO: Fill in with actual value, rhe length of the SI message in bytes */
|
|
||||||
/* si_message[j]->length = 10; */
|
|
||||||
/* si_message[j]->has_length = 1; */
|
|
||||||
/* } */
|
|
||||||
/* if(si_config->n_si_message > 0){ */
|
|
||||||
/* si_config->si_message = si_message; */
|
|
||||||
/* } */
|
|
||||||
cell_conf[i]->si_config = si_config;
|
|
||||||
cell_conf[i]->dl_bandwidth = flexran_get_N_RB_DL(mod_id,i);
|
|
||||||
cell_conf[i]->has_dl_bandwidth = 1;
|
|
||||||
cell_conf[i]->ul_bandwidth = flexran_get_N_RB_UL(mod_id,i);
|
|
||||||
cell_conf[i]->has_ul_bandwidth = 1;
|
|
||||||
|
|
||||||
if (flexran_get_ul_cyclic_prefix_length(mod_id, i) == 0) {
|
|
||||||
cell_conf[i]->ul_cyclic_prefix_length = PROTOCOL__FLEX_UL_CYCLIC_PREFIX_LENGTH__FLUCPL_NORMAL;
|
|
||||||
} else if(flexran_get_ul_cyclic_prefix_length(mod_id, i) == 1) {
|
|
||||||
cell_conf[i]->ul_cyclic_prefix_length = PROTOCOL__FLEX_UL_CYCLIC_PREFIX_LENGTH__FLUCPL_EXTENDED;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_ul_cyclic_prefix_length = 1;
|
|
||||||
|
|
||||||
if (flexran_get_ul_cyclic_prefix_length(mod_id,i) == 0) {
|
|
||||||
cell_conf[i]->ul_cyclic_prefix_length = PROTOCOL__FLEX_DL_CYCLIC_PREFIX_LENGTH__FLDCPL_NORMAL;
|
|
||||||
} else if (flexran_get_ul_cyclic_prefix_length(mod_id,i) == 1) {
|
|
||||||
cell_conf[i]->ul_cyclic_prefix_length = PROTOCOL__FLEX_DL_CYCLIC_PREFIX_LENGTH__FLDCPL_EXTENDED;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_dl_cyclic_prefix_length = 1;
|
|
||||||
cell_conf[i]->antenna_ports_count = flexran_get_antenna_ports(mod_id, i);
|
|
||||||
cell_conf[i]->has_antenna_ports_count = 1;
|
|
||||||
|
|
||||||
if (flexran_get_duplex_mode(mod_id,i) == 1) {
|
|
||||||
cell_conf[i]->duplex_mode = PROTOCOL__FLEX_DUPLEX_MODE__FLDM_FDD;
|
|
||||||
} else if(flexran_get_duplex_mode(mod_id,i) == 0) {
|
|
||||||
cell_conf[i]->duplex_mode = PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_duplex_mode = 1;
|
|
||||||
cell_conf[i]->subframe_assignment = flexran_get_subframe_assignment(mod_id, i);
|
|
||||||
cell_conf[i]->has_subframe_assignment = 1;
|
|
||||||
cell_conf[i]->special_subframe_patterns = flexran_get_special_subframe_assignment(mod_id,i);
|
|
||||||
cell_conf[i]->has_special_subframe_patterns = 1;
|
|
||||||
//TODO: Fill in with actual value, The MBSFN radio frame period
|
|
||||||
cell_conf[i]->n_mbsfn_subframe_config_rfperiod = 0;
|
|
||||||
uint32_t *elem_rfperiod;
|
|
||||||
elem_rfperiod = (uint32_t *) malloc(sizeof(uint32_t) *cell_conf[i]->n_mbsfn_subframe_config_rfperiod);
|
|
||||||
|
|
||||||
if(elem_rfperiod == NULL)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
for(j = 0; j < cell_conf[i]->n_mbsfn_subframe_config_rfperiod; j++) {
|
|
||||||
elem_rfperiod[j] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->mbsfn_subframe_config_rfperiod = elem_rfperiod;
|
|
||||||
//TODO: Fill in with actual value, The MBSFN radio frame offset
|
|
||||||
cell_conf[i]->n_mbsfn_subframe_config_rfoffset = 0;
|
|
||||||
uint32_t *elem_rfoffset;
|
|
||||||
elem_rfoffset = (uint32_t *) malloc(sizeof(uint32_t) *cell_conf[i]->n_mbsfn_subframe_config_rfoffset);
|
|
||||||
|
|
||||||
if(elem_rfoffset == NULL)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
for(j = 0; j < cell_conf[i]->n_mbsfn_subframe_config_rfoffset; j++) {
|
|
||||||
elem_rfoffset[j] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->mbsfn_subframe_config_rfoffset = elem_rfoffset;
|
|
||||||
//TODO: Fill in with actual value, Bitmap indicating the MBSFN subframes
|
|
||||||
cell_conf[i]->n_mbsfn_subframe_config_sfalloc = 0;
|
|
||||||
uint32_t *elem_sfalloc;
|
|
||||||
elem_sfalloc = (uint32_t *) malloc(sizeof(uint32_t) *cell_conf[i]->n_mbsfn_subframe_config_sfalloc);
|
|
||||||
|
|
||||||
if(elem_sfalloc == NULL)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
for(j = 0; j < cell_conf[i]->n_mbsfn_subframe_config_sfalloc; j++) {
|
|
||||||
elem_sfalloc[j] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->mbsfn_subframe_config_sfalloc = elem_sfalloc;
|
|
||||||
cell_conf[i]->prach_config_index = flexran_get_prach_ConfigIndex(mod_id,i);
|
|
||||||
cell_conf[i]->has_prach_config_index = 1;
|
|
||||||
cell_conf[i]->prach_freq_offset = flexran_get_prach_FreqOffset(mod_id,i);
|
|
||||||
cell_conf[i]->has_prach_freq_offset = 1;
|
|
||||||
cell_conf[i]->ra_response_window_size = flexran_get_ra_ResponseWindowSize(mod_id,i);
|
|
||||||
cell_conf[i]->has_ra_response_window_size = 1;
|
|
||||||
cell_conf[i]->mac_contention_resolution_timer = flexran_get_mac_ContentionResolutionTimer(mod_id,i);
|
|
||||||
cell_conf[i]->has_mac_contention_resolution_timer = 1;
|
|
||||||
cell_conf[i]->max_harq_msg3tx = flexran_get_maxHARQ_Msg3Tx(mod_id,i);
|
|
||||||
cell_conf[i]->has_max_harq_msg3tx = 1;
|
|
||||||
cell_conf[i]->n1pucch_an = flexran_get_n1pucch_an(mod_id,i);
|
|
||||||
cell_conf[i]->has_n1pucch_an = 1;
|
|
||||||
cell_conf[i]->deltapucch_shift = flexran_get_deltaPUCCH_Shift(mod_id,i);
|
|
||||||
cell_conf[i]->has_deltapucch_shift = 1;
|
|
||||||
cell_conf[i]->nrb_cqi = flexran_get_nRB_CQI(mod_id,i);
|
|
||||||
cell_conf[i]->has_nrb_cqi = 1;
|
|
||||||
cell_conf[i]->srs_subframe_config = flexran_get_srs_SubframeConfig(mod_id,i);
|
|
||||||
cell_conf[i]->has_srs_subframe_config = 1;
|
|
||||||
cell_conf[i]->srs_bw_config = flexran_get_srs_BandwidthConfig(mod_id,i);
|
|
||||||
cell_conf[i]->has_srs_bw_config = 1;
|
|
||||||
cell_conf[i]->srs_mac_up_pts = flexran_get_srs_MaxUpPts(mod_id,i);
|
|
||||||
cell_conf[i]->has_srs_mac_up_pts = 1;
|
|
||||||
cell_conf[i]->dl_freq = flexran_agent_get_operating_dl_freq (mod_id,i);
|
|
||||||
cell_conf[i]->has_dl_freq = 1;
|
|
||||||
cell_conf[i]->ul_freq = flexran_agent_get_operating_ul_freq (mod_id, i);
|
|
||||||
cell_conf[i]->has_ul_freq = 1;
|
|
||||||
cell_conf[i]->eutra_band = flexran_agent_get_operating_eutra_band (mod_id,i);
|
|
||||||
cell_conf[i]->has_eutra_band = 1;
|
|
||||||
cell_conf[i]->dl_pdsch_power = flexran_agent_get_operating_pdsch_refpower(mod_id, i);
|
|
||||||
cell_conf[i]->has_dl_pdsch_power = 1;
|
|
||||||
cell_conf[i]->ul_pusch_power = flexran_agent_get_operating_pusch_p0 (mod_id,i);
|
|
||||||
cell_conf[i]->has_ul_pusch_power = 1;
|
|
||||||
|
|
||||||
if (flexran_get_enable64QAM(mod_id,i) == 0) {
|
|
||||||
cell_conf[i]->enable_64qam = PROTOCOL__FLEX_QAM__FLEQ_MOD_16QAM;
|
|
||||||
} else if(flexran_get_enable64QAM(mod_id,i) == 1) {
|
|
||||||
cell_conf[i]->enable_64qam = PROTOCOL__FLEX_QAM__FLEQ_MOD_64QAM;
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_conf[i]->has_enable_64qam = 1;
|
|
||||||
cell_conf[i]->carrier_index = i;
|
cell_conf[i]->carrier_index = i;
|
||||||
cell_conf[i]->has_carrier_index = 1;
|
cell_conf[i]->has_carrier_index = 1;
|
||||||
/* get a pointer to the config which is maintained in the agent throughout
|
|
||||||
* its lifetime */
|
|
||||||
cell_conf[i]->slice_config = flexran_agent_get_slice_config(mod_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enb_config_reply_msg->cell_config=cell_conf;
|
enb_config_reply_msg->cell_config=cell_conf;
|
||||||
@@ -1150,11 +804,10 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot
|
|||||||
|
|
||||||
if (enb_config->n_cell_config > 1)
|
if (enb_config->n_cell_config > 1)
|
||||||
LOG_W(FLEXRAN_AGENT, "ignoring slice configs for other cell except cell 0\n");
|
LOG_W(FLEXRAN_AGENT, "ignoring slice configs for other cell except cell 0\n");
|
||||||
|
if (flexran_agent_get_mac_xface(mod_id) && enb_config->cell_config[0]->slice_config) {
|
||||||
if (enb_config->cell_config[0]->slice_config) {
|
|
||||||
prepare_update_slice_config(mod_id, enb_config->cell_config[0]->slice_config);
|
prepare_update_slice_config(mod_id, enb_config->cell_config[0]->slice_config);
|
||||||
} else {
|
//} else {
|
||||||
initiate_soft_restart(mod_id, enb_config->cell_config[0]);
|
// initiate_soft_restart(mod_id, enb_config->cell_config[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
*msg = NULL;
|
*msg = NULL;
|
||||||
@@ -1166,7 +819,7 @@ int flexran_agent_handle_ue_config_reply(mid_t mod_id, const void *params, Proto
|
|||||||
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params;
|
||||||
Protocol__FlexUeConfigReply *ue_config_reply = input->ue_config_reply_msg;
|
Protocol__FlexUeConfigReply *ue_config_reply = input->ue_config_reply_msg;
|
||||||
|
|
||||||
for (i = 0; i < ue_config_reply->n_ue_config; i++)
|
for (i = 0; flexran_agent_get_mac_xface(mod_id) && i < ue_config_reply->n_ue_config; i++)
|
||||||
prepare_ue_slice_assoc_update(mod_id, ue_config_reply->ue_config[i]);
|
prepare_ue_slice_assoc_update(mod_id, ue_config_reply->ue_config[i]);
|
||||||
|
|
||||||
*msg = NULL;
|
*msg = NULL;
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
|||||||
|
|
||||||
/* Function to be used to handle reply message . */
|
/* Function to be used to handle reply message . */
|
||||||
int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg);
|
int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg);
|
||||||
|
int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg);
|
||||||
|
|
||||||
/* Top level Statistics request protocol message constructor and destructor */
|
/* Top level Statistics request protocol message constructor and destructor */
|
||||||
int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
|
int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
|
||||||
@@ -161,8 +162,6 @@ int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg);
|
|||||||
|
|
||||||
err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id);
|
err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id);
|
||||||
|
|
||||||
void flexran_agent_send_update_stats(mid_t mod_id);
|
|
||||||
|
|
||||||
err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id, xid_t xid, stats_request_config_t *stats_req) ;
|
err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id, xid_t xid, stats_request_config_t *stats_req) ;
|
||||||
err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id);
|
err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id);
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ int parse_enb_id(mid_t mod_id, yaml_parser_t *parser) {
|
|||||||
}
|
}
|
||||||
// Check what key needs to be set
|
// Check what key needs to be set
|
||||||
// use eNB egistered
|
// use eNB egistered
|
||||||
if (mac_agent_registered[mod_id]) {
|
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||||
LOG_I(ENB_APP, "Setting parameter for eNB %s\n", event.data.scalar.value);
|
LOG_I(ENB_APP, "Setting parameter for eNB %s\n", event.data.scalar.value);
|
||||||
if (strcmp((char *) event.data.scalar.tag, YAML_INT_TAG) == 0) { // if int
|
if (strcmp((char *) event.data.scalar.tag, YAML_INT_TAG) == 0) { // if int
|
||||||
if ((strtol((char *) event.data.scalar.value, &endptr, 10))== mod_id ) { // enb_id == mod_id: right enb instance to be configured
|
if ((strtol((char *) event.data.scalar.value, &endptr, 10))== mod_id ) { // enb_id == mod_id: right enb instance to be configured
|
||||||
@@ -542,7 +542,7 @@ int apply_parameter_modification(void *parameter, yaml_parser_t *parser) {
|
|||||||
|
|
||||||
void initiate_soft_restart(module_id_t mod_id, Protocol__FlexCellConfig *c)
|
void initiate_soft_restart(module_id_t mod_id, Protocol__FlexCellConfig *c)
|
||||||
{
|
{
|
||||||
uint8_t cc_id = c->has_cell_id ? c->cell_id : 0;
|
const uint8_t cc_id = 0;
|
||||||
if (c->has_eutra_band) {
|
if (c->has_eutra_band) {
|
||||||
flexran_agent_set_operating_eutra_band(mod_id, cc_id, c->eutra_band);
|
flexran_agent_set_operating_eutra_band(mod_id, cc_id, c->eutra_band);
|
||||||
LOG_I(ENB_APP, "Setting eutra_band to %d\n", c->eutra_band);
|
LOG_I(ENB_APP, "Setting eutra_band to %d\n", c->eutra_band);
|
||||||
|
|||||||
@@ -138,14 +138,14 @@ typedef enum {
|
|||||||
FLEXRAN_AGENT_TIMER_STATE_MAX,
|
FLEXRAN_AGENT_TIMER_STATE_MAX,
|
||||||
} flexran_agent_timer_state_t;
|
} flexran_agent_timer_state_t;
|
||||||
|
|
||||||
#define FLEXRAN_CAP_LOPHY 1
|
#define FLEXRAN_CAP_LOPHY(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOPHY)) > 0)
|
||||||
#define FLEXRAN_CAP_HIPHY 2
|
#define FLEXRAN_CAP_HIPHY(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIPHY)) > 0)
|
||||||
#define FLEXRAN_CAP_LOMAC 4
|
#define FLEXRAN_CAP_LOMAC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOMAC)) > 0)
|
||||||
#define FLEXRAN_CAP_HIMAC 8
|
#define FLEXRAN_CAP_HIMAC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIMAC)) > 0)
|
||||||
#define FLEXRAN_CAP_RLC 16
|
#define FLEXRAN_CAP_RLC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__RLC)) > 0)
|
||||||
#define FLEXRAN_CAP_PDCP 32
|
#define FLEXRAN_CAP_PDCP(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__PDCP)) > 0)
|
||||||
#define FLEXRAN_CAP_SDAP 64
|
#define FLEXRAN_CAP_SDAP(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)) > 0)
|
||||||
#define FLEXRAN_CAP_RRC 128
|
#define FLEXRAN_CAP_RRC(cApS) (((cApS) & (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC)) > 0)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ENB_NORMAL_OPERATION = 0x0,
|
ENB_NORMAL_OPERATION = 0x0,
|
||||||
@@ -162,8 +162,6 @@ typedef struct {
|
|||||||
char *cache_name;
|
char *cache_name;
|
||||||
|
|
||||||
mid_t mod_id;
|
mid_t mod_id;
|
||||||
uint64_t agent_id;
|
|
||||||
uint8_t capability_mask;
|
|
||||||
|
|
||||||
/* lock for waiting before starting or soft-restart */
|
/* lock for waiting before starting or soft-restart */
|
||||||
pthread_cond_t cond_node_ctrl;
|
pthread_cond_t cond_node_ctrl;
|
||||||
|
|||||||
@@ -31,27 +31,22 @@
|
|||||||
#define __FLEXRAN_AGENT_EXTERN_H__
|
#define __FLEXRAN_AGENT_EXTERN_H__
|
||||||
|
|
||||||
#include "flexran_agent_defs.h"
|
#include "flexran_agent_defs.h"
|
||||||
|
#include "flexran_agent_phy_defs.h"
|
||||||
#include "flexran_agent_mac_defs.h"
|
#include "flexran_agent_mac_defs.h"
|
||||||
#include "flexran_agent_rrc_defs.h"
|
#include "flexran_agent_rrc_defs.h"
|
||||||
#include "flexran_agent_pdcp_defs.h"
|
#include "flexran_agent_pdcp_defs.h"
|
||||||
|
|
||||||
|
/* Control module interface for the communication of the PHY control module with the agent */
|
||||||
|
AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id);
|
||||||
|
|
||||||
/* Control module interface for the communication of the MAC Control Module with the agent */
|
/* Control module interface for the communication of the MAC Control Module with the agent */
|
||||||
extern AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
AGENT_MAC_xface *flexran_agent_get_mac_xface(mid_t mod_id);
|
||||||
|
|
||||||
/* Flag indicating whether the VSFs for the MAC control module have been registered */
|
|
||||||
extern unsigned int mac_agent_registered[NUM_MAX_ENB];
|
|
||||||
|
|
||||||
/* Control module interface for the communication of the RRC Control Module with the agent */
|
/* Control module interface for the communication of the RRC Control Module with the agent */
|
||||||
extern AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id);
|
||||||
|
|
||||||
/* Flag indicating whether the VSFs for the RRC control module have been registered */
|
|
||||||
extern unsigned int rrc_agent_registered[NUM_MAX_ENB];
|
|
||||||
|
|
||||||
/* Control module interface for the communication of the RRC Control Module with the agent */
|
/* Control module interface for the communication of the RRC Control Module with the agent */
|
||||||
extern AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
|
AGENT_PDCP_xface *flexran_agent_get_pdcp_xface(mid_t mod_id);
|
||||||
|
|
||||||
/* Flag indicating whether the VSFs for the RRC control module have been registered */
|
|
||||||
extern unsigned int pdcp_agent_registered[NUM_MAX_ENB];
|
|
||||||
|
|
||||||
/* Requried to know which UEs had a harq updated over some subframe */
|
/* Requried to know which UEs had a harq updated over some subframe */
|
||||||
extern int harq_pid_updated[NUM_MAX_UE][8];
|
extern int harq_pid_updated[NUM_MAX_UE][8];
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ flexran_agent_message_destruction_callback message_destruction_callback[] = {
|
|||||||
flexran_agent_destroy_echo_request,
|
flexran_agent_destroy_echo_request,
|
||||||
flexran_agent_destroy_echo_reply,
|
flexran_agent_destroy_echo_reply,
|
||||||
flexran_agent_destroy_stats_request,
|
flexran_agent_destroy_stats_request,
|
||||||
flexran_agent_mac_destroy_stats_reply,
|
flexran_agent_destroy_stats_reply,
|
||||||
flexran_agent_mac_destroy_sf_trigger,
|
flexran_agent_mac_destroy_sf_trigger,
|
||||||
flexran_agent_mac_destroy_sr_info,
|
flexran_agent_mac_destroy_sr_info,
|
||||||
flexran_agent_destroy_enb_config_request,
|
flexran_agent_destroy_enb_config_request,
|
||||||
@@ -90,7 +90,8 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
|
|||||||
uint8_t *data,
|
uint8_t *data,
|
||||||
uint32_t size){
|
uint32_t size){
|
||||||
|
|
||||||
Protocol__FlexranMessage *decoded_message, *reply_message;
|
Protocol__FlexranMessage *decoded_message = NULL;
|
||||||
|
Protocol__FlexranMessage *reply_message = NULL;
|
||||||
err_code_t err_code;
|
err_code_t err_code;
|
||||||
DevAssert(data != NULL);
|
DevAssert(data != NULL);
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
|
|||||||
err_code = ((*agent_messages_callback[decoded_message->msg_case-1][decoded_message->msg_dir-1])(mod_id, (void *) decoded_message, &reply_message));
|
err_code = ((*agent_messages_callback[decoded_message->msg_case-1][decoded_message->msg_dir-1])(mod_id, (void *) decoded_message, &reply_message));
|
||||||
if ( err_code < 0 ){
|
if ( err_code < 0 ){
|
||||||
goto error;
|
goto error;
|
||||||
} else if (err_code == 1) { //If err_code > 1, we do not want to dispose the message yet
|
} else if (err_code == 0) { //If err_code > 1, we do not want to dispose the message yet
|
||||||
protocol__flexran_message__free_unpacked(decoded_message, NULL);
|
protocol__flexran_message__free_unpacked(decoded_message, NULL);
|
||||||
}
|
}
|
||||||
return reply_message;
|
return reply_message;
|
||||||
@@ -204,13 +205,12 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
|||||||
// TODO: Must resolve conflicts among stats requests
|
// TODO: Must resolve conflicts among stats requests
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
err_code_t err_code;
|
err_code_t err_code = 0;
|
||||||
xid_t xid;
|
xid_t xid;
|
||||||
uint32_t usec_interval, sec_interval;
|
uint32_t usec_interval, sec_interval;
|
||||||
|
|
||||||
//TODO: We do not deal with multiple CCs at the moment and eNB id is 0
|
//TODO: We do not deal with multiple CCs at the moment and eNB id is 0
|
||||||
int enb_id = mod_id;
|
int enb_id = mod_id;
|
||||||
int UE_id;
|
|
||||||
|
|
||||||
//eNB_MAC_INST *eNB = &eNB_mac_inst[enb_id];
|
//eNB_MAC_INST *eNB = &eNB_mac_inst[enb_id];
|
||||||
//UE_list_t *eNB_UE_list= &eNB->UE_list;
|
//UE_list_t *eNB_UE_list= &eNB->UE_list;
|
||||||
@@ -242,91 +242,115 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
|||||||
//Create a list of all eNB RNTIs and cells
|
//Create a list of all eNB RNTIs and cells
|
||||||
|
|
||||||
//Set the number of UEs and create list with their RNTIs stats configs
|
//Set the number of UEs and create list with their RNTIs stats configs
|
||||||
report_config.nr_ue = flexran_get_num_ues(mod_id); //eNB_UE_list->num_UEs
|
report_config.nr_ue = 0;
|
||||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
if (flexran_agent_get_rrc_xface(mod_id))
|
||||||
if (report_config.ue_report_type == NULL) {
|
report_config.nr_ue = flexran_get_rrc_num_ues(mod_id);
|
||||||
// TODO: Add appropriate error code
|
else if (flexran_agent_get_mac_xface(mod_id))
|
||||||
err_code = -100;
|
report_config.nr_ue = flexran_get_mac_num_ues(mod_id);
|
||||||
goto error;
|
|
||||||
|
if (flexran_agent_get_rrc_xface(mod_id) && flexran_agent_get_mac_xface(mod_id)
|
||||||
|
&& flexran_get_rrc_num_ues(mod_id) != flexran_get_mac_num_ues(mod_id)) {
|
||||||
|
const int nrrc = flexran_get_rrc_num_ues(mod_id);
|
||||||
|
const int nmac = flexran_get_mac_num_ues(mod_id);
|
||||||
|
report_config.nr_ue = nrrc < nmac ? nrrc : nmac;
|
||||||
|
LOG_E(FLEXRAN_AGENT, "%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %d UEs\n",
|
||||||
|
__func__, nrrc, nmac, report_config.nr_ue);
|
||||||
}
|
}
|
||||||
for (i = 0; i < report_config.nr_ue; i++) {
|
report_config.ue_report_type = malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
if (report_config.ue_report_type == NULL) {
|
||||||
report_config.ue_report_type[i].ue_rnti = flexran_get_ue_crnti(enb_id, UE_id); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].crnti;
|
// TODO: Add appropriate error code
|
||||||
report_config.ue_report_type[i].ue_report_flags = ue_flags;
|
err_code = -100;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (flexran_agent_get_rrc_xface(mod_id)) {
|
||||||
|
rnti_t rntis[report_config.nr_ue];
|
||||||
|
flexran_get_rrc_rnti_list(mod_id, rntis, report_config.nr_ue);
|
||||||
|
for (i = 0; i < report_config.nr_ue; i++) {
|
||||||
|
report_config.ue_report_type[i].ue_rnti = rntis[i];
|
||||||
|
report_config.ue_report_type[i].ue_report_flags = ue_flags;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flexran_agent_get_mac_xface(mod_id) && !flexran_agent_get_rrc_xface(mod_id)) {
|
||||||
|
for (i = 0; i < report_config.nr_ue; i++) {
|
||||||
|
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||||
|
report_config.ue_report_type[i].ue_rnti = flexran_get_mac_ue_crnti(enb_id, UE_id);
|
||||||
|
report_config.ue_report_type[i].ue_report_flags = ue_flags;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//Set the number of CCs and create a list with the cell stats configs
|
//Set the number of CCs and create a list with the cell stats configs
|
||||||
report_config.nr_cc = MAX_NUM_CCs;
|
report_config.nr_cc = MAX_NUM_CCs;
|
||||||
report_config.cc_report_type = (cc_report_type_t *) malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
report_config.cc_report_type = malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
||||||
if (report_config.cc_report_type == NULL) {
|
if (report_config.cc_report_type == NULL) {
|
||||||
// TODO: Add appropriate error code
|
// TODO: Add appropriate error code
|
||||||
err_code = -100;
|
err_code = -100;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (i = 0; i < report_config.nr_cc; i++) {
|
for (i = 0; i < report_config.nr_cc; i++) {
|
||||||
//TODO: Must fill in the proper cell ids
|
//TODO: Must fill in the proper cell ids
|
||||||
report_config.cc_report_type[i].cc_id = i;
|
report_config.cc_report_type[i].cc_id = i;
|
||||||
report_config.cc_report_type[i].cc_report_flags = c_flags;
|
report_config.cc_report_type[i].cc_report_flags = c_flags;
|
||||||
}
|
}
|
||||||
/* Check if request was periodical */
|
/* Check if request was periodical */
|
||||||
if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_PERIODICAL) {
|
if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_PERIODICAL) {
|
||||||
/* Create a one off flexran message as an argument for the periodical task */
|
/* Create a one off flexran message as an argument for the periodical task */
|
||||||
Protocol__FlexranMessage *timer_msg;
|
Protocol__FlexranMessage *timer_msg;
|
||||||
stats_request_config_t request_config;
|
stats_request_config_t request_config;
|
||||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||||
request_config.period = 0;
|
request_config.period = 0;
|
||||||
/* Need to make sure that the ue flags are saved (Bug) */
|
/* Need to make sure that the ue flags are saved (Bug) */
|
||||||
if (report_config.nr_ue == 0) {
|
if (report_config.nr_ue == 0) {
|
||||||
report_config.nr_ue = 1;
|
report_config.nr_ue = 1;
|
||||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t));
|
report_config.ue_report_type = malloc(sizeof(ue_report_type_t));
|
||||||
if (report_config.ue_report_type == NULL) {
|
if (report_config.ue_report_type == NULL) {
|
||||||
// TODO: Add appropriate error code
|
// TODO: Add appropriate error code
|
||||||
err_code = -100;
|
err_code = -100;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
||||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||||
}
|
}
|
||||||
request_config.config = &report_config;
|
request_config.config = &report_config;
|
||||||
flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg);
|
flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg);
|
||||||
/* Create a timer */
|
/* Create a timer */
|
||||||
long timer_id = 0;
|
long timer_id = 0;
|
||||||
flexran_agent_timer_args_t *timer_args;
|
flexran_agent_timer_args_t *timer_args = malloc(sizeof(flexran_agent_timer_args_t));
|
||||||
timer_args = malloc(sizeof(flexran_agent_timer_args_t));
|
memset (timer_args, 0, sizeof(flexran_agent_timer_args_t));
|
||||||
memset (timer_args, 0, sizeof(flexran_agent_timer_args_t));
|
timer_args->mod_id = enb_id;
|
||||||
timer_args->mod_id = enb_id;
|
timer_args->msg = timer_msg;
|
||||||
timer_args->msg = timer_msg;
|
/*Convert subframes to usec time*/
|
||||||
/*Convert subframes to usec time*/
|
usec_interval = 1000*comp_req->sf;
|
||||||
usec_interval = 1000*comp_req->sf;
|
sec_interval = 0;
|
||||||
sec_interval = 0;
|
/*add seconds if required*/
|
||||||
/*add seconds if required*/
|
if (usec_interval >= 1000*1000) {
|
||||||
if (usec_interval >= 1000*1000) {
|
sec_interval = usec_interval/(1000*1000);
|
||||||
sec_interval = usec_interval/(1000*1000);
|
usec_interval = usec_interval%(1000*1000);
|
||||||
usec_interval = usec_interval%(1000*1000);
|
}
|
||||||
}
|
flexran_agent_create_timer(sec_interval, usec_interval, FLEXRAN_AGENT_DEFAULT,
|
||||||
flexran_agent_create_timer(sec_interval, usec_interval, FLEXRAN_AGENT_DEFAULT, enb_id, FLEXRAN_AGENT_TIMER_TYPE_PERIODIC, xid, flexran_agent_handle_timed_task,(void*) timer_args, &timer_id);
|
enb_id, FLEXRAN_AGENT_TIMER_TYPE_PERIODIC, xid,
|
||||||
|
flexran_agent_handle_timed_task,(void*) timer_args, &timer_id);
|
||||||
} else if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_CONTINUOUS) {
|
} else if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_CONTINUOUS) {
|
||||||
/*If request was for continuous updates, disable the previous configuration and
|
/*If request was for continuous updates, disable the previous configuration and
|
||||||
set up a new one*/
|
set up a new one*/
|
||||||
flexran_agent_disable_cont_stats_update(mod_id);
|
flexran_agent_disable_cont_stats_update(mod_id);
|
||||||
stats_request_config_t request_config;
|
stats_request_config_t request_config;
|
||||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||||
request_config.period = 0;
|
request_config.period = 0;
|
||||||
/* Need to make sure that the ue flags are saved (Bug) */
|
/* Need to make sure that the ue flags are saved (Bug) */
|
||||||
if (report_config.nr_ue == 0) {
|
if (report_config.nr_ue == 0) {
|
||||||
report_config.nr_ue = 1;
|
report_config.nr_ue = 1;
|
||||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t));
|
report_config.ue_report_type = malloc(sizeof(ue_report_type_t));
|
||||||
if (report_config.ue_report_type == NULL) {
|
if (report_config.ue_report_type == NULL) {
|
||||||
// TODO: Add appropriate error code
|
// TODO: Add appropriate error code
|
||||||
err_code = -100;
|
err_code = -100;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
report_config.ue_report_type[0].ue_rnti = 0; // Dummy value
|
||||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||||
}
|
}
|
||||||
request_config.config = &report_config;
|
request_config.config = &report_config;
|
||||||
flexran_agent_enable_cont_stats_update(enb_id, xid, &request_config);
|
flexran_agent_enable_cont_stats_update(enb_id, xid, &request_config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -336,14 +360,14 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
|||||||
report_config.nr_ue = 0;
|
report_config.nr_ue = 0;
|
||||||
report_config.ue_report_type = NULL;
|
report_config.ue_report_type = NULL;
|
||||||
report_config.nr_cc = cell_req->n_cell;
|
report_config.nr_cc = cell_req->n_cell;
|
||||||
report_config.cc_report_type = (cc_report_type_t *) malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
report_config.cc_report_type = malloc(sizeof(cc_report_type_t) * report_config.nr_cc);
|
||||||
if (report_config.cc_report_type == NULL) {
|
if (report_config.cc_report_type == NULL) {
|
||||||
// TODO: Add appropriate error code
|
// TODO: Add appropriate error code
|
||||||
err_code = -100;
|
err_code = -100;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (i = 0; i < report_config.nr_cc; i++) {
|
for (i = 0; i < report_config.nr_cc; i++) {
|
||||||
//TODO: Must fill in the proper cell ids
|
//TODO: Must fill in the proper cell ids
|
||||||
report_config.cc_report_type[i].cc_id = cell_req->cell[i];
|
report_config.cc_report_type[i].cc_id = cell_req->cell[i];
|
||||||
report_config.cc_report_type[i].cc_report_flags = cell_req->flags;
|
report_config.cc_report_type[i].cc_report_flags = cell_req->flags;
|
||||||
}
|
}
|
||||||
@@ -354,14 +378,14 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
|||||||
report_config.nr_cc = 0;
|
report_config.nr_cc = 0;
|
||||||
report_config.cc_report_type = NULL;
|
report_config.cc_report_type = NULL;
|
||||||
report_config.nr_ue = ue_req->n_rnti;
|
report_config.nr_ue = ue_req->n_rnti;
|
||||||
report_config.ue_report_type = (ue_report_type_t *) malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
report_config.ue_report_type = malloc(sizeof(ue_report_type_t) * report_config.nr_ue);
|
||||||
if (report_config.ue_report_type == NULL) {
|
if (report_config.ue_report_type == NULL) {
|
||||||
// TODO: Add appropriate error code
|
// TODO: Add appropriate error code
|
||||||
err_code = -100;
|
err_code = -100;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (i = 0; i < report_config.nr_ue; i++) {
|
for (i = 0; i < report_config.nr_ue; i++) {
|
||||||
UE_id = flexran_get_ue_id(mod_id, i);
|
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||||
report_config.ue_report_type[i].ue_rnti = ue_req->rnti[UE_id];
|
report_config.ue_report_type[i].ue_rnti = ue_req->rnti[UE_id];
|
||||||
report_config.ue_report_type[i].ue_report_flags = ue_req->flags;
|
report_config.ue_report_type[i].ue_report_flags = ue_req->flags;
|
||||||
}
|
}
|
||||||
@@ -372,18 +396,20 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flexran_agent_stats_reply(enb_id, xid, &report_config, msg )){
|
if (flexran_agent_stats_reply(enb_id, xid, &report_config, msg )) {
|
||||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(report_config.ue_report_type);
|
if (report_config.ue_report_type)
|
||||||
free(report_config.cc_report_type);
|
free(report_config.ue_report_type);
|
||||||
|
if (report_config.cc_report_type)
|
||||||
|
free(report_config.cc_report_type);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error :
|
error :
|
||||||
LOG_E(FLEXRAN_AGENT, "errno %d occured\n", err_code);
|
LOG_E(FLEXRAN_AGENT, "%s(): errno %d occured\n", __func__, err_code);
|
||||||
return err_code;
|
return err_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,8 +455,7 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
|||||||
protocol__flex_ue_stats_report__init(ue_report[i]);
|
protocol__flex_ue_stats_report__init(ue_report[i]);
|
||||||
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
||||||
ue_report[i]->has_rnti = 1;
|
ue_report[i]->has_rnti = 1;
|
||||||
ue_report[i]->flags = report_config->ue_report_type[i].ue_report_flags;
|
ue_report[i]->has_flags = 1; /* actual flags are filled in the CMs below */
|
||||||
ue_report[i]->has_flags = 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,39 +477,30 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
|||||||
protocol__flex_cell_stats_report__init(cell_report[i]);
|
protocol__flex_cell_stats_report__init(cell_report[i]);
|
||||||
cell_report[i]->carrier_index = report_config->cc_report_type[i].cc_id;
|
cell_report[i]->carrier_index = report_config->cc_report_type[i].cc_id;
|
||||||
cell_report[i]->has_carrier_index = 1;
|
cell_report[i]->has_carrier_index = 1;
|
||||||
cell_report[i]->flags = report_config->cc_report_type[i].cc_report_flags;
|
cell_report[i]->has_flags = 1; /* actual flags are filled in the CMs below */
|
||||||
cell_report[i]->has_flags = 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* MAC reply split */
|
||||||
MAC reply split
|
if (flexran_agent_get_mac_xface(enb_id)
|
||||||
*/
|
&& flexran_agent_mac_stats_reply(enb_id, report_config, ue_report, cell_report) < 0) {
|
||||||
|
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RRC reply split */
|
||||||
|
if (flexran_agent_get_rrc_xface(enb_id)
|
||||||
|
&& flexran_agent_rrc_stats_reply(enb_id, report_config, ue_report, cell_report) < 0) {
|
||||||
|
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (flexran_agent_mac_stats_reply(enb_id, report_config, ue_report, cell_report) < 0 ) {
|
/* PDCP reply split */
|
||||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
if (flexran_agent_get_pdcp_xface(enb_id)
|
||||||
goto error;
|
&& flexran_agent_pdcp_stats_reply(enb_id, report_config, ue_report, cell_report) < 0) {
|
||||||
}
|
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
||||||
|
goto error;
|
||||||
/*
|
}
|
||||||
RRC reply split
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (flexran_agent_rrc_stats_reply(enb_id, report_config, ue_report, cell_report) < 0 ) {
|
|
||||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
PDCP reply split
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (flexran_agent_pdcp_stats_reply(enb_id, report_config, ue_report, cell_report) < 0 ) {
|
|
||||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_BUILD;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
stats_reply_msg->cell_report = cell_report;
|
stats_reply_msg->cell_report = cell_report;
|
||||||
@@ -636,61 +652,26 @@ int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg)
|
||||||
Top Level Update
|
{
|
||||||
*/
|
if (msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG) {
|
||||||
|
LOG_E(FLEXRAN_AGENT, "%s(): message is not a msg_stats_reply\n", __func__);
|
||||||
void flexran_agent_send_update_stats(mid_t mod_id) {
|
return -1;
|
||||||
|
|
||||||
Protocol__FlexranMessage *current_report = NULL;
|
|
||||||
void *data;
|
|
||||||
int size;
|
|
||||||
err_code_t err_code;
|
|
||||||
int priority = 0;
|
|
||||||
|
|
||||||
if (pthread_mutex_lock(stats_context[mod_id].mutex)) {
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stats_context[mod_id].cont_update == 1) {
|
flexran_agent_mac_destroy_stats_reply(msg->stats_reply_msg);
|
||||||
|
flexran_agent_rrc_destroy_stats_reply(msg->stats_reply_msg);
|
||||||
/*Create a fresh report with the required flags*/
|
flexran_agent_pdcp_destroy_stats_reply(msg->stats_reply_msg);
|
||||||
err_code = flexran_agent_handle_stats(mod_id, (void *) stats_context[mod_id].stats_req, ¤t_report);
|
for (int i = 0; i < msg->stats_reply_msg->n_cell_report; ++i)
|
||||||
if (err_code < 0) {
|
free(msg->stats_reply_msg->cell_report[i]);
|
||||||
goto error;
|
for (int i = 0; i < msg->stats_reply_msg->n_ue_report; ++i)
|
||||||
}
|
free(msg->stats_reply_msg->ue_report[i]);
|
||||||
}
|
free(msg->stats_reply_msg->cell_report);
|
||||||
/* /\*TODO:Check if a previous reports exists and if yes, generate a report */
|
free(msg->stats_reply_msg->ue_report);
|
||||||
/* *that is the diff between the old and the new report, */
|
free(msg->stats_reply_msg->header);
|
||||||
/* *respecting the thresholds. Otherwise send the new report*\/ */
|
free(msg->stats_reply_msg);
|
||||||
/* if (stats_context[mod_id].prev_stats_reply != NULL) { */
|
free(msg);
|
||||||
|
return 0;
|
||||||
/* msg = flexran_agent_generate_diff_mac_stats_report(current_report, stats_context[mod_id].prev_stats_reply); */
|
|
||||||
|
|
||||||
/* /\*Destroy the old stats*\/ */
|
|
||||||
/* flexran_agent_destroy_flexran_message(stats_context[mod_id].prev_stats_reply); */
|
|
||||||
/* } */
|
|
||||||
/* /\*Use the current report for future comparissons*\/ */
|
|
||||||
/* stats_context[mod_id].prev_stats_reply = current_report; */
|
|
||||||
|
|
||||||
|
|
||||||
if (pthread_mutex_unlock(stats_context[mod_id].mutex)) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (current_report != NULL){
|
|
||||||
data=flexran_agent_pack_message(current_report, &size);
|
|
||||||
/*Send any stats updates using the MAC channel of the eNB*/
|
|
||||||
if (flexran_agent_msg_send(mod_id, FLEXRAN_AGENT_MAC, data, size, priority)) {
|
|
||||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENQUEUING;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
error:
|
|
||||||
LOG_D(FLEXRAN_AGENT, "Could not send sf trigger message\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id) {
|
err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id) {
|
||||||
@@ -755,7 +736,7 @@ err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id) {
|
|||||||
stats_context[mod_id].mutex = calloc(1, sizeof(pthread_mutex_t));
|
stats_context[mod_id].mutex = calloc(1, sizeof(pthread_mutex_t));
|
||||||
if (stats_context[mod_id].mutex == NULL)
|
if (stats_context[mod_id].mutex == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
if (pthread_mutex_init(stats_context[mod_id].mutex, NULL))
|
if (pthread_mutex_init(stats_context[mod_id].mutex, NULL) != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -772,6 +753,5 @@ err_code_t flexran_agent_destroy_cont_stats_update(mid_t mod_id) {
|
|||||||
flexran_agent_destroy_flexran_message(stats_context[mod_id].prev_stats_reply);
|
flexran_agent_destroy_flexran_message(stats_context[mod_id].prev_stats_reply);
|
||||||
free(stats_context[mod_id].mutex);
|
free(stats_context[mod_id].mutex);
|
||||||
|
|
||||||
// mac_agent_registered[mod_id] = 0;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ int flexran_agent_msg_send(mid_t mod_id, agent_id_t agent_id, void *data, int si
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *size, int *priority) {
|
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *priority) {
|
||||||
/*Check if agent id is valid*/
|
/*Check if agent id is valid*/
|
||||||
if (agent_id >= FLEXRAN_AGENT_MAX || agent_id < 0) {
|
if (agent_id >= FLEXRAN_AGENT_MAX || agent_id < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
@@ -66,7 +66,7 @@ int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return channel->msg_recv(data, size, priority, channel->channel_info);
|
return channel->msg_recv(data, priority, channel->channel_info);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
LOG_E(FLEXRAN_AGENT, "No channel registered for agent with id %d\n", agent_id);
|
LOG_E(FLEXRAN_AGENT, "No channel registered for agent with id %d\n", agent_id);
|
||||||
@@ -104,7 +104,7 @@ void flexran_agent_unregister_channel(mid_t mod_id, agent_id_t agent_id) {
|
|||||||
|
|
||||||
int flexran_agent_create_channel(void *channel_info,
|
int flexran_agent_create_channel(void *channel_info,
|
||||||
int (*msg_send)(void *data, int size, int priority, void *channel_info),
|
int (*msg_send)(void *data, int size, int priority, void *channel_info),
|
||||||
int (*msg_recv)(void **data, int *size, int *priority, void *channel_info),
|
int (*msg_recv)(void **data, int *priority, void *channel_info),
|
||||||
void (*release)(flexran_agent_channel_t *channel)) {
|
void (*release)(flexran_agent_channel_t *channel)) {
|
||||||
|
|
||||||
int channel_id = ++flexran_agent_channel_id;
|
int channel_id = ++flexran_agent_channel_id;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ int channel_id;
|
|||||||
void *channel_info;
|
void *channel_info;
|
||||||
/*Callbacks for channel message Tx and Rx*/
|
/*Callbacks for channel message Tx and Rx*/
|
||||||
int (*msg_send)(void *data, int size, int priority, void *channel_info);
|
int (*msg_send)(void *data, int size, int priority, void *channel_info);
|
||||||
int (*msg_recv)(void **data, int *size, int *priority, void *channel_info);
|
int (*msg_recv)(void **data, int *priority, void *channel_info);
|
||||||
void (*release)(struct flexran_agent_channel_s *channel);
|
void (*release)(struct flexran_agent_channel_s *channel);
|
||||||
} flexran_agent_channel_t;
|
} flexran_agent_channel_t;
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ typedef struct flexran_agent_channel_instance_s{
|
|||||||
|
|
||||||
/*Send and receive messages using the channel registered for a specific agent*/
|
/*Send and receive messages using the channel registered for a specific agent*/
|
||||||
int flexran_agent_msg_send(mid_t mod_id, agent_id_t agent_id, void *data, int size, int priority);
|
int flexran_agent_msg_send(mid_t mod_id, agent_id_t agent_id, void *data, int size, int priority);
|
||||||
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *size, int *priority);
|
int flexran_agent_msg_recv(mid_t mod_id, agent_id_t agent_id, void **data, int *priority);
|
||||||
|
|
||||||
/*Register a channel to an agent. Use FLEXRAN_AGENT_MAX to register the
|
/*Register a channel to an agent. Use FLEXRAN_AGENT_MAX to register the
|
||||||
*same channel to all agents*/
|
*same channel to all agents*/
|
||||||
@@ -61,7 +61,7 @@ void flexran_agent_unregister_channel(mid_t mod_id, agent_id_t agent_id);
|
|||||||
/*Create a new channel. Returns the id of the new channel or negative number otherwise*/
|
/*Create a new channel. Returns the id of the new channel or negative number otherwise*/
|
||||||
int flexran_agent_create_channel(void *channel_info,
|
int flexran_agent_create_channel(void *channel_info,
|
||||||
int (*msg_send)(void *data, int size, int priority, void *channel_info),
|
int (*msg_send)(void *data, int size, int priority, void *channel_info),
|
||||||
int (*msg_recv)(void **data, int *size, int *priority, void *channel_info),
|
int (*msg_recv)(void **data, int *priority, void *channel_info),
|
||||||
void (*release)(flexran_agent_channel_t *channel));
|
void (*release)(flexran_agent_channel_t *channel));
|
||||||
|
|
||||||
/*Unregister a channel from all agents and destroy it. Returns 0 in case of success*/
|
/*Unregister a channel from all agents and destroy it. Returns 0 in case of success*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -70,15 +70,21 @@ uint16_t flexran_get_sfn_sf(mid_t mod_id);
|
|||||||
rest for frame */
|
rest for frame */
|
||||||
uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time);
|
uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time);
|
||||||
|
|
||||||
/* Return the number of attached UEs */
|
/* Return the number of attached UEs for the MAC */
|
||||||
int flexran_get_num_ues(mid_t mod_id);
|
int flexran_get_mac_num_ues(mid_t mod_id);
|
||||||
|
|
||||||
|
/* Get the number of logical channels per UE. This function does not consider
|
||||||
|
* dedicated bearers yet */
|
||||||
|
int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id);
|
||||||
|
|
||||||
|
/* Get the rnti of a UE with id ue_id from MAC */
|
||||||
|
rnti_t flexran_get_mac_ue_crnti(mid_t mod_id, mid_t ue_id);
|
||||||
|
|
||||||
|
int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Return the UE id of attached UE as opposed to the index [0,NUM UEs] (i.e.,
|
/* Return the UE id of attached UE as opposed to the index [0,NUM UEs] (i.e.,
|
||||||
* the i'th active UE). Returns 0 if the i'th active UE could not be found. */
|
* the i'th active UE). Returns 0 if the i'th active UE could not be found. */
|
||||||
int flexran_get_ue_id(mid_t mod_id, int i);
|
int flexran_get_mac_ue_id(mid_t mod_id, int i);
|
||||||
|
|
||||||
/* Get the rnti of a UE with id ue_id */
|
|
||||||
rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id);
|
|
||||||
|
|
||||||
/* Get the RLC buffer status report in bytes of a ue for a designated
|
/* Get the RLC buffer status report in bytes of a ue for a designated
|
||||||
* logical channel id */
|
* logical channel id */
|
||||||
@@ -210,10 +216,10 @@ uint8_t flexran_get_prach_FreqOffset(mid_t mod_id, uint8_t cc_id);
|
|||||||
uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id);
|
uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
/* Get the length of the UL cyclic prefix */
|
/* Get the length of the UL cyclic prefix */
|
||||||
lte_prefix_type_t flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
Protocol__FlexUlCyclicPrefixLength flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
/* Get the length of the DL cyclic prefix */
|
/* Get the length of the DL cyclic prefix */
|
||||||
lte_prefix_type_t flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
Protocol__FlexDlCyclicPrefixLength flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
/* Get the physical cell id of a cell */
|
/* Get the physical cell id of a cell */
|
||||||
uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id);
|
uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id);
|
||||||
@@ -287,34 +293,44 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
|
|||||||
|
|
||||||
uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id);
|
uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
PUSCH_HOPPING_t flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id);
|
Protocol__FlexHoppingMode flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id);
|
uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id);
|
uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
int flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id);
|
Protocol__FlexPhichResource flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
uint8_t flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id);
|
Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
PHICH_DURATION_t flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id);
|
Protocol__FlexPhichDuration flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ************************************
|
* ************************************
|
||||||
* Get Messages for UE Configuration Reply
|
* Get Messages for UE Configuration Reply
|
||||||
* ************************************
|
* ************************************
|
||||||
*/
|
*/
|
||||||
|
/* Get the number of attached UEs for the RRC */
|
||||||
|
int flexran_get_rrc_num_ues(mid_t mod_id);
|
||||||
|
|
||||||
|
/* Get the RNTI of UE at index 'index' in RRC list */
|
||||||
|
rnti_t flexran_get_rrc_rnti_nth_ue(mid_t mod_id, int index);
|
||||||
|
|
||||||
|
/* Get the list of RNTIs of up to max_list entries. When max_list >=
|
||||||
|
* flexran_get_rrc_num_ues(), gets a list of all UEs registered in the RRC. UE
|
||||||
|
* RNTIs are saved in list, returns number of saved RNTIs */
|
||||||
|
int flexran_get_rrc_rnti_list(mid_t mod_id, rnti_t *list, int max_list);
|
||||||
|
|
||||||
/* Get timer in subframes. Controls the synchronization
|
/* Get timer in subframes. Controls the synchronization
|
||||||
status of the UE, not the actual timing
|
status of the UE, not the actual timing
|
||||||
advance procedure. See TS 36.321 */
|
advance procedure. See TS 36.321 */
|
||||||
LTE_TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id);
|
LTE_TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get measurement gap configuration. See TS 36.133 */
|
/* Get measurement gap configuration. See TS 36.133 */
|
||||||
Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id);
|
Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get measurement gap configuration offset if applicable */
|
/* Get measurement gap configuration offset if applicable */
|
||||||
long flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id);
|
long flexran_get_meas_gap_config_offset(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* DL aggregated bit-rate of non-gbr bearer
|
/* DL aggregated bit-rate of non-gbr bearer
|
||||||
per UE. See TS 36.413 */
|
per UE. See TS 36.413 */
|
||||||
@@ -325,62 +341,62 @@ uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id);
|
|||||||
uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id);
|
uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id);
|
||||||
|
|
||||||
/* Only half-duplex support. FDD operation. Boolean value */
|
/* Only half-duplex support. FDD operation. Boolean value */
|
||||||
int flexran_get_half_duplex(mid_t mod_id, mid_t ue_id);
|
int flexran_get_half_duplex(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Support of intra-subframe hopping. Boolean value */
|
/* Support of intra-subframe hopping. Boolean value */
|
||||||
int flexran_get_intra_sf_hopping(mid_t mod_id, mid_t ue_id);
|
int flexran_get_intra_sf_hopping(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* UE support for type 2 hopping with n_sb>1 */
|
/* UE support for type 2 hopping with n_sb>1 */
|
||||||
int flexran_get_type2_sb_1(mid_t mod_id, mid_t ue_id);
|
int flexran_get_type2_sb_1(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get the UE category */
|
/* Get the UE category */
|
||||||
long flexran_get_ue_category(mid_t mod_id, mid_t ue_id);
|
long flexran_get_ue_category(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* UE support for resource allocation type 1 */
|
/* UE support for resource allocation type 1 */
|
||||||
int flexran_get_res_alloc_type1(mid_t mod_id, mid_t ue_id);
|
int flexran_get_res_alloc_type1(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get UE transmission mode */
|
/* Get UE transmission mode */
|
||||||
long flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id);
|
long flexran_get_ue_transmission_mode(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Boolean value. See TS 36.321 */
|
/* Boolean value. See TS 36.321 */
|
||||||
BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id);
|
BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* The max HARQ retransmission for UL.
|
/* The max HARQ retransmission for UL.
|
||||||
See TS 36.321 */
|
See TS 36.321 */
|
||||||
long flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id);
|
long flexran_get_maxHARQ_TX(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* See TS 36.213 */
|
/* See TS 36.213 */
|
||||||
long flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id);
|
long flexran_get_beta_offset_ack_index(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* See TS 36.213 */
|
/* See TS 36.213 */
|
||||||
long flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id);
|
long flexran_get_beta_offset_ri_index(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* See TS 36.213 */
|
/* See TS 36.213 */
|
||||||
long flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id);
|
long flexran_get_beta_offset_cqi_index(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Boolean. See TS36.213, Section 10.1 */
|
/* Boolean. See TS36.213, Section 10.1 */
|
||||||
BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id);
|
BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Boolean. See TS 36.213, Section 8.2 */
|
/* Boolean. See TS 36.213, Section 8.2 */
|
||||||
BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
|
BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, uint8_t cc_id);
|
||||||
|
|
||||||
/* Get aperiodic CQI report mode */
|
/* Get aperiodic CQI report mode */
|
||||||
LTE_CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id);
|
Protocol__FlexAperiodicCqiReportMode flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get ACK/NACK feedback mode. TDD only */
|
/* Get ACK/NACK feedback mode. TDD only */
|
||||||
long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, mid_t ue_id);
|
long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* See TS36.213, section 10.1 */
|
/* See TS36.213, section 10.1 */
|
||||||
long flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id);
|
long flexran_get_ack_nack_repetition_factor(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Boolean. Extended buffer status report size */
|
/* Boolean. Extended buffer status report size */
|
||||||
long flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id);
|
long flexran_get_extended_bsr_size(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get number of UE transmission antennas */
|
/* Get number of UE transmission antennas */
|
||||||
int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id);
|
int flexran_get_ue_transmission_antenna(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get the IMSI of UE */
|
/* Get the IMSI of UE */
|
||||||
uint64_t flexran_get_ue_imsi(mid_t mod_id, mid_t ue_id);
|
uint64_t flexran_get_ue_imsi(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get logical channel group of a channel with id lc_id */
|
/* Get logical channel group of a channel with id lc_id */
|
||||||
long flexran_get_lcg(mid_t mod_id, mid_t ue_id, mid_t lc_id);
|
long flexran_get_lcg(mid_t mod_id, mid_t ue_id, mid_t lc_id);
|
||||||
@@ -419,96 +435,110 @@ void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t
|
|||||||
void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type);
|
void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type);
|
||||||
|
|
||||||
/*RRC status flexRAN*/
|
/*RRC status flexRAN*/
|
||||||
uint8_t flexran_get_rrc_status(mid_t mod_id, mid_t ue_id);
|
uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
|
|
||||||
/***************************** PDCP ***********************/
|
/***************************** PDCP ***********************/
|
||||||
|
/* PDCP uid obtained through the RNTI */
|
||||||
|
uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/*PDCP superframe numberflexRAN*/
|
/*PDCP superframe numberflexRAN*/
|
||||||
uint32_t flexran_get_pdcp_sfn(mid_t mod_id);
|
uint32_t flexran_get_pdcp_sfn(mid_t mod_id);
|
||||||
|
|
||||||
/*PDCP pdcp tx stats window*/
|
/*PDCP pdcp tx stats window*/
|
||||||
void flexran_set_pdcp_tx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window);
|
void flexran_set_pdcp_tx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window);
|
||||||
|
|
||||||
/*PDCP pdcp rx stats window*/
|
/*PDCP pdcp rx stats window*/
|
||||||
void flexran_set_pdcp_rx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window);
|
void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window);
|
||||||
|
|
||||||
/*PDCP num tx pdu status flexRAN*/
|
/*PDCP num tx pdu status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP num tx bytes status flexRAN*/
|
/*PDCP num tx bytes status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP number of transmit packet / second status flexRAN*/
|
/*PDCP number of transmit packet / second status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP pdcp tx bytes in a given window flexRAN*/
|
/*PDCP pdcp tx bytes in a given window flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP tx sequence number flexRAN*/
|
/*PDCP tx sequence number flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP tx aggregated packet arrival flexRAN*/
|
/*PDCP tx aggregated packet arrival flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP tx aggregated packet arrival per second flexRAN*/
|
/*PDCP tx aggregated packet arrival per second flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
|
|
||||||
/*PDCP num rx pdu status flexRAN*/
|
/*PDCP num rx pdu status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP num rx bytes status flexRAN*/
|
/*PDCP num rx bytes status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP number of received packet / second flexRAN*/
|
/*PDCP number of received packet / second flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP gootput (bit/s) status flexRAN*/
|
/*PDCP gootput (bit/s) status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP rx sequence number flexRAN*/
|
/*PDCP rx sequence number flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP rx aggregated packet arrival flexRAN*/
|
/*PDCP rx aggregated packet arrival flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP rx aggregated packet arrival per second flexRAN*/
|
/*PDCP rx aggregated packet arrival per second flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*PDCP num of received outoforder pdu status flexRAN*/
|
/*PDCP num of received outoforder pdu status flexRAN*/
|
||||||
uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid);
|
||||||
|
|
||||||
/*********************RRC**********************/
|
/*********************RRC**********************/
|
||||||
/*Get primary cell measuremeant id flexRAN*/
|
/*Get primary cell measuremeant id flexRAN*/
|
||||||
LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id);
|
LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/*Get primary cell RSRP measurement flexRAN*/
|
/*Get primary cell RSRP measurement flexRAN*/
|
||||||
float flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id);
|
float flexran_get_rrc_pcell_rsrp(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/*Get primary cell RSRQ measurement flexRAN*/
|
/*Get primary cell RSRQ measurement flexRAN*/
|
||||||
float flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id);
|
float flexran_get_rrc_pcell_rsrq(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/* Get RRC neighbouring measurement */
|
/* Get RRC neighbouring measurement */
|
||||||
int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id);
|
int flexran_get_rrc_num_ncell(mid_t mod_id, rnti_t rnti);
|
||||||
|
|
||||||
/*Get physical cell id*/
|
/* Get physical cell id */
|
||||||
LTE_PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id);
|
long flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, rnti_t rnti, long cell_id);
|
||||||
|
|
||||||
/*Get RSRP of neighbouring Cell*/
|
/* Get RSRP of neighbouring Cell */
|
||||||
float flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id);
|
float flexran_get_rrc_neigh_rsrp(mid_t mod_id, rnti_t rnti, long cell_id);
|
||||||
|
|
||||||
/*Get RSRQ of neighbouring Cell*/
|
/* Get RSRQ of neighbouring Cell */
|
||||||
float flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id);
|
float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id);
|
||||||
|
|
||||||
/*Get MCC PLMN identity neighbouring Cell*/
|
/*Get MCC PLMN identity neighbouring Cell*/
|
||||||
/* currently not implemented
|
/* currently not implemented
|
||||||
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, mid_t ue_id, int cell_id); */
|
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, rnti_t rnti, int cell_id); */
|
||||||
|
|
||||||
/*Get MNC PLMN identity neighbouring Cell*/
|
/*Get MNC PLMN identity neighbouring Cell*/
|
||||||
/* currently not implemented
|
/* currently not implemented
|
||||||
int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_id); */
|
int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_id); */
|
||||||
|
|
||||||
|
/* Get number of PLMNs that is broadcasted in SIB1 */
|
||||||
|
uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id);
|
||||||
|
|
||||||
|
/* Get index'th MCC broadcasted in SIB1 */
|
||||||
|
uint16_t flexran_get_rrc_mcc(mid_t mod_id, uint8_t index);
|
||||||
|
|
||||||
|
/* Get index'th MNC broadcasted in SIB1 */
|
||||||
|
uint16_t flexran_get_rrc_mnc(mid_t mod_id, uint8_t index);
|
||||||
|
|
||||||
|
/* Get index'th MNC's digit length broadcasted in SIB1 */
|
||||||
|
uint8_t flexran_get_rrc_mnc_digit_length(mid_t mod_id, uint8_t index);
|
||||||
|
|
||||||
/************************** Slice configuration **************************/
|
/************************** Slice configuration **************************/
|
||||||
|
|
||||||
/* Get the DL slice ID for a UE */
|
/* Get the DL slice ID for a UE */
|
||||||
@@ -660,3 +690,16 @@ void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs);
|
|||||||
char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx);
|
char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx);
|
||||||
/* Set the scheduler name for a slice in UL */
|
/* Set the scheduler name for a slice in UL */
|
||||||
int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name);
|
int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name);
|
||||||
|
|
||||||
|
/********************* general information *****************/
|
||||||
|
/* get an ID for this BS (or part of a BS) */
|
||||||
|
uint64_t flexran_get_bs_id(mid_t mod_id);
|
||||||
|
|
||||||
|
/* get the capabilities supported by the underlying network function,
|
||||||
|
* returns the number and stores list of this length in caps. If there are zero
|
||||||
|
* capabilities, *caps will be NULL */
|
||||||
|
size_t flexran_get_capabilities(mid_t mod_id, Protocol__FlexBsCapability **caps);
|
||||||
|
|
||||||
|
/* get the capabilities supported by the underlying network function as a bit
|
||||||
|
* mask. */
|
||||||
|
uint16_t flexran_get_capabilities_mask(mid_t mod_id);
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- Common definitions
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
F1AP-CommonDataTypes {
|
||||||
|
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||||
|
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-CommonDataTypes (3) }
|
||||||
|
|
||||||
|
DEFINITIONS AUTOMATIC TAGS ::=
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
Criticality ::= ENUMERATED { reject, ignore, notify }
|
||||||
|
|
||||||
|
Presence ::= ENUMERATED { optional, conditional, mandatory }
|
||||||
|
|
||||||
|
PrivateIE-ID ::= CHOICE {
|
||||||
|
local INTEGER (0..65535),
|
||||||
|
global OBJECT IDENTIFIER
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcedureCode ::= INTEGER (0..255)
|
||||||
|
|
||||||
|
ProtocolExtensionID ::= INTEGER (0..65535)
|
||||||
|
|
||||||
|
ProtocolIE-ID ::= INTEGER (0..65535)
|
||||||
|
|
||||||
|
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
|
||||||
|
|
||||||
|
END
|
||||||
@@ -0,0 +1,179 @@
|
|||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- Constant definitions
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
F1AP-Constants {
|
||||||
|
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
|
||||||
|
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Constants (4) }
|
||||||
|
|
||||||
|
DEFINITIONS AUTOMATIC TAGS ::=
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- IE parameter types from other modules.
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
IMPORTS
|
||||||
|
ProcedureCode,
|
||||||
|
ProtocolIE-ID
|
||||||
|
|
||||||
|
FROM F1AP-CommonDataTypes;
|
||||||
|
|
||||||
|
|
||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- Elementary Procedures
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
id-Reset ProcedureCode ::= 0
|
||||||
|
id-F1Setup ProcedureCode ::= 1
|
||||||
|
id-ErrorIndication ProcedureCode ::= 2
|
||||||
|
id-gNBDUConfigurationUpdate ProcedureCode ::= 3
|
||||||
|
id-gNBCUConfigurationUpdate ProcedureCode ::= 4
|
||||||
|
id-UEContextSetup ProcedureCode ::= 5
|
||||||
|
id-UEContextRelease ProcedureCode ::= 6
|
||||||
|
id-UEContextModification ProcedureCode ::= 7
|
||||||
|
id-UEContextModificationRequired ProcedureCode ::= 8
|
||||||
|
id-UEMobilityCommand ProcedureCode ::= 9
|
||||||
|
id-UEContextReleaseRequest ProcedureCode ::= 10
|
||||||
|
id-InitialULRRCMessageTransfer ProcedureCode ::= 11
|
||||||
|
id-DLRRCMessageTransfer ProcedureCode ::= 12
|
||||||
|
id-ULRRCMessageTransfer ProcedureCode ::= 13
|
||||||
|
id-privateMessage ProcedureCode ::= 14
|
||||||
|
|
||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- Extension constants
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
maxPrivateIEs INTEGER ::= 65535
|
||||||
|
maxProtocolExtensions INTEGER ::= 65535
|
||||||
|
maxProtocolIEs INTEGER ::= 65535
|
||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- Lists
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
maxNRARFCN INTEGER ::= 3266667
|
||||||
|
maxnoofErrors INTEGER ::= 256
|
||||||
|
maxnoofIndividualF1ConnectionsToReset INTEGER ::= 65536
|
||||||
|
maxCellingNBDU INTEGER ::= 512
|
||||||
|
maxnoofSCells INTEGER ::= 64
|
||||||
|
maxnoofSRBs INTEGER ::= 8
|
||||||
|
maxnoofDRBs INTEGER ::= 64
|
||||||
|
maxnoofULTunnels INTEGER ::= 2
|
||||||
|
maxnoofDLTunnels INTEGER ::= 2
|
||||||
|
maxnoofBPLMNs INTEGER ::= 6
|
||||||
|
maxnoofCandidateSpCells INTEGER ::= 64
|
||||||
|
maxnoofPotentialSpCells INTEGER ::= 64
|
||||||
|
|
||||||
|
-- **************************************************************
|
||||||
|
--
|
||||||
|
-- IEs
|
||||||
|
--
|
||||||
|
-- **************************************************************
|
||||||
|
|
||||||
|
id-Cause ProtocolIE-ID ::= 0
|
||||||
|
id-Cells-Failed-to-be-Activated-List ProtocolIE-ID ::= 1
|
||||||
|
id-Cells-Failed-to-be-Activated-List-Item ProtocolIE-ID ::= 2
|
||||||
|
id-Cells-to-be-Activated-List ProtocolIE-ID ::= 3
|
||||||
|
id-Cells-to-be-Activated-List-Item ProtocolIE-ID ::= 4
|
||||||
|
id-Cells-to-be-Deactivated-List ProtocolIE-ID ::= 5
|
||||||
|
id-Cells-to-be-Deactivated-List-Item ProtocolIE-ID ::= 6
|
||||||
|
id-CriticalityDiagnostics ProtocolIE-ID ::= 7
|
||||||
|
id-CUtoDURRCInformation ProtocolIE-ID ::= 9
|
||||||
|
id-DRBs-FailedToBeModifiedConf-Item ProtocolIE-ID ::= 10
|
||||||
|
id-DRBs-FailedToBeModifiedConf-List ProtocolIE-ID ::= 11
|
||||||
|
id-DRBs-FailedToBeModified-Item ProtocolIE-ID ::= 12
|
||||||
|
id-DRBs-FailedToBeModified-List ProtocolIE-ID ::= 13
|
||||||
|
id-DRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 14
|
||||||
|
id-DRBs-FailedToBeSetup-List ProtocolIE-ID ::= 15
|
||||||
|
id-DRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 16
|
||||||
|
id-DRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 17
|
||||||
|
id-DRBs-ModifiedConf-Item ProtocolIE-ID ::= 18
|
||||||
|
id-DRBs-ModifiedConf-List ProtocolIE-ID ::= 19
|
||||||
|
id-DRBs-Modified-Item ProtocolIE-ID ::= 20
|
||||||
|
id-DRBs-Modified-List ProtocolIE-ID ::= 21
|
||||||
|
id-DRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 22
|
||||||
|
id-DRBs-Required-ToBeModified-List ProtocolIE-ID ::= 23
|
||||||
|
id-DRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 24
|
||||||
|
id-DRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 25
|
||||||
|
id-DRBs-Setup-Item ProtocolIE-ID ::= 26
|
||||||
|
id-DRBs-Setup-List ProtocolIE-ID ::= 27
|
||||||
|
id-DRBs-SetupMod-Item ProtocolIE-ID ::= 28
|
||||||
|
id-DRBs-SetupMod-List ProtocolIE-ID ::= 29
|
||||||
|
id-DRBs-ToBeModified-Item ProtocolIE-ID ::= 30
|
||||||
|
id-DRBs-ToBeModified-List ProtocolIE-ID ::= 31
|
||||||
|
id-DRBs-ToBeReleased-Item ProtocolIE-ID ::= 32
|
||||||
|
id-DRBs-ToBeReleased-List ProtocolIE-ID ::= 33
|
||||||
|
id-DRBs-ToBeSetup-Item ProtocolIE-ID ::= 34
|
||||||
|
id-DRBs-ToBeSetup-List ProtocolIE-ID ::= 35
|
||||||
|
id-DRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 36
|
||||||
|
id-DRBs-ToBeSetupMod-List ProtocolIE-ID ::= 37
|
||||||
|
id-DRXCycle ProtocolIE-ID ::= 38
|
||||||
|
id-DUtoCURRCInformation ProtocolIE-ID ::= 39
|
||||||
|
id-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 40
|
||||||
|
id-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 41
|
||||||
|
id-gNB-DU-ID ProtocolIE-ID ::= 42
|
||||||
|
id-GNB-DU-Served-Cells-Item ProtocolIE-ID ::= 43
|
||||||
|
id-gNB-DU-Served-Cells-List ProtocolIE-ID ::= 44
|
||||||
|
id-gNB-DU-Name ProtocolIE-ID ::= 45
|
||||||
|
id-NRCellID ProtocolIE-ID ::= 46
|
||||||
|
id-oldgNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 47
|
||||||
|
id-ResetType ProtocolIE-ID ::= 48
|
||||||
|
id-ResourceCoordinationTransferContainer ProtocolIE-ID ::= 49
|
||||||
|
id-RRCContainer ProtocolIE-ID ::= 50
|
||||||
|
id-SCell-ToBeRemoved-Item ProtocolIE-ID ::= 51
|
||||||
|
id-SCell-ToBeRemoved-List ProtocolIE-ID ::= 52
|
||||||
|
id-SCell-ToBeSetup-Item ProtocolIE-ID ::= 53
|
||||||
|
id-SCell-ToBeSetup-List ProtocolIE-ID ::= 54
|
||||||
|
id-SCell-ToBeSetupMod-Item ProtocolIE-ID ::= 55
|
||||||
|
id-SCell-ToBeSetupMod-List ProtocolIE-ID ::= 56
|
||||||
|
id-Served-Cells-To-Add-Item ProtocolIE-ID ::= 57
|
||||||
|
id-Served-Cells-To-Add-List ProtocolIE-ID ::= 58
|
||||||
|
id-Served-Cells-To-Delete-Item ProtocolIE-ID ::= 59
|
||||||
|
id-Served-Cells-To-Delete-List ProtocolIE-ID ::= 60
|
||||||
|
id-Served-Cells-To-Modify-Item ProtocolIE-ID ::= 61
|
||||||
|
id-Served-Cells-To-Modify-List ProtocolIE-ID ::= 62
|
||||||
|
id-SpCell-ID ProtocolIE-ID ::= 63
|
||||||
|
id-SRBID ProtocolIE-ID ::= 64
|
||||||
|
id-SRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 65
|
||||||
|
id-SRBs-FailedToBeSetup-List ProtocolIE-ID ::= 66
|
||||||
|
id-SRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 67
|
||||||
|
id-SRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 68
|
||||||
|
id-SRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 69
|
||||||
|
id-SRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 70
|
||||||
|
id-SRBs-ToBeReleased-Item ProtocolIE-ID ::= 71
|
||||||
|
id-SRBs-ToBeReleased-List ProtocolIE-ID ::= 72
|
||||||
|
id-SRBs-ToBeSetup-Item ProtocolIE-ID ::= 73
|
||||||
|
id-SRBs-ToBeSetup-List ProtocolIE-ID ::= 74
|
||||||
|
id-SRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 75
|
||||||
|
id-SRBs-ToBeSetupMod-List ProtocolIE-ID ::= 76
|
||||||
|
id-TimeToWait ProtocolIE-ID ::= 77
|
||||||
|
id-TransactionID ProtocolIE-ID ::= 78
|
||||||
|
id-TransmissionStopIndicator ProtocolIE-ID ::= 79
|
||||||
|
id-UE-associatedLogicalF1-ConnectionItem ProtocolIE-ID ::= 80
|
||||||
|
id-UE-associatedLogicalF1-ConnectionListResAck ProtocolIE-ID ::= 81
|
||||||
|
id-gNB-CU-Name ProtocolIE-ID ::= 82
|
||||||
|
id-SCell-FailedtoSetup-List ProtocolIE-ID ::= 83
|
||||||
|
id-SCell-FailedtoSetup-Item ProtocolIE-ID ::= 84
|
||||||
|
id-SCell-FailedtoSetupMod-List ProtocolIE-ID ::= 85
|
||||||
|
id-SCell-FailedtoSetupMod-Item ProtocolIE-ID ::= 86
|
||||||
|
id-RRCRconfigurationCompleteIndicator ProtocolIE-ID ::= 87
|
||||||
|
id-Active-Cells-Item ProtocolIE-ID ::= 88
|
||||||
|
id-Active-Cells-List ProtocolIE-ID ::= 89
|
||||||
|
id-Candidate-SpCell-List ProtocolIE-ID ::= 90
|
||||||
|
id-Candidate-SpCell-Item ProtocolIE-ID ::= 91
|
||||||
|
id-Potential-SpCell-List ProtocolIE-ID ::= 92
|
||||||
|
id-Potential-SpCell-Item ProtocolIE-ID ::= 93
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user