Commit 4e0f7419 authored by Bruno Mongazon-Cazavet's avatar Bruno Mongazon-Cazavet

merge with develop

parents b5b0e59c 646cec27
This diff is collapsed.
......@@ -187,7 +187,7 @@ def AnalyzeIperf(cliOptions, clientReport, serverReport):
reportLine = clientReportLines[l+1]
logging.debug(f'found server report: "{reportLine}"')
statusTemplate = '(?:|\[ *\d+\].*) +0\.0-\s*(?P<duration>[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P<bitrate>[0-9\.]+) (?P<magnitude>[kKMG])bits\/sec +(?P<jitter>[0-9\.]+) ms +(\d+\/ ..\d+) +(\((?P<packetloss>[0-9\.]+)%\))'
statusTemplate = '(?:|\[ *\d+\].*) +0\.0-\s*(?P<duration>[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P<bitrate>[0-9\.]+) (?P<magnitude>[kKMG])bits\/sec +(?P<jitter>[0-9\.]+) ms +(\d+\/ *\d+) +(\((?P<packetloss>[0-9\.]+)%\))'
# if we do not find a server report in the client logs, check the server logs
# and use the last line which is typically close/identical to server report
if reportLine is None:
......@@ -345,7 +345,7 @@ class Containerize():
self.host = result.group(0)
if self.host == 'Ubuntu':
self.cli = 'docker'
self.dockerfileprefix = '.ubuntu18'
self.dockerfileprefix = '.ubuntu20'
self.cliBuildOptions = '--no-cache'
elif self.host == 'Red Hat':
self.cli = 'sudo podman'
......
......@@ -88,6 +88,40 @@ class PhySim:
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
return HTML
def __CheckResults_LDPCt1Test(self,HTML,CONST,testcase_id):
thrs_NOK = 500
thrs_KO = 1000
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#retrieve run log file and store it locally$
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
mySSH.close()
#parse results looking for Decoding values
runResultsT1=[]
with open(self.__runLogFile) as g:
for line in g:
if 'decoding time' in line:
runResultsT1.append(line)
info = runResultsT1[0][15:-13]
result = int(''.join(filter(str.isdigit, info)))/100
#once parsed move the local logfile to its folder for tidiness
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
#updating the HTML with results
html_cell = '<pre style="background-color:white">' + info + '</pre>'
html_queue=SimpleQueue()
html_queue.put(html_cell)
if result < thrs_NOK:
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
elif result > thrs_KO:
error_msg = f'Decoding time exceeds a limit of {thrs_KO} us'
logging.error(error_msg)
html_queue.put(f'<pre style="background-color:white">{error_msg}</pre>')
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', 1, html_queue)
self.exitStatus = 1
else:
HTML.CreateHtmlTestRowQueue(self.runargs, 'NOK', 1, html_queue)
return HTML
def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id):
html_queue = SimpleQueue()
#retrieve run log file and store it locally
......@@ -216,6 +250,24 @@ class PhySim:
lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id)
return lHTML
def Run_LDPCt1Test(self,htmlObj,constObj,testcase_id):
self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/'
#create run logs folder locally
os.system('mkdir -p ./'+self.__runLogPath)
#log file is tc_<testcase_id>.log remotely
self.__runLogFile='physim_'+str(testcase_id)+'.log'
#open a session for test run
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
mySSH.command('cd '+self.__workSpacePath,'\$',5)
#run and redirect the results to a log file
mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30)
mySSH.close()
#return updated HTML to main
lHTML = cls_oai_html.HTMLManagement()
lHTML=self.__CheckResults_LDPCt1Test(htmlObj,constObj,testcase_id)
return lHTML
def Run_NRulsimTest(self, htmlObj, constObj, testcase_id):
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
os.system(f'mkdir -p ./{self.__runLogPath}')
......
......@@ -237,7 +237,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.20.2,second_addr=192.168.10.2";
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.10.2";
}
);
......
......@@ -237,7 +237,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.20.2,second_addr=192.168.10.2";
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.10.2";
}
);
......
......@@ -237,7 +237,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.20.2,second_addr=192.168.10.2";
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.10.2";
}
);
......
......@@ -177,6 +177,7 @@ MACRLCs = (
remote_n_portd = 2152;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 1;
}
);
......
......@@ -8,7 +8,7 @@ ColNames :
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
Ref :
feprx : 46.0
feptx_prec : 11.0
feptx_prec : 15.0
feptx_ofdm : 35.0
feptx_total : 57.0
L1 Tx processing : 210.0
......
......@@ -43,7 +43,7 @@ import cls_physim #class PhySim for physical simulators build and
import cls_cots_ue #class CotsUe for Airplane mode control
import cls_containerize #class Containerize for all container-based operations on RAN/UE objects
import cls_static_code_analysis #class for static code analysis
import cls_ci_ueinfra #class defining the multi Ue infrastrucure
import cls_ci_ueinfra #class defining the multi Ue infrastrucure
import cls_physim1 #class PhySim for physical simulators deploy and run
import cls_cluster # class for building/deploying on cluster
......@@ -472,7 +472,7 @@ def GetParametersFromXML(action):
if (string_field is not None):
CONTAINERS.cliOptions = string_field
elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest':
elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest' or action == 'Run_LDPCt1Test':
ldpc.runargs = test.findtext('physim_run_args')
elif action == 'LicenceAndFormattingCheck':
......@@ -963,6 +963,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML=ldpc.Run_LDPCTest(HTML,CONST,id)
if ldpc.exitStatus==1:
RAN.prematureExit = True
elif action == 'Run_LDPCt1Test':
HTML=ldpc.Run_LDPCt1Test(HTML,CONST,id)
if ldpc.exitStatus==1:
RAN.prematureExit = True
elif action == 'Run_NRulsimTest':
HTML=ldpc.Run_NRulsimTest(HTML,CONST,id)
if ldpc.exitStatus==1:
......
......@@ -223,7 +223,7 @@ class RANManagement():
HTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
self.backgroundBuildTestId[int(self.eNB_instance)] = self.testCase_id
return
mySSH.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests|build have failed', 1500)
mySSH.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'BUILD SHOULD BE SUCCESSFUL|build have failed', 900)
mySSH.close()
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.testCase_id, HTML)
......
......@@ -2,6 +2,7 @@
- Build_Cluster_Image
- Build_PhySim
- Run_LDPCTest
- Run_LDPCt1Test
- Run_NRulsimTest
- Build_eNB
- WaitEndBuild_eNB
......
......@@ -35,7 +35,7 @@
<mode>TesteNB</mode>
<class>Build_eNB</class>
<desc>Build gNB (USRP)</desc>
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda"</Build_eNB_args>
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t1"</Build_eNB_args>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase>
......
......@@ -24,31 +24,79 @@
<htmlTabName>Test T1 Offload</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>000001 000002 000003 000004</TestCaseRequestedList>
<TestCaseRequestedList>000111 000112 000121 000122 000131 000132 000211 000212 000221 000222 000231 000232</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>Run_NRulsimTest</class>
<desc>Run T1 Offload nr_ulsim</desc>
<physim_run_args>-n2 -s30 -m9 -r50 -R106 -o</physim_run_args>
<testCase id="000111">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m5 -r106 -R106 -C10 -P</physim_run_args>
</testCase>
<testCase id="000002">
<class>Run_NRulsimTest</class>
<desc>Run T1 Offload nr_ulsim</desc>
<physim_run_args>-n2 -s30 -m9 -r106 -R106 -o</physim_run_args>
<testCase id="000112">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m5 -r106 -R106 -o -P</physim_run_args>
</testCase>
<testCase id="000003">
<class>Run_NRulsimTest</class>
<desc>Run T1 Offload nr_ulsim</desc>
<physim_run_args>-n2 -s30 -m16 -r106 -R106 -o</physim_run_args>
<testCase id="000121">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m15 -r106 -R106 -C10 -P</physim_run_args>
</testCase>
<testCase id="000004">
<class>Run_NRulsimTest</class>
<desc>Run T1 Offload nr_ulsim</desc>
<physim_run_args>-n2 -s30 -m9 -r273 -R273 -o</physim_run_args>
<testCase id="000122">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m15 -r106 -R106 -o -P</physim_run_args>
</testCase>
<testCase id="000131">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -C10 -P</physim_run_args>
</testCase>
<testCase id="000132">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -o -P</physim_run_args>
</testCase>
<testCase id="000211">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -C10 -P</physim_run_args>
</testCase>
<testCase id="000212">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -P</physim_run_args>
</testCase>
<testCase id="000221">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -C10 -P</physim_run_args>
</testCase>
<testCase id="000222">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -P</physim_run_args>
</testCase>
<testCase id="000231">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -C10 -P</physim_run_args>
</testCase>
<testCase id="000232">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -P</physim_run_args>
</testCase>
</testCaseList>
......@@ -166,7 +166,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: l2sim4g-trf-gen
networks:
......
......@@ -166,7 +166,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: rfsim4g-trf-gen
networks:
......
......@@ -166,7 +166,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: rfsim4g-trf-gen
networks:
......
......@@ -166,7 +166,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: rfsim4g-trf-gen
networks:
......
......@@ -166,7 +166,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: rfsim4g-trf-gen
networks:
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -37,7 +37,7 @@ $ docker pull oaisoftwarealliance/oai-amf:v1.5.0
$ docker pull oaisoftwarealliance/oai-nrf:v1.5.0
$ docker pull oaisoftwarealliance/oai-smf:v1.5.0
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
$ docker pull oaisoftwarealliance/trf-gen-cn5g:latest
$ docker pull oaisoftwarealliance/trf-gen-cn5g:focal
$ docker pull oaisoftwarealliance/oai-gnb:develop
$ docker pull oaisoftwarealliance/oai-nr-ue:develop
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: "l2sim-oai-ext-dn"
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -41,7 +41,7 @@ $ docker pull oaisoftwarealliance/oai-amf:v1.5.0
$ docker pull oaisoftwarealliance/oai-nrf:v1.5.0
$ docker pull oaisoftwarealliance/oai-smf:v1.5.0
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
$ docker pull oaisoftwarealliance/trf-gen-cn5g:latest
$ docker pull oaisoftwarealliance/trf-gen-cn5g:focal
$ docker pull oaisoftwarealliance/oai-gnb:develop
$ docker pull oaisoftwarealliance/oai-nr-ue:develop
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -149,7 +149,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.73.134 dev eth0; sleep infinity"
......
......@@ -148,7 +148,7 @@ services:
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
image: oaisoftwarealliance/trf-gen-cn5g:focal
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
......
......@@ -184,7 +184,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: prod-trf-gen
networks:
......
......@@ -168,7 +168,7 @@ services:
retries: 5
trf_gen:
image: trf-gen:production
image: oaisoftwarealliance/trf-gen-cn5g:focal
privileged: true
container_name: prod-trf-gen
networks:
......
......@@ -463,7 +463,7 @@
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.5 -S5.5
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9</main_exec_args>
-n100 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24</tags>
<search_expr_true>PUSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
......@@ -85,7 +85,7 @@ Options:
-d | --build-dir
Sets build directory (will be <oai-root>/cmake_targets/<build-dir>/build)
-I | --install-external-packages
Installs required packages such as LibXML, asn1.1 compiler, freediameter, ...
Installs required packages such as LibXML, asn1.1 compiler, ...
This option will require root password
--install-optional-packages
Install useful but not mandatory packages such as valgrind
......@@ -392,16 +392,16 @@ function main() {
if [ "$alib" = "$oklib" ] ; then
BUILD_OPTLIB="$BUILD_OPTLIB $alib"
echo_info "Enabling build of lib${alib}.so"
fi
done
done
if [ "${BUILD_OPTLIB## }" != "$2" ] ; then
fi
done
done
if [ "${BUILD_OPTLIB## }" != "$2" ] ; then
echo_fatal "Unknown optional library in $2, valid libraries are $OPTIONAL_LIBRARIES"
fi
fi
for oklib in $BUILD_OPTLIB ; do
CMAKE_CMD="$CMAKE_CMD -DENABLE_${oklib^^}=ON"
done
for oklib in $BUILD_OPTLIB ; do
CMAKE_CMD="$CMAKE_CMD -DENABLE_${oklib^^}=ON"
done
shift 2;;
--noavx512)
CMAKE_CMD="$CMAKE_CMD -DAVX512=OFF"
......@@ -476,8 +476,6 @@ function main() {
# Setting and printing OAI envs, we should check here #
#######################################################
echo_info "2. Setting the OAI PATHS ..."
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
# for conf files copy in this bash script
......@@ -554,8 +552,6 @@ function main() {
SKIP_SHARED_LIB_FLAG="True"
fi
echo_info "3. building the compilation directives ..."
DIR=$OPENAIR_DIR/cmake_targets
[ "$CLEAN" = "1" ] && rm -rf $DIR/$BUILD_DIR/build
......@@ -658,27 +654,9 @@ function main() {
if [ ! -z "$BUILD_OPTLIB" ] ; then
for oklib in $BUILD_OPTLIB ; do
compilations $BUILD_DIR $oklib
if [ "$oklib" == "websrv" ] ; then
BUILD_WEBSRVFRONT=1
echo_info "Build of websrv frontend enabled"
fi
done
fi
############################################
# Optional targets (others than libraries) #
############################################
if [ "$BUILD_WEBSRVFRONT" = "1" ] ; then
npmv=`command npm -v`
npms=$?
nodev=`command node -v`
nodes=$?
if [ "$npms" == "0" -a "$nodes" == "0" ] ; then
compilations $BUILD_DIR websrvfront
else
echo_warning "build of websrv front-end skipped, dependencies not met : " $npmv " " $nodev
fi
fi
####################################################
# Build RF device and transport protocol libraries #
####################################################
......@@ -767,7 +745,6 @@ function main() {
# Auto-tests #
##############
if [ "$OAI_TEST" = "1" ] ; then
echo_info "10. Running OAI pre commit tests (pre-ci) ..."
echo_error "These scripts ASSUME that user is in /etc/sudoers and can execute commands without PASSWORD prompt"
echo_error "Add the following lines in /etc/sudoers file to make your __user_name__ sudo without password prompt"
echo_error " __your_user_name__ ALL = (ALL:ALL) NOPASSWD: ALL"
......@@ -787,7 +764,6 @@ function main() {
fi
wait
else
echo_info "10. Bypassing the Tests ..."
echo_success "BUILD SHOULD BE SUCCESSFUL"
fi
......
......@@ -11,7 +11,7 @@ macro(add_option name val helpstr)
add_definitions("-D${name}=${value}")
endmacro(add_option)
macro(add_boolean_option name val helpstr)
macro(add_boolean_option name val helpstr adddef)
if(DEFINED ${name})
set(value ${${name}})
else(DEFINED ${name})
......@@ -19,9 +19,9 @@ macro(add_boolean_option name val helpstr)
endif()
set(${name} ${value} CACHE STRING "${helpstr}")
set_property(CACHE ${name} PROPERTY TYPE BOOL)
if (${value})
if (${value} AND ${adddef})
add_definitions("-D${name}")
endif (${value})
endif (${value} AND ${adddef})
endmacro(add_boolean_option)
macro(add_integer_option name val helpstr)
......
......@@ -274,6 +274,7 @@ install_usrp_uhd_driver_from_source(){
# - 4.2.0.0
# - 4.2.0.1
# - 4.3.0.0-rc1
# - 4.4.0.0
git apply $OPENAIR_DIR/cmake_targets/tools/uhd-4.x-tdd-patch.diff
ret=$?;[[ $ret -ne 0 ]] && echo_fatal "Could not apply the TDD patch"
fi
......@@ -349,7 +350,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get -y install python-tk $boost_libs_ubuntu libusb-1.0-0-dev
case "$(get_distribution_release)" in
"ubuntu18.04" | "ubuntu20.04" | "ubuntu22.04")
$SUDO apt-get -y install libuhd-dev libuhd4.2.0 uhd-host
$SUDO apt-get -y install libuhd-dev libuhd4.4.0 uhd-host
;;
esac
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
......@@ -523,7 +524,16 @@ check_install_soapy () {
install_soapy_from_source
#fi
install_soapy_iris_from_source
}
# for ubuntu 18 we need a special repository (https://apt.kitware.com/) to install cmake >= 3.12
add_cmake_repo () {
$SUDO $INSTALLER -y install wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | $SUDO tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | $SUDO tee /etc/apt/sources.list.d/kitware.list >/dev/null
$SUDO $INSTALLER -y update
$SUDO rm /usr/share/keyrings/kitware-archive-keyring.gpg
$SUDO $INSTALLER -y install kitware-archive-keyring
}
check_install_additional_tools (){
......@@ -578,6 +588,7 @@ check_install_oai_software() {
$SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in
"ubuntu18.04")
add_cmake_repo
specific_packages="libgcrypt11-dev guile-2.0-dev"
;;
"ubuntu20.04")
......
add_subdirectory(ds)
add_boolean_option(ENABLE_TELNETSRV OFF "Whether to build telnet support in modems" OFF)
if(ENABLE_TELNETSRV)
add_subdirectory(telnetsrv)
endif()
add_boolean_option(ENABLE_WEBSRV OFF "Whether to build the webserver" OFF)
if(ENABLE_WEBSRV)
add_subdirectory(websrv)
endif()
......@@ -40,6 +40,13 @@
#define MAX_BWP_SIZE 275
#define NR_MAX_NUM_BWP 4
#define NR_MAX_HARQ_PROCESSES 16
#define NR_NB_REG_PER_CCE 6
#define NR_NB_SC_PER_RB 12
typedef enum {
nr_FR1 = 0,
nr_FR2
} nr_frequency_range_e;
typedef struct nr_bandentry_s {
int16_t band;
......
#/*
# * 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/utils/telnetsrv/CMakelists.txt
#* \brief: build rules and checks for web server shared libraries
#* \author Francois TABURET
#* \date 2023
#* \version 1.0
#* \company NOKIA BellLabs France
#* \email: francois.taburet@nokia-bell-labs.com
#* \note
#* \warning
#*/
add_library(telnetsrv MODULE
telnetsrv.c
telnetsrv_proccmd.c
telnetsrv_loader.c
telnetsrv_measurements.c
)
target_link_libraries(telnetsrv PRIVATE history)
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc asn1_lte_rrc)
message(STATUS "Add enb specific telnet functions in libtelnetsrv_enb.so")
add_library(telnetsrv_enb MODULE
telnetsrv_enb_measurements.c
telnetsrv_enb_phycmd.c
)
add_dependencies(telnetsrv telnetsrv_enb)
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc asn1_lte_rrc)
message(STATUS "No specific telnet functions for gnb")
message(STATUS "No specific telnet functions for 4Gue")
message(STATUS "Add 5Gue specific telnet functions in libtelnetsrv_5Gue.so")
add_library(telnetsrv_5Gue MODULE telnetsrv_5Gue_measurements.c)
add_dependencies(telnetsrv telnetsrv_5Gue)
target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc asn1_lte_rrc)
# all libraries should be written to root build dir
set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../../..
)
set(TELNETROOT ${OPENAIR_DIR}/common/utils/telnetsrv )
set(TELNETSRV_SOURCE
${TELNETROOT}/telnetsrv.c
${TELNETROOT}/telnetsrv_proccmd.c
${TELNETROOT}/telnetsrv_loader.c
${TELNETROOT}/telnetsrv_measurements.c
)
add_library(telnetsrv MODULE ${TELNETSRV_SOURCE} )
target_link_libraries(telnetsrv PRIVATE history ncurses form )
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc asn1_lte_rrc)
foreach(TELNETLIB enb gnb 4Gue 5Gue)
set(TELNETLIB_SRCS "")
foreach(TELNETLIB_ASRC measurements phycmd)
set(TELNETLIB_SRC ${OPENAIR_DIR}/common/utils/telnetsrv/telnetsrv_${TELNETLIB}_${TELNETLIB_ASRC}.c)
if (EXISTS ${TELNETLIB_SRC})
set( TELNETLIB_SRCS "${TELNETLIB_SRC};${TELNETLIB_SRCS}")
endif()
endforeach()
if(NOT "${TELNETLIB_SRCS}" STREQUAL "")
message("Add ${TELNETLIB} specific telnet functions in libtelnetsrv_${TELNETLIB}.so")
add_library(telnetsrv_${TELNETLIB} MODULE ${TELNETLIB_SRCS} )
add_dependencies(telnetsrv telnetsrv_${TELNETLIB})
target_link_libraries(telnetsrv_${TELNETLIB} PRIVATE asn1_nr_rrc asn1_lte_rrc)
install(TARGETS telnetsrv_${TELNETLIB} DESTINATION bin)
else()
message("No specific telnet functions for ${TELNETLIB}")
endif()
endforeach()
install(TARGETS telnetsrv DESTINATION bin)
if (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
install(TARGETS telnetsrv DESTINATION ${OPENAIR_CMAKE}/ran_build/build)
endif (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
#/*
# * 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/utils/websrv/CMakelists.txt
#* \brief: build rules and checks for web server shared libraries
#* \author Francois TABURET
#* \date 2023
#* \version 1.0
#* \company NOKIA BellLabs France
#* \email: francois.taburet@nokia-bell-labs.com
#* \note
#* \warning
#*/
find_library(ULFIUS NAMES "libulfius.so" REQUIRED)
if (NOT ULFIUS)
message(FATAL_ERROR "ulfius library (https://github.com/babelouest/ulfius) not found, install libulfius-dev (ubuntu) if you need to build websrv back-end")
else()
message(STATUS "found libulfius for websrv")
endif()
find_library(JSON NAMES "libjansson.so" REQUIRED)
if (NOT JSON)
message(FATAL_ERROR "libjansson not found, install libjansson-dev for ubuntu, jansson-devel for fedora if you need to build websrv back-end")
else()
message(STATUS "found libjansson for websrv")
endif()
find_program(NPM NAMES npm REQUIRED)
if (NOT NPM)
message(FATAL_ERROR "npm is not installed, frontend can't be built. Possibly install npm, package is available for ubuntu and fedora")
else()
message(STATUS "found npm for websrv")
endif()
# build the backend ( the embedded web server)
message(STATUS "Configuring webserver backend")
add_library(websrv MODULE
websrv.c
websrv_websockets.c
websrv_scope.c
websrv_noforms.c
websrv_scope.c
websrv_utils.c
../../../openair1/PHY/TOOLS/nr_phy_scope.c
)
target_link_libraries(websrv PRIVATE asn1_lte_rrc asn1_nr_rrc)
target_link_libraries(websrv PRIVATE ulfius jansson)
target_compile_definitions(websrv PUBLIC WEBSRVSCOPE)
# put websrv into build root and not under build/common/utils/websrv/
set_target_properties(websrv PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../../..)
# build the frontend ( loaded from web server by browsers)
add_custom_target(
websrvfront_installjsdep
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/frontend
COMMAND npm install
DEPENDS frontend/package-lock.json
)
message(STATUS "Configuring webserver frontend")
add_custom_target(
websrvfront
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/frontend
COMMAND npm run build
#COMMAND npm run builddev
DEPENDS websrvfront_installjsdep
)
add_dependencies(websrv websrvfront)
# copy frontend files to a websrv subdirectory of where oai copy all built files
add_custom_command(TARGET websrvfront
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/frontend/dist/softmodem-ngx ${OPENAIR_BIN_DIR}/../websrv
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/helpfiles ${OPENAIR_BIN_DIR}/../websrv/helpfiles
COMMENT "Moving frontend files to:\n ${OPENAIR_BIN_DIR}/../websrv \n " )
This diff is collapsed.
......@@ -22,11 +22,14 @@
"@angular/platform-browser-dynamic": "^14.1.0",
"@angular/router": "^14.1.0",
"chart.js": "^3.8.2",
"loader-utils": "^3.2.1",
"moment": "^2.29.3",
"ng2-charts": "^4.0.0",
"rxjs": "^6.6.6",
"tslib": "^2.0.0",
"zone.js": "^0.11.4"
"zone.js": "^0.11.4",
"json5": "^2.2.2",
"tsconfig-paths": "^4.0.0"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1401.0",
......
/*
* 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/utils/websrv/frontend/src/app/api/commands.api.ts
* \brief: implementation of web interface frontend for oai
* \api's definitions for the commands module, which provides web interface to telnet server commands
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {environment} from "src/environments/environment";
export interface IInfo {
name: string;
value: string;
type: IArgType;
modifiable: boolean; // set command ?
}
import {route, IArgType, IInfo} from "src/commondefs";
export interface IModule {
name: string;
}
......@@ -28,17 +54,6 @@ export enum ILogOutput {
file = "/tmp/<component>.log",
}
export enum IArgType {
boolean = "boolean",
list = "list",
loglvl = "loglvl",
range = "range",
number = "number",
string = "string",
configfile = "configfile",
simuTypes = "simuTypes",
}
export enum ICommandOptions {
update = "update", // result can be updated, triggers update button on result page when set
help = "help" // help tooltip available on command buttons
......@@ -54,8 +69,8 @@ export interface IVariable {
export interface ICommand {
name: string;
confirm?: string;
question?: IQuestion;
param?: IVariable;
question?: IQuestion[];
param?: IVariable[];
options?: ICommandOptions[];
}
export interface ITable {
......@@ -86,7 +101,6 @@ export interface IRow {
param?: IVariable // to transmit the initial command parameter, ex: the channel model index when modify a channel model
}
export const route = "oaisoftmodem/";
@Injectable({
providedIn : "root",
......@@ -96,10 +110,6 @@ export class CommandsApi {
{
}
public readInfos$ = () => this.httpClient.get<IInfo[]>(environment.backend + route + "variables/");
public setInfo$ = (info: IInfo) => this.httpClient.post<IResp>(environment.backend + route + "variables/", info);
public readModules$ = () => this.httpClient.get<IModule[]>(environment.backend + route + "commands/");
public readVariables$ = (moduleName: string) => this.httpClient.get<IInfo[]>(environment.backend + route + moduleName + "/variables/");
......
/*
* 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/utils/websrv/frontend/src/app/api/help.api.ts
* \brief: implementation of web interface frontend for oai
* \api's definitions for the help module, which can be used to provides help text via tooltips
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {Observable} from "rxjs";
import {map} from "rxjs/operators";
import {environment} from "src/environments/environment";
import {route} from "src/commondefs";
export interface HelpRequest {
module: string;
......@@ -13,7 +46,7 @@ export interface HelpRequest {
export interface HelpResp {
text: string;
}
const hlproute = "oaisoftmodem/helpfiles/";
const hlproute = route + "/helpfiles/";
@Injectable({
providedIn : "root",
......@@ -28,9 +61,10 @@ export class HelpApi {
public getHelpText(module: string, command: string, object: string): Observable<string>
{
return this.getHelp$({module : module, command : command.replace(" ", "_"), object : object.replace(" ", "_")})
.pipe(map(
(response => { return (response.status == 201) ? response.body!.text : ""; }),
(response => { return (response.status == 201) ? response.body!.text.replace(/<!--(?:.|\n)*?-->/gm, '') : ""; }),
)); // pipe
}
}
/*
* 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/utils/websrv/frontend/src/app/api/info.api.ts
* \brief: implementation of web interface frontend for oai
* \api's definitions for the info module, which provides global info about the connected oai modem
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {environment} from "src/environments/environment";
import {route, IInfo} from "src/commondefs";
@Injectable({
providedIn : "root",
})
export class InfoApi {
constructor(private httpClient: HttpClient)
{
}
public readInfos$ = () => this.httpClient.get<IInfo[]>(environment.backend + route + "info/");
}
/*
* 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/utils/websrv/frontend/src/app/scope/scope.api.ts
* \brief: implementation of web interface frontend for oai
* \api's definitions for the scope module, which provides a web interface to the oai soft scope
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {environment} from "src/environments/environment";
import {route} from "src/commondefs";
export enum IScopeGraphType {
IQs = "IQs",
......@@ -33,7 +66,7 @@ export interface ISigDesc {
antenna_id: number;
}
const route = "oaisoftmodem/scopectrl/";
const scoperoute = route + "/scopectrl/";
@Injectable({
providedIn : "root",
......@@ -43,7 +76,7 @@ export class ScopeApi {
{
}
public getScopeInfos$ = () => this.httpClient.get<IScopeDesc>(environment.backend + route);
public getScopeInfos$ = () => this.httpClient.get<IScopeDesc>(environment.backend + scoperoute);
public setScopeParams$ = (cmd: IScopeCmd) => this.httpClient.post(environment.backend + route, cmd, {observe : "response"});
public setScopeParams$ = (cmd: IScopeCmd) => this.httpClient.post(environment.backend + scoperoute, cmd, {observe : "response"});
}
/*
* 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/utils/websrv/frontend/src/app/app-routing-module.ts
* \brief: implementation of web interface frontend for oai
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
......
<!--
/*
* 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/utils/websrv/frontend/src/app/app.component.html
* \brief: implementation of web interface frontend for oai
* \this is the frontend initial web page source code
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
-->
<mat-tab-group backgroundColor="primary" color="accent">
<mat-tab label="Info">
<app-info></app-info>
</mat-tab>
<mat-tab label="Commands">
<app-commands></app-commands>
</mat-tab>
<mat-tab label={{scopelabel}} disabled={{!isscopeavailable}}>
<app-scope (ScopeEnabled)="onScopeEnabled($event)"></app-scope>
</mat-tab>
</mat-tab-group>
\ No newline at end of file
</mat-tab-group>
/*
* 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/utils/websrv/frontend/src/app/app.module.ts
* \brief: implementation of web interface frontend for oai
* \all components, (externals or devlopped for oai) used by the application are imported from here
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {DragDropModule} from "@angular/cdk/drag-drop";
import {HttpClientModule} from "@angular/common/http";
import {NgModule} from "@angular/core";
......@@ -25,19 +57,20 @@ import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {NgChartsModule} from "ng2-charts";
import {CommandsApi} from "./api/commands.api";
import {ScopeApi} from "./api/scope.api";
import {InfoApi} from "./api/info.api";
import {AppRoutingModule} from "./app-routing.module";
import {AppComponent} from "./app.component";
import {InfoComponent} from "./components/info/info.component";
import {CommandsComponent} from "./components/commands/commands.component";
import {ConfirmDialogComponent} from "./components/confirm/confirm.component";
import {DialogComponent} from "./components/dialog/dialog.component";
import {QuestionDialogComponent} from "./components/question/question.component";
import {ScopeComponent} from "./components/scope/scope.component";
import {InterceptorProviders} from "./interceptors/interceptors";
import {LoadingService} from "./services/loading.service";
import {WebSocketService} from "./services/websocket.service";
@NgModule({
declarations : [ AppComponent, CommandsComponent, ConfirmDialogComponent, QuestionDialogComponent, DialogComponent, ScopeComponent ],
declarations : [ AppComponent, CommandsComponent, InfoComponent, ConfirmDialogComponent, QuestionDialogComponent, DialogComponent, ScopeComponent ],
imports : [
BrowserModule, AppRoutingModule, FormsModule, ReactiveFormsModule, BrowserAnimationsModule, HttpClientModule, MatButtonModule, FlexLayoutModule, MatDialogModule, DragDropModule,
MatSliderModule, MatFormFieldModule, MatInputModule, MatChipsModule, MatProgressSpinnerModule, MatToolbarModule, MatTableModule, MatListModule, MatSelectModule, MatSnackBarModule,
......@@ -45,10 +78,10 @@ import {WebSocketService} from "./services/websocket.service";
],
providers : [
// services
LoadingService,
WebSocketService,
// api
CommandsApi,
InfoApi,
ScopeApi,
// interceptors
InterceptorProviders,
......
<div class="grid-container" >
<mat-grid-list cols="2" rowHeight="15vh" >
<mat-grid-tile [colspan]="1" [rowspan]="2" >
<mat-card class="dashboard-card">
<mat-card-header >
<mat-card-title>Connection info</mat-card-title>
</mat-card-header>
<mat-card-content class="dashboard-card-content">
<div *ngIf="infos$ | async as infos">
<div class="spaceddiv" *ngFor="let info of infos">
<mat-form-field class="scrollablefield" >
<mat-label>{{ info.nameFC.value }}</mat-label>
<input matInput [formControl]="info.valueFC" [readonly]="!info.modifiableFC.value" />
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!info.modifiableFC.value"
(click)="onInfoSubmit(info)">
{{ info.btnTxtFC }}
</button>
</div>
</div>
</mat-card-content>
</mat-card>
</mat-grid-tile>
<!--
/*
* 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
*/
<mat-grid-tile [colspan]="1" [rowspan]="2">
/*! \file common/utils/websrv/frontend/src/app/components/commands/commands.component.html
* \brief: implementation of web interface frontend for oai
* \commands web interface implementation (works with commands.component.ts)
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
-->
<div class="grid-container" >
<mat-grid-list cols="2" rowHeight="12vh" >
<mat-grid-tile [colspan]="2" [rowspan]="2">
<mat-card class="dashboard-card">
<mat-card-header>
<mat-card-title>Softmodem commands</mat-card-title>
......@@ -49,7 +61,7 @@
</mat-card>
</mat-grid-tile>
<mat-grid-tile *ngIf="vars$ | async as vars" [colspan]="1" [rowspan]="4">
<mat-grid-tile *ngIf="vars$ | async as vars" [colspan]="1" [rowspan]="8">
<mat-card *ngIf="vars.length" class="dashboard-card">
<mat-card-header>
<mat-card-title>{{ selectedModule!.name }} variables</mat-card-title>
......@@ -69,10 +81,10 @@
</mat-card>
</mat-grid-tile>
<mat-grid-tile *ngIf="(rows$ | async)?.length" [colspan]="1" [rowspan]="4">
<mat-grid-tile *ngIf="(rows$ | async)?.length" [colspan]="1" [rowspan]="8">
<mat-card class="dashboard-card">
<mat-card-header>
<mat-card-title>{{ selectedModule!.name }} {{ selectedCmd!.name }} {{ selectedCmd!.param?.value}}</mat-card-title>
<mat-card-title>{{ selectedModule!.name }} {{ selectedCmd!.name }} {{ title_ptext }}</mat-card-title>
</mat-card-header>
<mat-card-content class="dashboard-card-content">
<div >
......
/*
* 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/utils/websrv/frontend/src/app/components/commands/commands.component.ts
* \brief: implementation of web interface frontend for oai
* \commands web interface implementation (works with commands.component.html)
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {Component} from "@angular/core";
import {route, IArgType, IInfo} from "src/commondefs";
import {ViewEncapsulation} from "@angular/core";
import {UntypedFormArray} from "@angular/forms";
import {BehaviorSubject, forkJoin, Observable, of, timer} from "rxjs";
import {filter, map, switchMap, tap} from "rxjs/operators";
import {CommandsApi, IArgType, IColumn, ICommand, ICommandOptions, IInfo, ILogLvl, IParam, IRow} from "src/app/api/commands.api";
import {CommandsApi, IColumn, ICommand, ICommandOptions, ILogLvl, IParam, IRow} from "src/app/api/commands.api";
import {HelpApi, HelpRequest, HelpResp} from "src/app/api/help.api";
import {CmdCtrl} from "src/app/controls/cmd.control";
import {InfoCtrl} from "src/app/controls/info.control";
import {ModuleCtrl} from "src/app/controls/module.control";
import {RowCtrl} from "src/app/controls/row.control";
import {VarCtrl} from "src/app/controls/var.control";
......@@ -29,7 +61,7 @@ const PREDEF_CMD = "show predef"
logLvlValues = Object.values(ILogLvl);
// softmodem
infos$: Observable<VarCtrl[]>;
modules$: Observable<ModuleCtrl[]>;
// module
......@@ -42,7 +74,8 @@ const PREDEF_CMD = "show predef"
displayedColumns: string[] = [];
rows$: BehaviorSubject<RowCtrl[]> = new BehaviorSubject<RowCtrl[]>([]);
columns: IColumn[] = [];
title_ptext: string =""; //used for possibly add a riminder of command parameters in the result page
constructor(
public commandsApi: CommandsApi,
public helpApi: HelpApi,
......@@ -52,8 +85,6 @@ const PREDEF_CMD = "show predef"
)
{
this.infos$ = this.commandsApi.readInfos$().pipe(map((infos) => infos.map(info => new InfoCtrl(info))));
this.modules$ = this.commandsApi.readModules$().pipe(
map(imodules => imodules.map(imodule => new ModuleCtrl(imodule))), filter(controls => controls.length > 0), tap(controls => this.onModuleSelect(controls[0])));
}
......@@ -71,22 +102,13 @@ const PREDEF_CMD = "show predef"
// );
// }
onInfoSubmit(control: InfoCtrl)
{
let info: IInfo = control.api();
if (info.type === IArgType.configfile) {
this.downloadService.getFile(info.value)
} else {
this.commandsApi.setInfo$(info).subscribe();
}
}
onModuleSelect(module: ModuleCtrl)
{
this.selectedModule = module
this.selectedCmd = undefined
this.title_ptext="";
this.cmds$ = this.commandsApi.readCommands$(module.name).pipe(
map(icmds => icmds.map(icmd => new CmdCtrl(icmd))),
map(cmds => {
......@@ -134,8 +156,14 @@ const PREDEF_CMD = "show predef"
private execCmd$(control: CmdCtrl)
{
let cmd = control!.api();
if (this.selectedCmd!.param)
this.selectedCmd!.param!.value = cmd.param!.value;
if (this.selectedCmd!.param) {
this.selectedCmd!.param![0].value = cmd.param![0].value;
this.title_ptext = cmd.param![0].value;
if( this.selectedCmd!.param!.length > 1) {
this.selectedCmd!.param![1].value = cmd.param![1].value;
this.title_ptext = this.title_ptext + " " + cmd.param![1].value;
}
}
this.commandsApi.runCommand$(cmd, this.selectedModule!.name)
.subscribe(
resp => {
......@@ -153,14 +181,7 @@ const PREDEF_CMD = "show predef"
// possibly load help..
for (let i = 0; i < this.columns.length; i = i + 1) {
if (this.columns[i].help) {
this.helpApi.getHelp$({module : this.selectedModule!.name, command : control!.api().name.replace(" ", "_"), object : this.columns[i].name.replace(" ", "_")})
.subscribe(
response => {
if (response.status == 201)
this.hlp_cc[i] = response.body!.text;
},
err => { this.hlp_cc[i] = ""; },
);
this.helpApi.getHelpText(this.selectedModule!.name,control!.api().name,this.columns[i].name).subscribe(resp => { this.hlp_cc[i] = resp; }, err => { this.hlp_cc[i] = ""; });
} else {
this.hlp_cc[i] = "";
}
......@@ -201,7 +222,7 @@ const PREDEF_CMD = "show predef"
onParamSubmit(control: RowCtrl)
{
if (this.selectedCmd!.param)
control.set_cmdparam(this.selectedCmd!.param);
control.set_cmdparam(this.selectedCmd!.param[0]);
this.commandsApi.setCmdParams$(control.api(), this.selectedModule!.name).subscribe(() => this.execCmd$(new CmdCtrl(this.selectedCmd!)));
}
}
<!--
/*
* 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/utils/websrv/frontend/src/app/components/info/info.component.html
* \brief: implementation of web interface frontend for oai
* \info component web interface implementation (works with info.component.ts)
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
-->
<div class="grid-container" >
<mat-grid-list cols="1" rowHeight="15vh" >
<mat-grid-tile [colspan]="1" [rowspan]="6" >
<mat-card class="dashboard-card">
<mat-card-header >
<mat-card-title>Connection info</mat-card-title>
</mat-card-header>
<mat-card-content class="dashboard-card-content">
<div *ngIf="infos$ | async as infos">
<div class="infodiv" *ngFor="let info of infos">
<mat-form-field class="scrollablefield" >
<mat-label>{{ info.nameFC.value }}</mat-label>
<input matInput [formControl]="info.valueFC" [readonly]="!info.modifiableFC.value" />
</mat-form-field>
<button mat-raised-button color="primary" (click)="onInfoSubmit(info)" *ngIf="info.modifiableFC.value" >
{{ info.btnTxtFC }}
</button>
</div>
</div>
</mat-card-content>
</mat-card>
</mat-grid-tile>
</mat-grid-list>
</div>
.infodiv {
height: 45px;
width: 80vw;
display: flex;
justify-content: space-between;
margin: 0 auto;
padding: 10px 0;
}
.mat-card {
height: 95%;
overflow-y: auto;
overflow-x: scroll;
}
/*
* 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/utils/websrv/frontend/src/app/components/info/info.component.ts
* \brief: implementation of web interface frontend for oai
* \info component web interface implementation (works with info.component.html)
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {Component} from "@angular/core";
import {IArgType, IInfo} from "src/commondefs";
import {ViewEncapsulation} from "@angular/core";
import {UntypedFormArray} from "@angular/forms";
import {Observable} from "rxjs";
import {filter, map, switchMap, tap} from "rxjs/operators";
import {InfoApi} from "src/app/api/info.api";
import {InfoCtrl} from "src/app/controls/info.control";
import {ModuleCtrl} from "src/app/controls/module.control";
import {VarCtrl} from "src/app/controls/var.control";
import {DialogService} from "src/app/services/dialog.service";
import {DownloadService} from "src/app/services/download.service";
@Component({
selector : "app-info",
templateUrl : "./info.component.html",
styleUrls : [ "./info.component.scss" ],
encapsulation : ViewEncapsulation.None,
}) export class InfoComponent {
infos$: Observable<VarCtrl[]>;
constructor(
public infoApi: InfoApi,
public downloadService: DownloadService,
)
{
this.infos$ = this.infoApi.readInfos$().pipe(map((infos) => infos.map(info => new InfoCtrl(info))));
}
onInfoSubmit(control: InfoCtrl)
{
let info: IInfo = control.api();
if (info.type === IArgType.configfile) {
this.downloadService.getFile(info.value)
}
}
}
<h3>{{ data.title }}</h3>
<!--
/*
* 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/utils/websrv/frontend/src/app/components/question/question.component.html
* \brief: implementation of web interface frontend for oai
* \utility component used to allow entering parameters before sending a request to the backend
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
-->
<h3>{{ data.control.cmdname }} command parameters</h3>
<div mat-dialog-content >
<mat-form-field appearance="fill">
<label for="answer">{{data.control.question?.display}}</label>
<div>
<mat-form-field>
<label for="answer">{{data.control.question![0].display}}</label>
<input id="answer" type="text" style="width:10vw" [formControl]="data.control.answerFC">
</mat-form-field>
</div>
<div *ngIf="data.control.question!.length > 1" >
<mat-form-field>
<label for="answerb">{{data.control.question![1].display}}</label>
<input id="answerb" type="text" style="width:10vw" [formControl]="data.control.answerbFC">
</mat-form-field>
</div>
</div>
<div fxLayoutGap=" 10px" mat-dialog-actions fxLayout="row" fxLayoutAlign="center start">
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Ok</button>
<font size="-1" color="#888888"><div [innerHTML]="hlp_question"></div></font>
</div>
<div fxLayoutGap=" 20px" mat-dialog-actions fxLayout="row" fxLayoutAlign="center start">
<button mat-button [mat-dialog-close]="true" cdkFocusInitial >Ok</button>
<button mat-button [mat-dialog-close]="false">Cancel</button>
</div>
/* eslint-disable @typescript-eslint/naming-convention */
/*
* 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/utils/websrv/frontend/src/app/components/question/question.component.ts
* \brief: implementation of web interface frontend for oai
* \utility component used to allow entering parameters before sending a request to the backend
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {Component, Inject} from "@angular/core";
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {CmdCtrl} from "src/app/controls/cmd.control";
import {HelpApi, HelpRequest, HelpResp} from "src/app/api/help.api";
export interface QuestionDialogData {
title: string;
control: CmdCtrl;
}
@Component({selector : "app-question", templateUrl : "./question.component.html", styleUrls : [ "./question.component.css" ]})
export class QuestionDialogComponent {
hlp_question: string = "";
constructor(
public dialogRef: MatDialogRef<QuestionDialogComponent>,
public helpApi: HelpApi,
@Inject(MAT_DIALOG_DATA) public data: QuestionDialogData,
)
{
this.helpApi.getHelpText("question", data.control.cmdname, "input").subscribe( response => { this.hlp_question = response;})
}
onNoClick()
{
this.dialogRef.close();
......
<!--
/*
* 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/utils/websrv/frontend/src/app/components/scope/scope.component.html
* \brief: implementation of web interface frontend for oai
* \scope component web interface implementation (works with scope.component.ts)
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
-->
<div class="grid-container">
<mat-grid-list cols="11" rowHeight="100px">
......
/*
* 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/utils/websrv/frontend/src/app/components/scope/scope.component.ts
* \brief: implementation of web interface frontend for oai
* \scope component web interface implementation (works with scope.component.html)
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {Component, EventEmitter, OnDestroy, OnInit, Output, QueryList, ViewChildren} from "@angular/core";
import {Chart, ChartConfiguration} from "chart.js";
import {BaseChartDirective} from "ng2-charts";
......
/*
* 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/utils/websrv/frontend/src/app/controls/cmd.control.ts
* \brief: implementation of web interface frontend for oai
* \implement a command for commands component
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {UntypedFormArray, UntypedFormControl, UntypedFormGroup} from "@angular/forms";
import {Subscription} from "rxjs";
import {Observable} from "rxjs/internal/Observable";
import {ICommand, ICommandOptions, IQuestion} from "src/app/api/commands.api";
import {ICommand, ICommandOptions, IQuestion, IVariable} from "src/app/api/commands.api";
import {HelpApi, HelpRequest, HelpResp} from "src/app/api/help.api";
const enum CmdFCN {
name = "name",
vars = "variables",
confirm = "confirm",
answer = "answer"
answer = "answer",
answerb = "answerb"
}
export class CmdCtrl extends UntypedFormGroup {
confirm?: string;
question?: IQuestion;
question?: IQuestion[];
cmdname: string;
options?: ICommandOptions[];
public ResUpdTimer?: Observable<number>;
......@@ -27,26 +61,40 @@ export class CmdCtrl extends UntypedFormGroup {
this.addControl(CmdFCN.name, new UntypedFormControl(cmd.name));
this.addControl(CmdFCN.answer, new UntypedFormControl(""));
this.addControl(CmdFCN.answerb, new UntypedFormControl(""));
this.addControl(CmdFCN.vars, new UntypedFormArray([]));
this.confirm = cmd.confirm;
this.question = cmd.question;
this.cmdname = cmd.name;
this.options = cmd.options;
this.updbtnname = "Start update"
this.updbtnname = "Start update";
}
api()
{
const doc: ICommand = {
name : this.nameFC.value,
param : this.question ? {name : this.question!.pname, value : this.answerFC.value, type : this.question!.type, modifiable : false} : undefined,
param : this.question ? this.setParams() : undefined,
// param : this.question ? {name : this.question!.pname, value : this.answerFC.value, type : this.question!.type, modifiable : false} : undefined,
options : this.options
};
return doc;
}
setParams ()
{
var vars : IVariable[]=new Array();
for (let i = 0; i < this.question!.length; i++) {
vars.push({name:this.question![i].pname,
value:(i==0)?this.answerFC.value:this.answerbFC.value,
type:this.question![i].type,
modifiable:false })
}
return vars;
}
isResUpdatable(): boolean
{
if (this.options) {
......@@ -88,6 +136,11 @@ export class CmdCtrl extends UntypedFormGroup {
{
return this.get(CmdFCN.answer) as UntypedFormControl;
}
get answerbFC()
{
return this.get(CmdFCN.answerb) as UntypedFormControl;
}
get varsFA()
{
......
/*
* 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/utils/websrv/frontend/src/app/controls/info.control.ts
* \brief: implementation of web interface frontend for oai
* \implement one info item for info component
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {UntypedFormControl, UntypedFormGroup} from "@angular/forms";
import {IInfo} from "../api/commands.api";
import {IArgType} from "../api/commands.api";
import {IArgType, IInfo} from "src/commondefs";
const enum InfosFCN {
name = "name",
......
/*
* 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/utils/websrv/frontend/src/app/controls/module.control.ts
* \brief: implementation of web interface frontend for oai
* \implement one module item for commands component
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {UntypedFormArray, UntypedFormGroup} from "@angular/forms";
import {IModule} from "../api/commands.api";
......
/*
* 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/utils/websrv/frontend/src/app/controls/param.control.ts
* \brief: implementation of web interface frontend for oai
* \implement one parameter in a result row for commands component
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {UntypedFormControl, UntypedFormGroup} from "@angular/forms";
import {IArgType, IColumn, IParam} from "../api/commands.api";
import {IArgType, IInfo} from "src/commondefs";
import { IParam, IColumn,} from "../api/commands.api";
enum ParamFCN {
value = "value",
......
/*
* 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/utils/websrv/frontend/src/app/controls/row.control.ts
* \brief: implementation of web interface frontend for oai
* \implement one row results for commands component
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {FormControl, UntypedFormArray, UntypedFormGroup} from "@angular/forms";
import {IArgType, IParam, IRow, IVariable} from "../api/commands.api";
import {IArgType} from "src/commondefs";
import {IParam, IRow, IVariable} from "../api/commands.api";
import {ParamCtrl} from "./param.control";
......
/*
* 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/utils/websrv/frontend/src/app/controls/var.control.ts
* \brief: implementation of web interface frontend for oai
* \implement one variable item for commands componen
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {UntypedFormControl, UntypedFormGroup} from "@angular/forms";
import {IInfo} from "../api/commands.api";
import {IArgType} from "../api/commands.api";
import {IArgType, IInfo} from "src/commondefs";
const enum VariablesFCN {
name = "name",
......
/*
* 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/utils/websrv/frontend/src/app/interceptors/error.interceptor.ts
* \brief: implementation of web interface frontend for oai
* \utility to intercept error response from backend and possibly dispay an error to user
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {Observable, throwError} from "rxjs";
......@@ -52,7 +84,7 @@ export class ErrorInterceptor implements HttpInterceptor {
// The response body may contain clues as to what went wrong
message = JSON.stringify(error.error);
}
this.dialogService.openErrorDialog(prefix + " " + error.status, message);
this.dialogService.openErrorDialog(prefix + " " + request.url, "http status: " + error.status + " " + message);
return throwError(error);
}),
);
......
/*
* 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/utils/websrv/frontend/src/app/services/download.service.ts
* \brief: implementation of web interface frontend for oai
* \utility to download a file from backend
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {HttpClient} from "@angular/common/http";
import {HttpHeaders} from "@angular/common/http";
import {HttpParams} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {route} from "src/app/api/commands.api";
import {route} from "src/commondefs";
import {environment} from "src/environments/environment";
@Injectable({
......
/*
* 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/utils/websrv/frontend/src/app/services/websocket.service.ts
* \brief: implementation of web interface frontend for oai
* \utility implementing a web interface with the backend
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {Injectable} from "@angular/core";
import {webSocket, WebSocketSubject} from "rxjs/webSocket";
import {environment} from "src/environments/environment";
......
......@@ -19,37 +19,33 @@
* contact@openairinterface.org
*/
#include "COMMON/platform_types.h"
#include "common/ran_context.h"
#include "common/utils/LOG/log.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_MIB.h"
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const ue_id_t ue_id,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi,
const int pdusession_id) {
abort();
/*! \file common/utils/websrv/frontend/src/commondefs.ts
* \brief: implementation of web interface frontend for oai
* \definitions of constants, enums and interfaces common to the whole frontend
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
export enum IArgType {
boolean = "boolean",
list = "list",
loglvl = "loglvl",
range = "range",
number = "number",
string = "string",
configfile = "configfile",
simuTypes = "simuTypes",
}
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) {
abort();
export interface IInfo {
name: string;
value: string;
type: IArgType;
modifiable: boolean; // set command ?
}
int rrc_gNB_generate_pcch_msg(uint32_t tmsi,
uint8_t paging_drx,
instance_t instance,
uint8_t CC_id) {
abort();
}
export const route = "oaisoftmodem/";
/*
* 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/utils/websrv/frontend/src/main.ts
* \brief: implementation of web interface frontend for oai
* \this is the frontend application main source but interesting things atarts in the app.module import
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
import {enableProdMode} from "@angular/core";
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic";
......
<!--
/*
* 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/utils/websrv/helpfiles/cmd_channelmod_show_channelid.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
This option asks for a model id and lists the parameters of this model. Some parameters can be then modified
<!--
/*
* 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/utils/websrv/helpfiles/cmd_channelmod_show_current.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
When a oai component, as the rf simulator, instanciates a channel model, the instanciation is added in the list of current models. The id of the instanciation is used when using the "show channelid" option.
<!--
/*
* 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/utils/websrv/helpfiles/cmd_channelmod_show_predef.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
Predefined channel model are a set of modelisation algorithm's, identified by a name, available in oai code.
<!--
/*
* 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/utils/websrv/helpfiles/question_setdistance_input.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags can be used in this help files as it is rendered in a div (tooltips don't work well in dialogs)
* \warning
*/
-->
<ol>
<li><bold>model name:</bold> rfsimu_channel_&lt;enB|ue&gt;_&lt;connection id&gt;. For example model applied to the first UE connected to a gNB is "rfsimu_channel_ue0"</li>
<li><bold>distance:</bold> expressed in meters</li>
</ol>
<!--
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
......@@ -18,18 +19,16 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file phy_procedures_lte_eNB.c
* \brief Implementation of common utilities for eNB/UE procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
#include "sched_nr.h"
#include "PHY/INIT/phy_init.h"
/*! \file common/utils/websrv/helpfiles/question_show_channelid_input.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags can be used in this help files as it is rendered in a div (tooltips don't work well in dialogs)
* \warning
*/
-->
channel index: channel model index in the channel modelisation module, it is printed when listing all defined models using the "show current" button.
<!--
/*
* 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/utils/websrv/helpfiles/rfsimu_show_models_algorithm.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
Available channel modelisation algorithm's can be listed using the "channelmod"/"show predef" command. A more convenient mechanism to select this will be implemented in a next version.
<!--
/*
* 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/utils/websrv/helpfiles/rfsimu_show_models_model_index.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
The model index can be used to modify a model parameter, using the "channelmod"/"show channelid" commands
<!--
/*
* 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/utils/websrv/helpfiles/rfsimu_show_models_model_name.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
Models parameters are defined in the oai configuration file under the section "channelmod.<channel list>". <channel list> describes the parameters for each <model name>. Several <channel list> can be defined, the loaded list is defined by the "channelmod.modellist" parameter. Model names are defined by the channel modelisation "user": for example the model "rfsmu_channel_ue0" is applied by the gNB rfsimulator on the signal received from ue0, the first connecet UE.
<!--
/*
* 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/utils/websrv/helpfiles/rfsimu_show_models_module_owner.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
When the rfsimulator is effectively using a channel model to modify a received signal he becomes the owner of that model.
<!--
/*
* 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/utils/websrv/helpfiles/scope_control_dataack.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
when enabled, back-end will stop sending data when too much data have not been acknowledge by the frontend. Currently the back-end limits to 200 the number of data messages waitting for ack.
<!--
/*
* 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/utils/websrv/helpfiles/softmodem_show_threadsched_nice.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
Nice value, relevant for other and batch scheduling can be changed via the "oai priority" field
<!--
/*
* 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/utils/websrv/helpfiles/softmodem_show_threadsched_sched_oai_priority.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
the oai priority field is used to provide the linux scheduling mode, priority and nice value in a single field.
Priority value is mapped to linux scheduling mode, priority and nice as listed below:
-101 to -199: real time, Round-Robin 1 to 99
......
<!--
/*
* 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/utils/websrv/helpfiles/softmodem_show_threadsched_priority.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
Linux priority field, relevant for real-time scheduling mode (Round-Robin or fifo) can be modified using the "oai priority" field
<!--
/*
* 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/utils/websrv/helpfiles/softmodem_show_threadsched_sched_policy.html
* \brief: implementation of web interface frontend for oai
* \help file loaded at run time using the help api's
* \author: Yacine El Mghazli, Francois TABURET
* \date 2022
* \version 0.1
* \company NOKIA BellLabs France
* \email: yacine.el_mghazli@nokia-bell-labs.com francois.taburet@nokia-bell-labs.com
* \note: html tags cannot be used in this help files as it is rendered in a tooltips
* \warning
*/
-->
scheduling policy can be modified using the "oai priority" field.
......@@ -253,7 +253,7 @@ int websrv_callback_set_moduleparams(const struct _u_request *request, struct _u
} // for *cmd
} // json_unpack_ex(jsbody OK
} // user_data
} // sbody
} // jsbody not null
websrv_printf_end(httpstatus, websrvparams.dbglvl);
return U_CALLBACK_COMPLETE;
}
......@@ -432,40 +432,62 @@ int websrv_callback_set_softmodemvar(const struct _u_request *request, struct _u
int websrv_processwebfunc(struct _u_response *response, cmdparser_t *modulestruct, telnetshell_cmddef_t *cmd, json_t *jparams)
{
LOG_I(UTIL, "[websrv] : executing command %s %s\n", modulestruct->module, cmd->cmdname);
if ((cmd->cmdflags & TELNETSRV_CMDFLAG_NEEDPARAM) && jparams == NULL) {
LOG_W(UTIL, "No parameters sent by frontend for %s %s\n", modulestruct->module, cmd->cmdname);
return 500;
}
int http_status = 200;
char *pname[2], *pvalue[2];
size_t np =0;
if (jparams != NULL) {
int b[2];
char *ptype[2];
json_error_t jerror;
np = json_array_size(jparams);
int jrt;
switch(np) {
case 1:
jrt=json_unpack_ex(jparams, &jerror, 0, "[{s:s,s:s,s:s,s,b}]", "name", &pname[0], "value", &pvalue[0], "type", &ptype[0], "modifiable", &b);
break;
case 2:
jrt=json_unpack_ex(jparams, &jerror, 0, "[{s:s,s:s,s:s,s,b},{s:s,s:s,s:s,s,b}]",
"name", &pname[0], "value", &pvalue[0], "type", &ptype[0], "modifiable", &b[0],
"name", &pname[1], "value", &pvalue[1], "type", &ptype[1], "modifiable", &b[1]);
break;
default:
http_status=500;
break;
// json_unpack_ex(jparams, &jerror, 0, "[{s:s,s:s,s:s,s,b}]", "name", &pname, "value", &pvalue, "type", &ptype, "modifiable", &b);
}
if (jrt <0 || http_status != 200) {
LOG_I(UTIL, "[websrv], couldn't unpack jparams, module %s, command %s: %s\n", modulestruct->module, cmd->cmdname, jerror.text);
websrv_printjson((char *)__FUNCTION__, jparams, websrvparams.dbglvl);
return 500;
}
}
if (cmd->cmdflags & TELNETSRV_CMDFLAG_GETWEBTBLDATA) {
webdatadef_t wdata;
memset(&wdata, 0, sizeof(wdata));
if (cmd->cmdflags & TELNETSRV_CMDFLAG_NEEDPARAM) {
if (jparams == NULL) {
LOG_W(UTIL, "No parameters sent by frontend for %s %s\n", modulestruct->module, cmd->cmdname);
} else {
int b;
char *pname, *pvalue, *ptype;
json_error_t jerror;
json_unpack_ex(jparams, &jerror, 0, "{s:s,s:s,s:s,s,b}", "name", &pname, "value", &pvalue, "type", &ptype, "modifiable", &b);
if (pvalue == NULL || pname == NULL || ptype == NULL) {
LOG_I(UTIL, "[websrv], couldn't unpack jparams, module %s, command %s: %s\n", modulestruct->module, cmd->cmdname, jerror.text);
websrv_printjson((char *)__FUNCTION__, jparams, websrvparams.dbglvl);
http_status = 500;
} else {
snprintf(wdata.columns[0].coltitle, sizeof(wdata.columns[0].coltitle) - 1, "%s", pname);
wdata.numcols = 1;
wdata.lines[0].val[0] = pvalue;
wdata.numlines = 1;
}
}
wdata.numlines = 1;
for (int i=0; i<np; i++) {
snprintf(wdata.columns[i].coltitle, sizeof(wdata.columns[i].coltitle) - 1, "%s", pname[i]);
wdata.numcols = np;
wdata.lines[0].val[i] = pvalue[i];
}
cmd->webfunc_getdata(cmd->cmdname, websrvparams.dbglvl, (webdatadef_t *)&wdata, NULL);
websrv_gettbldata_response(response, &wdata, modulestruct->module, cmd->cmdname);
} else {
char *sptr = index(cmd->cmdname, ' ');
char cmdbuff[TELNET_CMD_MAXSIZE*3]; //cmd + 2 parameters
snprintf(cmdbuff,sizeof(cmdbuff)-1, "%s%s%s %s",(sptr == NULL) ? "" : sptr,(sptr == NULL) ? "" : " ",(np>0) ? pvalue[0] : "",(np>1) ? pvalue[1] : "");
if (cmd->qptr != NULL) {
websrv_printf_start(response, 16384, true);
telnet_pushcmd(cmd, (sptr == NULL) ? cmd->cmdname : sptr, websrv_async_printf);
telnet_pushcmd(cmd, cmdbuff, websrv_async_printf);
} else {
websrv_printf_start(response, 16384, false);
cmd->cmdfunc((sptr == NULL) ? cmd->cmdname : sptr, websrvparams.dbglvl, websrv_printf);
cmd->cmdfunc(cmdbuff, websrvparams.dbglvl, websrv_printf);
}
websrv_printf_end(http_status, websrvparams.dbglvl);
}
......@@ -598,21 +620,35 @@ int websrv_callback_get_softmodemcmd(const struct _u_request *request, struct _u
snprintf(confstr, sizeof(confstr), "Confirm %s ?", modulestruct->cmd[j].cmdname);
acmd = json_pack("{s:s,s:s}", "name", modulestruct->cmd[j].cmdname, "confirm", confstr);
} else if (modulestruct->cmd[j].cmdflags & TELNETSRV_CMDFLAG_NEEDPARAM) {
char *pname = NULL;
char *question = NULL;
char *question[] = {NULL,NULL};
char *helpcp = NULL;
json_t *jQ1=NULL, *jQ2=NULL;
json_t *jQs = json_array();
if (modulestruct->cmd[j].helpstr != NULL) {
char *tokptr;
helpcp = strdup(modulestruct->cmd[j].helpstr);
question = strtok_r(helpcp, "<[", &tokptr);
pname = (question != NULL) ? strtok_r(helpcp, ">]", &tokptr) : NULL;
int ns=sscanf(helpcp,"<%m[^<>]> <%m[^<>]>",&question[0],&question[1]);
if (ns == 0) {
LOG_W(UTIL, "[websrv] Cannot find parameters for command %s %s\n", modulestruct->module, modulestruct->cmd[j].cmdname);
continue;
}
jQ1=json_pack("{s:s,s:s,s:s}", "display",question[0], "pname", "P0", "type", "string");
json_array_append_new(jQs, jQ1);
if (ns >1) {
jQ2=json_pack("{s:s,s:s,s:s}","display", (question[1] == NULL) ? "" : question[1], "pname", "P1" , "type", "string");
json_array_append_new(jQs, jQ2);
}
}
acmd = json_pack(
"{s:s,s:{s:s,s:s,s:s}}", "name", modulestruct->cmd[j].cmdname, "question", "display", (question == NULL) ? "" : question, "pname", (pname == NULL) ? "Px" : pname, "type", "string");
acmd = json_pack("{s:s,s:o}", "name", modulestruct->cmd[j].cmdname, "question", jQs);
free(helpcp);
free(question[0]);
free(question[1]);
} else {
acmd = json_pack("{s:s}", "name", modulestruct->cmd[j].cmdname);
}
if ( acmd == NULL) {
LOG_W(UTIL, "[websrv] interface for command %s %s cannot be built\n", modulestruct->module, modulestruct->cmd[j].cmdname);
continue;
}
json_t *jopts = json_array();
if (modulestruct->cmd[j].cmdflags & TELNETSRV_CMDFLAG_AUTOUPDATE) {
json_array_append_new(jopts, json_string("update"));
......@@ -806,7 +842,6 @@ void *websrv_autoinit()
websrvparams.instance.max_post_body_size = 1024;
// 1: build the first page, when receiving the "oaisoftmodem" url
// ulfius_add_endpoint_by_val(&(websrvparams.instance), "GET", "oaisoftmodem", "variables", 0, &websrv_callback_get_softmodemstatus, NULL);
ulfius_add_endpoint_by_val(&(websrvparams.instance), "GET", "oaisoftmodem", "commands", 1, &websrv_callback_get_softmodemmodules, NULL);
// 2 default_endpoint declaration, it tries to open the file with the url name as specified in the request.It looks for the file
......@@ -817,7 +852,7 @@ void *websrv_autoinit()
websrv_callback_get_softmodemstatus, websrv_callback_okset_softmodem_cmdvar, websrv_callback_set_softmodemvar};
char *http_methods[3] = {"GET", "OPTIONS", "POST"};
websrv_add_endpoint(http_methods, 3, "oaisoftmodem", "variables", callback_functions_var, NULL);
websrv_add_endpoint(http_methods, 3, "oaisoftmodem", "info", callback_functions_var, NULL);
for (int i = 0; telnetparams->CmdParsers[i].cmd != NULL; i++) {
register_module_endpoints(&(telnetparams->CmdParsers[i]));
......
if ( "${OPENAIR_CMAKE}" STREQUAL "")
message( FATAL_ERROR "oai Environment variables not set")
endif ( "${OPENAIR_CMAKE}" STREQUAL "")
set(WEBSRVROOT ${OPENAIR_DIR}/common/utils/websrv )
set (WBACK TRUE)
set (WFRONT TRUE)
# websrv dependencies
unset(ULFIUS)
unset(ULFIUS CACHE)
find_library(ULFIUS NAMES "libulfius.so" NO_CACHE)
if ("${ULFIUS}" STREQUAL "ULFIUS-NOTFOUND")
message( WARNING "ulfius library (https://github.com/babelouest/ulfius) not found, install libulfius-dev (ubuntu) if you need to build websrv back-end")
set (WBACK FALSE)
endif("${ULFIUS}" STREQUAL "ULFIUS-NOTFOUND")
unset(JSON)
unset(JSON CACHE)
find_library(JSON NAMES "libjansson.so" NO_CACHE )
if ("${JSON}" STREQUAL "ULFIUS-NOTFOUND")
message( WARNING "libjansson not found, install libjansson-dev for ubuntu, jansson-devel for fedora if you need to build websrv back-end")
set (WBACK FALSE)
endif("${JSON}" STREQUAL "ULFIUS-NOTFOUND")
unset(NPM)
unset(NPM CACHE)
find_program(NPM NAMES npm NO_CACHE)
if ("${NPM}" STREQUAL "ULFIUS-NOTFOUND")
message( WARNING " npm is not installed, frontend won't be built. Possibly install npm, package is available for ubuntu and fedora")
endif("${NPM}" STREQUAL "ULFIUS-NOTFOUND")
if ( ${WBACK} )
message (STATUS "websrv backend can be built")
else ( ${WBACK} )
message (STATUS "websrv backend build skipped, dependencies not found")
endif ( ${WBACK} )
if ( ${WFRONT} )
message (STATUS "websrv frontend can be built")
else( ${WFRONT} )
message (STATUS "websrv frontend build skipped, dependencies not found")
endif ( ${WFRONT} )
# build the backend ( the embedded web server)
set(WEBSRV_SOURCE
${WEBSRVROOT}/websrv.c ${WEBSRVROOT}/websrv_websockets.c
${WEBSRVROOT}/websrv_scope.c ${WEBSRVROOT}/websrv_noforms.c
${WEBSRVROOT}/websrv_scope.c ${WEBSRVROOT}/websrv_utils.c
${OPENAIR_DIR}/openair1/PHY/TOOLS/nr_phy_scope.c
)
add_library(websrv MODULE ${WEBSRV_SOURCE} )
target_link_libraries(websrv PRIVATE ulfius jansson)
target_compile_definitions(websrv PUBLIC WEBSRVSCOPE)
# build the frontend ( loaded from web server by browsers)
add_custom_target (
websrvfront_installjsdep
WORKING_DIRECTORY ${WEBSRVROOT}/frontend
COMMAND npm install
DEPENDS ${WEBSRVROOT}/frontend/package-lock.json
)
add_custom_target (
websrvfront
WORKING_DIRECTORY ${WEBSRVROOT}/frontend
COMMAND npm run build
#COMMAND npm run builddev
DEPENDS websrvfront_installjsdep
)
#install built files, required at exec time
if ( ${WBACK} )
install(TARGETS websrv DESTINATION bin)
endif ( ${WBACK} )
if ( ${WFRONT} )
if (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
add_custom_command(TARGET websrvfront
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBSRVROOT}/frontend/dist/softmodem-ngx ${OPENAIR_CMAKE}/ran_build/build/websrv
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBSRVROOT}/frontend/dist/softmodem-ngx ${OPENAIR_TARGETS}/bin/websrv
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBSRVROOT}/helpfiles ${OPENAIR_CMAKE}/ran_build/build/websrv/helpfiles
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBSRVROOT}/helpfiles ${OPENAIR_TARGETS}/bin/websrv/helpfiles
COMMENT "Moving frontend files to:\n ${OPENAIR_CMAKE}/ran_build/build/websrv\n ${OPENAIR_TARGETS}/bin/websrv" )
endif (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
endif ( ${WFRONT} )
......@@ -1609,7 +1609,7 @@ __attribute__((unused)) static int fl_vmode;
#define fl_get_form_vclass(a) fl_vmode
#define fl_get_gc() fl_state[fl_vmode].gc[0]
__attribute__((unused)) static FL_State fl_state[];
//__attribute__((unused)) static FL_State fl_state[];
__attribute__((unused)) static char *fl_ul_magic_char;
......
add_boolean_option(GENERATE_DOXYGEN False "Generate source code doc using doxygen")
add_boolean_option(GENERATE_DOXYGEN False "Generate source code doc using doxygen" OFF)
if(GENERATE_DOXYGEN)
find_package(Doxygen REQUIRED)
......
......@@ -1003,7 +1003,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_task.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_interface_management.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_ue_context_management.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/dummy_enb.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_rrc_message_transfer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_warning_message_transmission.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_task.h \
......@@ -2097,7 +2096,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h \
@CMAKE_CURRENT_SOURCE_DIR@/../nfapi/open-nFAPI/sim_common/inc/vendor_ext.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/nr_prach_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_procedures_nr_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_procedures_nr_gNB.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/fapi_nr_l1.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/nr_ru_procedures.c \
......
......@@ -30,7 +30,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base
ARG NEEDED_GIT_PROXY
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=3.15.0.0
ENV UHD_VERSION=4.4.0.0
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
......
......@@ -21,17 +21,17 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
# Valid for Ubuntu 20.04
#
#---------------------------------------------------------------------
FROM ubuntu:bionic AS ran-base
FROM ubuntu:focal AS ran-base
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=3.15.0.0
ENV UHD_VERSION=4.4.0.0
#install developers pkg/repo
RUN apt-get update && \
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
# Valid for RHEL8
#
#---------------------------------------------------------------------
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
# Valid for Ubuntu 20.04
#
#---------------------------------------------------------------------
......
......@@ -95,7 +95,7 @@ COPY --from=enb-base \
# Now we are copying from builder-image the UHD files.
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=enb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/local/share/uhd/rfnoc
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
# Valid for Ubuntu 20.04
#
#---------------------------------------------------------------------
......@@ -33,7 +33,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM ubuntu:bionic as oai-enb
FROM ubuntu:focal as oai-enb
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -81,16 +81,17 @@ COPY --from=enb-build \
# Now we are copying from builder-image the UHD files.
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=enb-base /usr/local/lib/libuhd.so.4.4.0 /usr/local/lib
COPY --from=enb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
COPY --from=enb-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
......
......@@ -99,7 +99,7 @@ COPY --from=gnb-base \
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=gnb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/local/share/uhd/rfnoc
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu18.04
# Valid for Ubuntu20.04
#
#---------------------------------------------------------------------
......@@ -33,7 +33,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM ubuntu:bionic as oai-gnb
FROM ubuntu:focal as oai-gnb
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
......@@ -82,16 +82,17 @@ COPY --from=gnb-build \
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
COPY --from=gnb-base /usr/local/lib/libuhd.so.4.4.0 /usr/local/lib
COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
COPY --from=gnb-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
/usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
......
......@@ -86,7 +86,7 @@ COPY --from=ru-base \
# Copying from the ran-build image the USRP needed packages
COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=ru-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
COPY --from=ru-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=ru-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
WORKDIR /usr/local/share/uhd/rfnoc
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment