Commit cfe698eb authored by Robert Schmidt's avatar Robert Schmidt

Merge branch 'integration_2022_wk50' into 'develop'

integration_2022_wk50

See merge request oai/openairinterface5g!1869

!1663 UL-MIMO working with 2 layers
!1705 RNTI to UE ID in PDCP, SDAP, GTPU, ...
!1818 Move /targets/user to /executables
!1835 Improve NR SRS configuration
!1837 Add Configuration File Naming Style Guide
!1852 Get data from SRB 1 when generating Msg4
!1857 Use F1AP to transfer SRB1 messages in monolithic mode
!1858 fix NR_LDPC_NUM_BN_GROUPS_BG2_R15
!1862 Fix for msg3 scheduling
!1814 Initial web server implementation
!1847 Move 5G RFsim tests from RAN-CI-develop to RAN-Container-Parent
timeout for RFsim
parents c3d01306 805dbe72
...@@ -103,5 +103,85 @@ SpacesInParentheses: false ...@@ -103,5 +103,85 @@ SpacesInParentheses: false
SpacesInSquareBrackets: false SpacesInSquareBrackets: false
TabWidth: 2 TabWidth: 2
UseTab: Never UseTab: Never
---
Language: JavaScript
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakStringLiterals: true
ColumnLimit: 200
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DisableFormat: false
FixNamespaceComments: true
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
ReflowComments: true
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
DeriveLineEnding: true
TabWidth: 2
JavaScriptQuotes: Double
UseTab: Never
... ...
...@@ -2166,7 +2166,7 @@ set(XFORMS_SOURCE_NR ...@@ -2166,7 +2166,7 @@ set(XFORMS_SOURCE_NR
${OPENAIR1_DIR}/PHY/TOOLS/nr_phy_scope.c ${OPENAIR1_DIR}/PHY/TOOLS/nr_phy_scope.c
) )
set(XFORMS_SOURCE_SOFTMODEM set(XFORMS_SOURCE_SOFTMODEM
${OPENAIR_TARGETS}/RT/USER/stats.c ${OPENAIR_DIR}/executables/stats.c
) )
set(XFORMSINTERFACE_SOURCE set(XFORMSINTERFACE_SOURCE
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c ${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
...@@ -2273,10 +2273,10 @@ target_link_libraries (test5Gnas LIB_5GNAS_GNB CONFIG_LIB minimal_lib ) ...@@ -2273,10 +2273,10 @@ target_link_libraries (test5Gnas LIB_5GNAS_GNB CONFIG_LIB minimal_lib )
################################################### ###################################################
add_executable(lte-softmodem add_executable(lte-softmodem
${OPENAIR_TARGETS}/RT/USER/lte-enb.c ${OPENAIR_DIR}/executables/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_DIR}/executables/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/ru_control.c ${OPENAIR_DIR}/executables/ru_control.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c ${OPENAIR_DIR}/executables/lte-softmodem.c
${OPENAIR_DIR}/executables/softmodem-common.c ${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c ${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
...@@ -2349,8 +2349,8 @@ target_link_libraries (ocp-enb ...@@ -2349,8 +2349,8 @@ target_link_libraries (ocp-enb
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIB_LMS_LIBRARIES} ${T_LIB}) target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIB_LMS_LIBRARIES} ${T_LIB})
add_executable(oairu add_executable(oairu
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_DIR}/executables/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/ru_control.c ${OPENAIR_DIR}/executables/ru_control.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c ${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c ${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR_DIR}/executables/softmodem-common.c ${OPENAIR_DIR}/executables/softmodem-common.c
...@@ -2378,8 +2378,8 @@ target_link_libraries(lte-softmodem PRIVATE ...@@ -2378,8 +2378,8 @@ target_link_libraries(lte-softmodem PRIVATE
####################################### #######################################
add_executable(lte-uesoftmodem add_executable(lte-uesoftmodem
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_DIR}/executables/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c ${OPENAIR_DIR}/executables/lte-uesoftmodem.c
${OPENAIR_DIR}/executables/softmodem-common.c ${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/executables/create_tasks_ue.c ${OPENAIR_DIR}/executables/create_tasks_ue.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c ${OPENAIR_DIR}/radio/COMMON/common_lib.c
...@@ -2855,6 +2855,7 @@ make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src}) ...@@ -2855,6 +2855,7 @@ make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src})
include (common/utils/telnetsrv/telnetsrv_CMakeLists.txt) include (common/utils/telnetsrv/telnetsrv_CMakeLists.txt)
include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt) include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt)
include (${OPENAIR_DIR}/common/utils/websrv/websrv_CMakeLists.txt)
add_subdirectory(doc) add_subdirectory(doc)
add_subdirectory(openair2) add_subdirectory(openair2)
......
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.dlsim100rbtm2}}
nodeName: {{ .Values.global.nodeName.dlsim100rbtm2 }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.dlsimbasic}}
nodeName: {{ .Values.global.nodeName.dlsimbasic }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.ldpctest}}
nodeName: {{ .Values.global.nodeName.ldpctest }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrdlschsim}}
nodeName: {{ .Values.global.nodeName.nrdlschsim }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrdlsimbasic}}
nodeName: {{ .Values.global.nodeName.nrdlsimbasic }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrdlsimdmrsptrs}}
nodeName: {{ .Values.global.nodeName.nrdlsimdmrsptrs }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrdlsimmcsmimo}}
nodeName: {{ .Values.global.nodeName.nrdlsimmcsmimo }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrdlsimoffset}}
nodeName: {{ .Values.global.nodeName.nrdlsimoffset }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrpbschsim106rb}}
nodeName: {{ .Values.global.nodeName.nrpbschsim106rb }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrpbchsim217rb}}
nodeName: {{ .Values.global.nodeName.nrpbchsim217rb }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrpbchsim273rb}}
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrprachsim}}
nodeName: {{ .Values.global.nodeName.nrprachsim }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrpucchsim}}
nodeName: {{ .Values.global.nodeName.nrpucchsim }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrulschsim}}
nodeName: {{ .Values.global.nodeName.nrulschsim }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrulsim3gpp}}
nodeName: {{ .Values.global.nodeName.nrulsim3gpp }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrulsimmimo}}
nodeName: {{ .Values.global.nodeName.nrulsimmimo }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrulsimmisc}}
nodeName: {{ .Values.global.nodeName.nrulsimmisc }}
{{- end }}
...@@ -35,5 +35,10 @@ spec: ...@@ -35,5 +35,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.nrulsimscfdma}}
nodeName: {{ .Values.global.nodeName.nrulsimscfdma }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.polartest}}
nodeName: {{ .Values.global.nodeName.polartest }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.smallblocktest}}
nodeName: {{ .Values.global.nodeName.smallblocktest }}
{{- end }}
...@@ -33,5 +33,10 @@ spec: ...@@ -33,5 +33,10 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }} serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector: nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- toYaml .Values.global.nodeSelector | nindent 12 }}
\ No newline at end of file {{- end }}
{{- if .Values.global.nodeName.ulsim}}
nodeName: {{ .Values.global.nodeName.ulsim }}
{{- end }}
...@@ -11,6 +11,29 @@ global: ...@@ -11,6 +11,29 @@ global:
version: TAG version: TAG
# pullPolicy: IfNotPresent or Never or Always # pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always pullPolicy: Always
nodeSelector: # removing the node selector
worker: "telco" nodeSelector: {}
# It is not a good way of assigning pods to the nodes: this way we bypass the scheduler. At the moment we don't provide the resource information of these pods.
# Therefore, Openshift assigns the pods to the same node because it thinks the pods don't consume much resources. This isn't the case, they consume a lot of resources.
nodeName:
dlsim100rbtm2: acamas
dlsimbasic: acamas
ldpctest: acamas
nrdlschsim: acamas
nrdlsimbasic: acamas
nrdlsimdmrsptrs: acamas
nrdlsimmcsmimo: acamas
nrdlsimoffset: dedale
nrpbschsim106rb: dedale
nrpbchsim217rb: dedale
nrpbchsim273rb: dedale
nrprachsim: dedale
nrpucchsim: dedale
nrulschsim: theseus
nrulsim3gpp: theseus
nrulsimmimo: theseus
nrulsimmisc: theseus
nrulsimscfdma: theseus
polartest: theseus
smallblocktest: theseus
ulsim: theseus
...@@ -62,7 +62,7 @@ function build_on_vm { ...@@ -62,7 +62,7 @@ function build_on_vm {
echo "ARCHIVES_LOC = $ARCHIVES_LOC" echo "ARCHIVES_LOC = $ARCHIVES_LOC"
echo "BUILD_OPTIONS = $BUILD_OPTIONS" echo "BUILD_OPTIONS = $BUILD_OPTIONS"
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]] || [[ "$VM_NAME" == *"gnb-usrp"* ]] || [[ "$VM_NAME" == *"nr-ue-usrp"* ]]
then then
echo "This VM type is no longer supported in the pipeline framework" echo "This VM type is no longer supported in the pipeline framework"
return return
......
...@@ -153,11 +153,11 @@ def AnalyzeBuildLogs(buildRoot, images, globalStatus): ...@@ -153,11 +153,11 @@ def AnalyzeBuildLogs(buildRoot, images, globalStatus):
def AnalyzeIperf(cliOptions, clientReport, serverReport): def AnalyzeIperf(cliOptions, clientReport, serverReport):
req_bw = 1.0 # default iperf throughput, in Mbps req_bw = 1.0 # default iperf throughput, in Mbps
result = re.search('-b *(?P<iperf_bandwidth>[0-9\.]+)(?P<magnitude>[KMG])', cliOptions) result = re.search('-b *(?P<iperf_bandwidth>[0-9\.]+)(?P<magnitude>[kKMG])', cliOptions)
if result is not None: if result is not None:
req_bw = float(result.group('iperf_bandwidth')) req_bw = float(result.group('iperf_bandwidth'))
magn = result.group('magnitude') magn = result.group('magnitude')
if magn == "K": if magn == "k" or magn == "K":
req_bw /= 1000 req_bw /= 1000
elif magn == "G": elif magn == "G":
req_bw *= 1000 req_bw *= 1000
...@@ -180,7 +180,7 @@ def AnalyzeIperf(cliOptions, clientReport, serverReport): ...@@ -180,7 +180,7 @@ def AnalyzeIperf(cliOptions, clientReport, serverReport):
reportLine = clientReportLines[l+1] reportLine = clientReportLines[l+1]
logging.debug(f'found server report: "{reportLine}"') logging.debug(f'found server report: "{reportLine}"')
statusTemplate = '(?:|\[ *\d+\].*) +0\.0-(?P<duration>[0-9\.]+) +sec +[0-9\.]+ [KMG]Bytes +(?P<bitrate>[0-9\.]+) (?P<magnitude>[KMG])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 # 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 # and use the last line which is typically close/identical to server report
if reportLine is None: if reportLine is None:
...@@ -201,10 +201,10 @@ def AnalyzeIperf(cliOptions, clientReport, serverReport): ...@@ -201,10 +201,10 @@ def AnalyzeIperf(cliOptions, clientReport, serverReport):
duration = float(result.group('duration')) duration = float(result.group('duration'))
bitrate = float(result.group('bitrate')) bitrate = float(result.group('bitrate'))
magn = result.group('magnitude') magn = result.group('magnitude')
if magn == "K": if magn == "k" or magn == "K":
bitrate *= 1000
elif magn == "G": # we assume bitrate in Mbps, therefore it must be G now
bitrate /= 1000 bitrate /= 1000
elif magn == "G": # we assume bitrate in Mbps, therefore it must be G now
bitrate *= 1000
jitter = float(result.group('jitter')) jitter = float(result.group('jitter'))
packetloss = float(result.group('packetloss')) packetloss = float(result.group('packetloss'))
......
# Configuration files: naming style guide
The configuration files should have the following name format:
```
<type>[.<sa|nsa>][.band<num>.[u<num>.]<num>prb].<sdr>[.<opt>].conf
```
Where:
- `[]` means this field is optional
- `<type>`: one of `gnb`, `enb`, `gnb-cu`, `gnb-du`, `nrue`, `lteue`, etc.
- `<sa|nsa>`: in the case of 5G, notes whether this is SA or NSA
- `<num>` for `band`/`u`/`prb`: numerical value. Note that band/PRB are only
applicable in some cases. The numerology `u` is only to be set for 5G if it
differs from `u1`.
- `<sdr>`: what SDR board/split this is tailored for:
* e.g., `usrpb210`, `usrpn310`, `rfsim`, `aw2s`
* if there is no SDR (e.g., for a CU), use the south-bound split, e.g., `f1`, `if4p5`, etc.
* for the L2simulator, write `l2sim`
- `<opt>`: optional specifiers. If there are multiple, concatenated
using a dash (`-`). Examples:
* `2x2`
* `prs` (positioning reference signal)
* `ddsuu` (specific TDD pattern)
* `tm2`: Transmission Mode 2 in 4G
* `oaiue`: specifies usage with OAI UE and not COTS UE
Examples:
- standard monolithic gNB, 2x2 configuration, with SDAP: `gnb.sa.band78.162prb.usrpn310.2x2-sdap.conf`
- gNB-CU: `gnb-cu.sa.f1.conf`
- monolithic gNB, L2sim: `gnb.sa.band77.106prb.l2sim.conf`
- RCC (4G eNB with IF4.5 split): `enb.band40.25prb.if45.tm1-fairscheduler.conf`
Notes:
- there is no need for TDD/FDD, this is encoded in the band number
- there is no need for FR1/FR2, this is encoded in the band number
...@@ -166,7 +166,7 @@ gNBs = ...@@ -166,7 +166,7 @@ gNBs =
////////// AMF parameters: ////////// AMF parameters:
amf_ip_address = ( { ipv4 = "192.168.70.132"; amf_ip_address = ( { ipv4 = "192.168.71.132";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -177,9 +177,9 @@ gNBs = ...@@ -177,9 +177,9 @@ gNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -87,7 +87,7 @@ function create_vm { ...@@ -87,7 +87,7 @@ function create_vm {
echo "VM_CPU = $VM_CPU" echo "VM_CPU = $VM_CPU"
echo "VM_DISK = $VM_DISK GBytes" echo "VM_DISK = $VM_DISK GBytes"
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]]
then then
echo "This VM type is no longer supported in the pipeline framework" echo "This VM type is no longer supported in the pipeline framework"
return return
......
...@@ -1095,12 +1095,12 @@ function start_rf_sim_gnb { ...@@ -1095,12 +1095,12 @@ function start_rf_sim_gnb {
then then
if [ $LOC_RA_SA_TEST -eq 0 ] #no RA test => use --phy-test option if [ $LOC_RA_SA_TEST -eq 0 ] #no RA test => use --phy-test option
then then
echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor,time --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1 echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor,time --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test --noS1\" > ./my-nr-softmodem-run.sh " >> $1
elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option
then then
echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor,time --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1 echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor,time --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra --noS1\" > ./my-nr-softmodem-run.sh " >> $1
else #SA test => use --sa option else #SA test => use --sa option
echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor,time --parallel-config PARALLEL_SINGLE_THREAD --rfsim --sa --lowmem \" > ./my-nr-softmodem-run.sh " >> $1 echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor,time --parallel-config PARALLEL_SINGLE_THREAD --rfsim --sa \" > ./my-nr-softmodem-run.sh " >> $1
fi fi
fi fi
echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1 echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1
...@@ -1305,14 +1305,8 @@ function run_test_on_vm { ...@@ -1305,14 +1305,8 @@ function run_test_on_vm {
return return
elif [[ (( "$RUN_OPTIONS" == "complex" ) && ( $VM_NAME =~ .*-rf5g-sim.* )) ]] elif [[ (( "$RUN_OPTIONS" == "complex" ) && ( $VM_NAME =~ .*-rf5g-sim.* )) ]]
then then
GNB_VM_NAME=`echo $VM_NAME | sed -e "s#rf5g-sim#gnb-usrp#"` echo "This VM test type is no longer supported in the pipeline framework"
GNB_VM_CMDS=${GNB_VM_NAME}_cmds.txt return
echo "GNB_VM_NAME = $GNB_VM_NAME"
echo "GNB_VM_CMD_FILE = $GNB_VM_CMDS"
NR_UE_VM_NAME=`echo $VM_NAME | sed -e "s#rf5g-sim#nr-ue-usrp#"`
NR_UE_VM_CMDS=${UE_VM_NAME}_cmds.txt
echo "NR_UE_VM_NAME = $NR_UE_VM_NAME"
echo "NR_UE_VM_CMD_FILE = $NR_UE_VM_CMDS"
else else
echo "VM_NAME = $VM_NAME" echo "VM_NAME = $VM_NAME"
echo "VM_CMD_FILE = $VM_CMDS" echo "VM_CMD_FILE = $VM_CMDS"
......
...@@ -47,7 +47,7 @@ function wait_on_vm_build { ...@@ -47,7 +47,7 @@ function wait_on_vm_build {
echo "ARCHIVES_LOC = $ARCHIVES_LOC" echo "ARCHIVES_LOC = $ARCHIVES_LOC"
echo "BUILD_OPTIONS = $BUILD_OPTIONS" echo "BUILD_OPTIONS = $BUILD_OPTIONS"
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]] || [[ "$VM_NAME" == *"gnb-usrp"* ]] || [[ "$VM_NAME" == *"nr-ue-usrp"* ]]
then then
echo "This VM type is no longer supported in the pipeline framework" echo "This VM type is no longer supported in the pipeline framework"
return return
...@@ -93,7 +93,7 @@ function wait_on_vm_build { ...@@ -93,7 +93,7 @@ function wait_on_vm_build {
} }
function check_on_vm_build { function check_on_vm_build {
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] || [[ "$VM_NAME" == *"-basic-sim"* ]] || [[ "$VM_NAME" == *"-flexran-rtc"* ]] || [[ "$VM_NAME" == *"-rf-sim"* ]] || [[ "$VM_NAME" == *"-ethernet"* ]] || [[ "$VM_NAME" == *"rf5g-sim"* ]] || [[ "$VM_NAME" == *"gnb-usrp"* ]] || [[ "$VM_NAME" == *"nr-ue-usrp"* ]]
then then
echo "This VM type is no longer supported in the pipeline framework" echo "This VM type is no longer supported in the pipeline framework"
return return
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>rfsim-5gnr-tdd</htmlTabRef> <htmlTabRef>rfsim-5gnr-tdd</htmlTabRef>
<htmlTabName>Monolithic TDD gNB</htmlTabName> <htmlTabName>Monolithic SA TDD gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-24prb-5gnr-tdd</htmlTabRef>
<htmlTabName>Monolithic SA TDD gNB 24PRB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
111111
100001
000000
000001
000002
000003
020001
020002
030001
030002
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy>
</testCase>
<testCase id="000002">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G gNB RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
<services>oai-gnb</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000003">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>8</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 -i0.2 192.168.72.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from ext-dn</desc>
<container_name>rfsim5g-oai-ext-dn</container_name>
<options>-c 20 12.1.1.2 -i0.2</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="030001">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
<client_options>-c 12.1.1.2 -u -i 1 -t 5 -b 3M</client_options>
</testCase>
<testCase id="030002">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-u -i 1 -s</server_options>
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 5 -b 1M</client_options>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
<d_retx_th>1,0,0,0</d_retx_th>
<u_retx_th>1,0,0,0</u_retx_th>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-24prb-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp Monolithic SA TDD gNB 24PRB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>rfsim-5gnr-down</htmlTabRef> <htmlTabRef>rfsim-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp Monolithic TDD gNB</htmlTabName> <htmlTabName>CleanUp SA Monolithic TDD gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100002 100002
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-fdd-phytest</htmlTabRef>
<htmlTabName>Monolithic FDD phytest gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
111111
100011
000010
000011
020011
020012
030011
030012
100011
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000010">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G gNB RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_fdd_phytest</yaml_path>
<services>oai-gnb</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000011">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_fdd_phytest</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>2</nb_healthy>
</testCase>
<testCase id="020011">
<class>PingFromContainer</class>
<desc>Ping gNB from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-c20 -i0.2 10.0.1.1</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="020012">
<class>PingFromContainer</class>
<desc>Ping NR-UE from gNB</desc>
<container_name>rfsim5g-oai-gnb</container_name>
<options>-c20 -i0.2 10.0.1.2</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="030011">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-gnb</client_container_name>
<server_options>-sui1 -B10.0.1.2</server_options>
<client_options>-uc10.0.1.2 -i1 -t10 -b30k -B10.0.1.1</client_options>
</testCase>
<testCase id="030012">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>rfsim5g-oai-gnb</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-sui1 -B10.0.1.1</server_options>
<client_options>-uc10.0.1.1 -i1 -t10 -b30k -B10.0.1.2</client_options>
</testCase>
<testCase id="100011">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_fdd_phytest</yaml_path>
<d_retx_th>10,100,100,100</d_retx_th> <!-- phytest: will fail at start! -->
<u_retx_th>10,100,100,100</u_retx_th> <!-- phytest: will fail at start! -->
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-fdd-phytest-down</htmlTabRef>
<htmlTabName>CleanUp Monolithic FDD phytest gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100012
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100012">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_fdd_phytest</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-fr2-32prb-5gnr-tdd</htmlTabRef>
<htmlTabName>Monolithic FR2 do-ra gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
111111
100001
000000
000001
020001
020002
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy OAI gNB</desc>
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
<services>oai-gnb</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI NR-UE</desc>
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>2</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping gNB from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-c20 -i0.2 10.0.1.1</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from gNB</desc>
<container_name>rfsim5g-oai-gnb</container_name>
<options>-c20 -i0.2 10.0.1.2</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
<d_retx_th>0,0,0,0</d_retx_th>
<u_retx_th>0,0,0,0</u_retx_th>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-fr2-32prb-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp Monolithic FR2 do-ra gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-tdd-dora-5gnr-tdd</htmlTabRef>
<htmlTabName>Monolithic do-ra TDD gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
111111
100001
000000
000001
020001
020002
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy OAI gNB</desc>
<yaml_path>yaml_files/5g_rfsimulator_tdd_dora</yaml_path>
<services>oai-gnb</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI NR-UE</desc>
<yaml_path>yaml_files/5g_rfsimulator_tdd_dora</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>2</nb_healthy>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping gNB from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-c20 -i0.2 10.0.1.1</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping NR-UE from gNB</desc>
<container_name>rfsim5g-oai-gnb</container_name>
<options>-c20 -i0.2 10.0.1.2</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_tdd_dora</yaml_path>
<d_retx_th>0,0,0,0</d_retx_th>
<u_retx_th>0,0,0,0</u_retx_th>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-tdd-dora-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp Monolithic do-ra TDD gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_tdd_dora</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
version: '3.8'
services:
oai-nrf:
container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks:
public_net:
ipv4_address: 192.168.71.130
volumes:
- ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql:
container_name: "rfsim5g-mysql"
image: mysql:5.7
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev
environment:
- TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208
- MNC=99
- REGION_ID=128
- AMF_SET_ID=1
- SERVED_GUAMI_MCC_0=208
- SERVED_GUAMI_MNC_0=99
- SERVED_GUAMI_REGION_ID_0=128
- SERVED_GUAMI_AMF_SET_ID_0=1
- SERVED_GUAMI_MCC_1=460
- SERVED_GUAMI_MNC_1=11
- SERVED_GUAMI_REGION_ID_1=10
- SERVED_GUAMI_AMF_SET_ID_1=1
- PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001
- SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0
- SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true
- SMF_INSTANCE_ID_1=2
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root
- MYSQL_PASS=linux
- MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1
- NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NF_REGISTRATION=yes
- SMF_SELECTION=yes
- USE_FQDN_DNS=yes
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on:
- oai-nrf
- mysql
volumes:
- ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev
environment:
- TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- REGISTER_NRF=yes
- DISCOVER_UPF=yes
- USE_FQDN_DNS=yes
- DNN_NI0=oai
- TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4
depends_on:
- oai-nrf
- oai-amf
volumes:
- ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.133
oai-spgwu:
container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes
- USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf
- NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff
- DNN_0=oai
depends_on:
- oai-nrf
- oai-smf
cap_add:
- NET_ADMIN
- SYS_ADMIN
cap_drop:
- ALL
privileged: true
volumes:
- ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
ipv4_address: 192.168.71.134
traffic_net:
ipv4_address: 192.168.72.134
oai-ext-dn:
image: ubuntu:bionic
privileged: true
container_name: rfsim5g-oai-ext-dn
entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"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"
depends_on:
- oai-spgwu
networks:
traffic_net:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
interval: 10s
timeout: 5s
retries: 5
oai-gnb:
image: oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
environment:
RFSIMULATOR: server
USE_VOLUMED_CONF: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
depends_on:
- oai-ext-dn
networks:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.sa.band78.fr1.24PRB.usrpb210.conf:/opt/oai-gnb/etc/mounted.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
environment:
RFSIMULATOR: 192.168.71.140
FULL_IMSI: '208990100001100'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 24 --ssb 24 --numerology 1 -C 3604320000 --nokrnmod --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.150
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
driver: bridge
name: rfsim5g-oai-public-net
ipam:
config:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
traffic_net:
driver: bridge
name: rfsim5g-oai-traffic-net
ipam:
config:
- subnet: 192.168.72.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-traffic"
version: '3.8'
services:
oai-gnb:
image: oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
environment:
RFSIMULATOR: server
USE_VOLUMED_CONF: 'yes'
USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --nokrnmod --log_config.global_log_options level,nocolor,time
networks:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.band66.tm1.106PRB.usrpn300.conf:/opt/oai-gnb/etc/mounted.conf
- rrc.config:/opt/oai-gnb/
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
environment:
RFSIMULATOR: 192.168.71.140
FULL_IMSI: '208930100001100'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --nokrnmod --rrc_config_path etc/rrc/ --log_config.global_log_options level,nocolor,time
volumes:
- rrc.config:/opt/oai-nr-ue/etc/rrc/
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.150
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
volumes:
rrc.config:
networks:
public_net:
driver: bridge
name: rfsim5g-oai-public-net
ipam:
config:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
version: '3.8'
services:
oai-gnb:
image: oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
environment:
RFSIMULATOR: server
USE_VOLUMED_CONF: 'yes'
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --nokrnmod --log_config.global_log_options level,nocolor,time
networks:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.band261.tm1.32PRB.usrpn300.conf:/opt/oai-gnb/etc/mounted.conf
- rrc.config:/opt/oai-gnb/
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
environment:
RFSIMULATOR: 192.168.71.140
FULL_IMSI: '311480100001100'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --rrc_config_path etc/rrc/ --nokrnmod --log_config.global_log_options level,nocolor,time
volumes:
- rrc.config:/opt/oai-nr-ue/etc/rrc/
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.150
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
volumes:
rrc.config:
networks:
public_net:
driver: bridge
name: rfsim5g-oai-public-net
ipam:
config:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
version: '3.8'
services:
oai-gnb:
image: oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
environment:
RFSIMULATOR: server
USE_VOLUMED_CONF: 'yes'
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --nokrnmod --log_config.global_log_options level,nocolor,time
networks:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.band78.tm1.106PRB.usrpn300.conf:/opt/oai-gnb/etc/mounted.conf
- rrc.config:/opt/oai-gnb/
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
environment:
RFSIMULATOR: 192.168.71.140
FULL_IMSI: '208930100001100'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --rrc_config_path etc/rrc/ --nokrnmod --log_config.global_log_options level,nocolor,time
volumes:
- rrc.config:/opt/oai-nr-ue/etc/rrc/
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.150
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
volumes:
rrc.config:
networks:
public_net:
driver: bridge
name: rfsim5g-oai-public-net
ipam:
config:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
...@@ -399,12 +399,16 @@ ...@@ -399,12 +399,16 @@
<testCase id="nr_ulsim.mimo"> <testCase id="nr_ulsim.mimo">
<desc>nr_ulsim Test cases. (Test1: MCS 19 50 PRBs 2 RX_Antenna), <desc>nr_ulsim Test cases. (Test1: MCS 19 50 PRBs 2 RX_Antenna),
(Test2: MCS 9 106 PRBs MIMO 2 layers), (Test2: MCS 9 106 PRBs MIMO 2 layers),
(Test3: MCS 9 106 PRBs MIMO 4 layers)</desc> (Test3: MCS 10 106 PRBs MIMO 2 layers),
(Test4: MCS 19 106 PRBs MIMO 2 layers),
(Test5: MCS 9 106 PRBs MIMO 4 layers)</desc>
<main_exec>nr_ulsim</main_exec> <main_exec>nr_ulsim</main_exec>
<main_exec_args>-n100 -m19 -s10 -S15 -z2 <main_exec_args>-n100 -m19 -s10 -S15 -z2
-n100 -m9 -r106 -s8 -W2 -y2 -z2 -n100 -m9 -r106 -s8 -W2 -y2 -z2
-n100 -m10 -r106 -s12 -W2 -y2 -z2
-n100 -m19 -r106 -s22 -W2 -y2 -z2
-n100 -m9 -r106 -s10 -W4 -y4 -z4</main_exec_args> -n100 -m9 -r106 -s10 -W4 -y4 -z4</main_exec_args>
<tags>test1 test2 test3</tags> <tags>test1 test2 test3 test4 test5</tags>
<search_expr_true>PUSCH test OK</search_expr_true> <search_expr_true>PUSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns> <nruns>3</nruns>
......
...@@ -56,6 +56,13 @@ CMAKE_CMD="$CMAKE" ...@@ -56,6 +56,13 @@ CMAKE_CMD="$CMAKE"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
NR="False" NR="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope" OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope"
ulfiusdep=$(basename ./`find /usr/lib* -name libulfius.so`)
jssondep=$(basename ./`find /usr/lib* -name libjansson.so`)
if [ "$ulfiusdep" == "libulfius.so" -a "$jssondep" == "libjansson.so" ] ; then
OPTIONAL_LIBRARIES+=" websrv"
else
echo_warning " websrv optional build not included in build-lib option as dependencies requirements not met "
fi
RU=0 RU=0
CMAKE_C_FLAGS=() CMAKE_C_FLAGS=()
CMAKE_CXX_FLAGS=() CMAKE_CXX_FLAGS=()
...@@ -644,9 +651,27 @@ function main() { ...@@ -644,9 +651,27 @@ function main() {
if [ ! -z "$BUILD_OPTLIB" ] ; then if [ ! -z "$BUILD_OPTLIB" ] ; then
for oklib in $BUILD_OPTLIB ; do for oklib in $BUILD_OPTLIB ; do
compilations $BUILD_DIR $oklib compilations $BUILD_DIR $oklib
if [ "$oklib" == "websrv" ] ; then
BUILD_WEBSRVFRONT=1
echo_info "Build of websrv frontend enabled"
fi
done done
fi 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 # # Build RF device and transport protocol libraries #
#################################################### ####################################################
......
...@@ -18,6 +18,7 @@ The debug level is a mask: ...@@ -18,6 +18,7 @@ The debug level is a mask:
* bit 2: print memory allocation/free performed by the config module * bit 2: print memory allocation/free performed by the config module
* bit 3: print command line processing messages * bit 3: print command line processing messages
* bit 4: disable execution abort when parameters checking fails * bit 4: disable execution abort when parameters checking fails
* bit 5: write a config file reflecting the parameters after reading the configuration file and processing the command line
As a oai user, you may have to use bit 1 (dbgl1) , to check your configuration and get the full name of a parameter you would like to modify on the command line. Other bits are for developers usage, (dbgl7 will print all debug messages). As a oai user, you may have to use bit 1 (dbgl1) , to check your configuration and get the full name of a parameter you would like to modify on the command line. Other bits are for developers usage, (dbgl7 will print all debug messages).
...@@ -27,7 +28,10 @@ $ ./lte-softmodem -O libconfig:<config>:dbgl1 ...@@ -27,7 +28,10 @@ $ ./lte-softmodem -O libconfig:<config>:dbgl1
```bash ```bash
$ ./lte-uesoftmodem -O cmdlineonly:dbgl1 $ ./lte-uesoftmodem -O cmdlineonly:dbgl1
``` ```
bit 5 (dbgl32) can be useful to detect unused parameters from a config file or to detect parameters set to their default values, and not present in the config file
To get help on supported parameters you can use specific options: To get help on supported parameters you can use specific options:
* ---help: print help for command line only parameters and for parameters not defined in a specific section * ---help: print help for command line only parameters and for parameters not defined in a specific section
* ---help_< prefix > : print help for parameters defined under the section < prefix > * ---help_< prefix > : print help for parameters defined under the section < prefix >
......
...@@ -88,10 +88,26 @@ int load_config_sharedlib(configmodule_interface_t *cfgptr) { ...@@ -88,10 +88,26 @@ int load_config_sharedlib(configmodule_interface_t *cfgptr) {
st = -1; st = -1;
} }
if (cfgptr->rtflags & CONFIG_SAVERUNCFG) {
sprintf(fname, "config_%s_set", cfgptr->cfgmode);
cfgptr->set = dlsym(lib_handle, fname);
if (cfgptr->set == NULL) {
printf("[CONFIG] %s %d no function %s for config mode %s\n", __FILE__, __LINE__, fname, cfgptr->cfgmode);
st = -1;
}
sprintf(fname, "config_%s_write_parsedcfg", cfgptr->cfgmode);
cfgptr->write_parsedcfg = dlsym(lib_handle, fname);
if (cfgptr->write_parsedcfg == NULL) {
printf("[CONFIG] %s %d no function %s for config mode %s\n", __FILE__, __LINE__, fname, cfgptr->cfgmode);
}
}
sprintf (fname,"config_%s_end",cfgptr->cfgmode); sprintf (fname,"config_%s_end",cfgptr->cfgmode);
cfgptr->end = dlsym(lib_handle,fname); cfgptr->end = dlsym(lib_handle,fname);
if (cfgptr->getlist == NULL ) { if (cfgptr->end == NULL) {
printf("[CONFIG] %s %d no function %s for config mode %s\n", printf("[CONFIG] %s %d no function %s for config mode %s\n",
__FILE__, __LINE__,fname, cfgptr->cfgmode); __FILE__, __LINE__,fname, cfgptr->cfgmode);
} }
...@@ -193,6 +209,7 @@ configmodule_interface_t *load_configmodule(int argc, ...@@ -193,6 +209,7 @@ configmodule_interface_t *load_configmodule(int argc,
uint32_t tmpflags=0; uint32_t tmpflags=0;
int i; int i;
int OoptIdx=-1; int OoptIdx=-1;
int OWoptIdx = -1;
printf("CMDLINE: "); printf("CMDLINE: ");
for (int i=0; i<argc; i++) for (int i=0; i<argc; i++)
...@@ -209,6 +226,10 @@ configmodule_interface_t *load_configmodule(int argc, ...@@ -209,6 +226,10 @@ configmodule_interface_t *load_configmodule(int argc,
OoptIdx=i; OoptIdx=i;
} }
char *OWopt = strstr(argv[i], "OW");
if (OWopt == argv[i] + 2) {
OWoptIdx = i;
}
if ( strstr(argv[i], "help_config") != NULL ) { if ( strstr(argv[i], "help_config") != NULL ) {
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME); config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME);
exit(0); exit(0);
...@@ -258,6 +279,11 @@ configmodule_interface_t *load_configmodule(int argc, ...@@ -258,6 +279,11 @@ configmodule_interface_t *load_configmodule(int argc,
/* argv[0] is the exec name, always Ok */ /* argv[0] is the exec name, always Ok */
cfgptr->argv_info[0] |= CONFIG_CMDLINEOPT_PROCESSED; cfgptr->argv_info[0] |= CONFIG_CMDLINEOPT_PROCESSED;
/* When reuested _(_--OW or rtflag is 5), a file with config parameters, as defined after all processing, will be created */
if (OWoptIdx >= 0) {
cfgptr->argv_info[OWoptIdx] |= CONFIG_CMDLINEOPT_PROCESSED;
cfgptr->rtflags |= CONFIG_SAVERUNCFG;
}
/* when OoptIdx is >0, -O option has been detected at position OoptIdx /* when OoptIdx is >0, -O option has been detected at position OoptIdx
* we must memorize arv[OoptIdx is Ok */ * we must memorize arv[OoptIdx is Ok */
if (OoptIdx >= 0) { if (OoptIdx >= 0) {
...@@ -294,14 +320,18 @@ configmodule_interface_t *load_configmodule(int argc, ...@@ -294,14 +320,18 @@ configmodule_interface_t *load_configmodule(int argc,
printf("%s ",cfgptr->cfgP[i]); printf("%s ",cfgptr->cfgP[i]);
} }
printf(", debug flags: 0x%08x\n",cfgptr->rtflags); if (cfgptr->rtflags & CONFIG_PRINTPARAMS) {
cfgptr->status = malloc(sizeof(configmodule_status_t));
}
if (strstr(cfgparam,CONFIG_CMDLINEONLY) == NULL) { if (strstr(cfgparam,CONFIG_CMDLINEONLY) == NULL) {
i=load_config_sharedlib(cfgptr); i=load_config_sharedlib(cfgptr);
if (i == 0) { if (i == 0) {
printf("[CONFIG] config module %s loaded\n",cfgmode); printf("[CONFIG] config module %s loaded\n",cfgmode);
Config_Params[CONFIGPARAM_DEBUGFLAGS_IDX].uptr=&(cfgptr->rtflags); int idx = config_paramidx_fromname(Config_Params, CONFIG_PARAMLENGTH(Config_Params), CONFIGP_DEBUGFLAGS);
Config_Params[idx].uptr = &(cfgptr->rtflags);
idx = config_paramidx_fromname(Config_Params, CONFIG_PARAMLENGTH(Config_Params), CONFIGP_TMPDIR);
Config_Params[idx].strptr = &(cfgptr->tmpdir);
config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME ); config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME );
} else { } else {
fprintf(stderr,"[CONFIG] %s %d config module \"%s\" couldn't be loaded\n", __FILE__, __LINE__,cfgmode); fprintf(stderr,"[CONFIG] %s %d config module \"%s\" couldn't be loaded\n", __FILE__, __LINE__,cfgmode);
...@@ -314,6 +344,8 @@ configmodule_interface_t *load_configmodule(int argc, ...@@ -314,6 +344,8 @@ configmodule_interface_t *load_configmodule(int argc,
cfgptr->end = (configmodule_endfunc_t)nooptfunc; cfgptr->end = (configmodule_endfunc_t)nooptfunc;
} }
printf("[CONFIG] debug flags: 0x%08x\n", cfgptr->rtflags);
if (modeparams != NULL) free(modeparams); if (modeparams != NULL) free(modeparams);
if (cfgmode != NULL) free(cfgmode); if (cfgmode != NULL) free(cfgmode);
...@@ -326,10 +358,28 @@ configmodule_interface_t *load_configmodule(int argc, ...@@ -326,10 +358,28 @@ configmodule_interface_t *load_configmodule(int argc,
return cfgptr; return cfgptr;
} }
/* Possibly write config file, with parameters which have been read and after command line parsing */
void write_parsedcfg(void)
{
if (cfgptr->status && (cfgptr->rtflags & CONFIG_SAVERUNCFG)) {
printf_params("[CONFIG] Runtime params creation status: %i null values, %i errors, %i empty list or array, %i successfull \n",
cfgptr->status->num_err_nullvalue,
cfgptr->status->num_err_write,
cfgptr->status->emptyla,
cfgptr->status->num_write);
}
if (cfgptr != NULL) {
if (cfgptr->write_parsedcfg != NULL) {
printf("[CONFIG] calling config module write_parsedcfg function...\n");
cfgptr->write_parsedcfg();
}
}
}
/* free memory allocated when reading parameters */ /* free memory allocated when reading parameters */
/* config module could be initialized again after this call */ /* config module could be initialized again after this call */
void end_configmodule(void) { void end_configmodule(void) {
write_parsedcfg();
if (cfgptr != NULL) { if (cfgptr != NULL) {
if (cfgptr->end != NULL) { if (cfgptr->end != NULL) {
printf ("[CONFIG] calling config module end function...\n"); printf ("[CONFIG] calling config module end function...\n");
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#define CONFIG_DEBUGPTR (1<<1) // print memory allocation/free debug messages #define CONFIG_DEBUGPTR (1<<1) // print memory allocation/free debug messages
#define CONFIG_DEBUGCMDLINE (1<<2) // print command line processing messages #define CONFIG_DEBUGCMDLINE (1<<2) // print command line processing messages
#define CONFIG_NOABORTONCHKF (1<<4) // disable abort execution when parameter checking function fails #define CONFIG_NOABORTONCHKF (1<<4) // disable abort execution when parameter checking function fails
#define CONFIG_SAVERUNCFG (1 << 5) // create config file with running values, as after cfg file + command line processing
#define CONFIG_NOEXITONHELP (1<<19) // do not exit after printing help #define CONFIG_NOEXITONHELP (1<<19) // do not exit after printing help
#define CONFIG_HELP (1<<20) // print help message #define CONFIG_HELP (1<<20) // print help message
#define CONFIG_ABORT (1<<21) // config failed,abort execution #define CONFIG_ABORT (1<<21) // config failed,abort execution
...@@ -61,8 +62,21 @@ ...@@ -61,8 +62,21 @@
typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP); typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
typedef int(*configmodule_getfunc_t)(paramdef_t *,int numparams, char *prefix); typedef int(*configmodule_getfunc_t)(paramdef_t *,int numparams, char *prefix);
typedef int(*configmodule_getlistfunc_t)(paramlist_def_t *, paramdef_t *,int numparams, char *prefix); typedef int(*configmodule_getlistfunc_t)(paramlist_def_t *, paramdef_t *,int numparams, char *prefix);
typedef int (*configmodule_setfunc_t)(paramdef_t *cfgoptions, int numoptions, char *prefix);
typedef void(*configmodule_endfunc_t)(void); typedef void(*configmodule_endfunc_t)(void);
typedef struct configmodule_status {
int num_paramgroups;
char **paramgroups_names;
int num_err_nullvalue;
int emptyla;
int num_err_read;
int num_err_write;
int num_read;
int num_write;
char *debug_cfgname;
} configmodule_status_t;
typedef struct oneBlock_s{ typedef struct oneBlock_s{
void *ptrs; void *ptrs;
int sz; int sz;
...@@ -80,11 +94,15 @@ typedef struct configmodule_interface { ...@@ -80,11 +94,15 @@ typedef struct configmodule_interface {
configmodule_initfunc_t init; configmodule_initfunc_t init;
configmodule_getfunc_t get; configmodule_getfunc_t get;
configmodule_getlistfunc_t getlist; configmodule_getlistfunc_t getlist;
configmodule_setfunc_t set;
configmodule_endfunc_t end; configmodule_endfunc_t end;
pthread_mutex_t memBlocks_mutex; pthread_mutex_t memBlocks_mutex;
configmodule_endfunc_t write_parsedcfg;
uint32_t numptrs; uint32_t numptrs;
uint32_t rtflags; uint32_t rtflags;
oneBlock_t oneBlock[CONFIG_MAX_ALLOCATEDPTRS]; oneBlock_t oneBlock[CONFIG_MAX_ALLOCATEDPTRS];
char *tmpdir;
configmodule_status_t *status; // allocated in debug mode only
} configmodule_interface_t; } configmodule_interface_t;
#ifdef CONFIG_LOADCONFIG_MAIN #ifdef CONFIG_LOADCONFIG_MAIN
...@@ -97,16 +115,19 @@ static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugfl ...@@ -97,16 +115,19 @@ static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugfl
incp parameter can be used to define the include path used for config files (@include directive)\n \ incp parameter can be used to define the include path used for config files (@include directive)\n \
defaults is set to the path of the main config file.\n"; defaults is set to the path of the main config file.\n";
#define CONFIG_SECTIONNAME "config" #define CONFIG_HELP_TMPDIR "<Repository to create temporary file>"
#define CONFIGPARAM_DEBUGFLAGS_IDX 0
#define CONFIG_SECTIONNAME "config"
#define CONFIGP_DEBUGFLAGS "debugflags"
#define CONFIGP_TMPDIR "tmpdir"
static paramdef_t Config_Params[] = { static paramdef_t Config_Params[] = {
/*-----------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------------*/
/* config parameters for config module */ /* config parameters for config module */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-----------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------------*/
{"debugflags", config_helpstr, 0, uptr:NULL, defintval:0, TYPE_MASK, 0}, {CONFIGP_DEBUGFLAGS, config_helpstr, 0, uptr : NULL, defintval : 0, TYPE_MASK, 0},
{CONFIGP_TMPDIR, CONFIG_HELP_TMPDIR, PARAMFLAG_NOFREE, strptr : NULL, defstrval : "/tmp", TYPE_STRING, 0},
}; };
#else #else
...@@ -126,6 +147,8 @@ extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32 ...@@ -126,6 +147,8 @@ extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32
* a new config module init * a new config module init
*/ */
extern void end_configmodule(void); extern void end_configmodule(void);
extern void write_parsedcfg(void);
/* free all config module memory, to be used at end of program as /* free all config module memory, to be used at end of program as
* it will free parameters values even those specified with the PARAMFLAG_NOFREE flag */ * it will free parameters values even those specified with the PARAMFLAG_NOFREE flag */
extern void free_configmodule(void); extern void free_configmodule(void);
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#define PARAMFLAG_NOFREE (1 << 3) // don't free parameter in end function #define PARAMFLAG_NOFREE (1 << 3) // don't free parameter in end function
#define PARAMFLAG_BOOL (1 << 4) // integer param can be 0 or 1 #define PARAMFLAG_BOOL (1 << 4) // integer param can be 0 or 1
#define PARAMFLAG_CMDLINE_NOPREFIXENABLED (1 << 5) // on the command line, allow a parameter to be specified without the prefix #define PARAMFLAG_CMDLINE_NOPREFIXENABLED (1 << 5) // on the command line, allow a parameter to be specified without the prefix
#define PARAMFLAG_CMDLINEONLY (1 << 6) // this parameter cannot be specified in config file
/* Flags used by config modules to return info to calling modules and/or to for internal usage*/ /* Flags used by config modules to return info to calling modules and/or to for internal usage*/
#define PARAMFLAG_MALLOCINCONFIG (1 << 15) // parameter allocated in config module #define PARAMFLAG_MALLOCINCONFIG (1 << 15) // parameter allocated in config module
......
...@@ -275,6 +275,9 @@ int config_get(paramdef_t *params, int numparams, char *prefix) { ...@@ -275,6 +275,9 @@ int config_get(paramdef_t *params, int numparams, char *prefix) {
if (ret >= 0) { if (ret >= 0) {
config_process_cmdline(params, numparams, prefix); config_process_cmdline(params, numparams, prefix);
if (cfgif->rtflags & CONFIG_SAVERUNCFG) {
config_get_if()->set(params, numparams, prefix);
}
config_execcheck(params, numparams, prefix); config_execcheck(params, numparams, prefix);
} }
...@@ -312,6 +315,9 @@ int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams ...@@ -312,6 +315,9 @@ int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams
// TODO config_process_cmdline? // TODO config_process_cmdline?
sprintf(cfgpath, "%s.[%i]", newprefix, i); sprintf(cfgpath, "%s.[%i]", newprefix, i);
config_process_cmdline(ParamList->paramarray[i],numparams,cfgpath); config_process_cmdline(ParamList->paramarray[i],numparams,cfgpath);
if (config_get_if()->rtflags & CONFIG_SAVERUNCFG) {
config_get_if()->set(ParamList->paramarray[i], numparams, cfgpath);
}
config_execcheck(ParamList->paramarray[i], numparams, cfgpath); config_execcheck(ParamList->paramarray[i], numparams, cfgpath);
} }
......
This diff is collapsed.
...@@ -46,6 +46,7 @@ extern "C" ...@@ -46,6 +46,7 @@ extern "C"
typedef struct libconfig_privatedata { typedef struct libconfig_privatedata {
char *configfile; char *configfile;
config_t cfg; config_t cfg;
config_t runtcfg;
} libconfig_privatedata_t; } libconfig_privatedata_t;
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "RRC/LTE/defs_NB_IoT.h" #include "RRC/LTE/defs_NB_IoT.h"
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
#include "RRC/NR/nr_rrc_defs.h" #include "RRC/NR/nr_rrc_defs.h"
#include <openair3/ocp-gtpu/gtpv1u_eNB_task.h> #include <openair3/ocp-gtpu/gtp_itf.h>
typedef struct { typedef struct {
......
...@@ -256,8 +256,6 @@ typedef struct IttiMsgText_s { ...@@ -256,8 +256,6 @@ typedef struct IttiMsgText_s {
#include <openair3/MME_APP/mme_app.h> #include <openair3/MME_APP/mme_app.h>
//#include <proto.h> //#include <proto.h>
#include <openair3/ocp-gtpu/gtpv1u_eNB_task.h>
#include <openair3/ocp-gtpu/gtpv1u_gNB_task.h>
void *rrc_enb_process_itti_msg(void *); void *rrc_enb_process_itti_msg(void *);
#include <openair3/SCTP/sctp_eNB_task.h> #include <openair3/SCTP/sctp_eNB_task.h>
#include <openair3/NGAP/ngap_gNB.h> #include <openair3/NGAP/ngap_gNB.h>
......
...@@ -19,8 +19,8 @@ in `telnetsrv.h` ...@@ -19,8 +19,8 @@ in `telnetsrv.h`
*/ */
static int coding_setmod_cmd(char *buff, int debug, telnet_printfunc_t prnt); static int coding_setmod_cmd(char *buff, int debug, telnet_printfunc_t prnt);
static telnetshell_cmddef_t coding_cmdarray[] = { static telnetshell_cmddef_t coding_cmdarray[] = {
{"mode","[sse,avx2,stdc,none]",coding_setmod_cmd}, {"mode", "[sse,avx2,stdc,none]", coding_setmod_cmd, {NULL}, 0, NULL},
{"","",NULL}, {"", "", NULL, {NULL}, 0, NULL},
}; };
/* /*
...@@ -109,8 +109,24 @@ The telnet server is dynamically loaded, to use the `add_telnetcmd` function, t ...@@ -109,8 +109,24 @@ The telnet server is dynamically loaded, to use the `add_telnetcmd` function, t
| Fields | type |Description | | Fields | type |Description |
|:-----------|:------:|:-----------------------| |:-----------|:------:|:-----------------------|
| `cmdname` | `char[TELNET_CMD_MAXSIZE]` | command name, as tested by the telnet server to check it should call the `cmdfunc` function | | `cmdname` | `char[TELNET_CMD_MAXSIZE]` | command name, as tested by the telnet server or web server to check it should call the `cmdfunc` or `webfunc` function |
| `helpstr` | `char[TELNET_HELPSTR_SIZE]` | character string to print when the elp`command is received from the telnet client | | `helpstr` | `char[TELNET_HELPSTR_SIZE]` | character string to print when the help`command is received from the telnet client |
| `cmdfunc` | `cmdfunc_t` | pointer to the function implementing the `cmdname` sub command. | | `cmdfunc` | `cmdfunc_t` | pointer to the function implementing the `cmdname` telnet or web server sub command. |
| `webfunc` | `webfunc_t` or `webfunc_getdata_t` | pointer to the function implementing the `cmdname` web server sub command. |
| `cmdflags` | unsigned int bit mask | possible bits are defined in the next table |
| `qptr` | pointer to a thread pool queue | when `TELNETSRV_CMDFLAG_PUSHINTPOOLQ` bit is set in `cmdflags` , contains the queue where the command is pushed|
### `cmdflags ` bit definitions
These flags possibly modify the way the `telnetshell_cmddef_t` structure is used by the telnet server and/or the web server
| Fields | Description |
|:------------------------------------:|:-----------------------|
| TELNETSRV_CMDFLAG_PUSHINTPOOLQ | function defined in `cmdfunc` field is pushed in a thread pool queue instead of beeing executed synchronously. The queue is created by the telnet server code in the `add_telnetcmd` function|
| TELNETSRV_CMDFLAG_GETWEBTBLDATA | web server will use the `webfunc_getdata_t` version of the `webfunc` union. command results are written in a `webdatadef_t` structure instead of being printed |
| TELNETSRV_CMDFLAG_TELNETONLY | this command definition is only for the telnet server, web server is ignoring it |
| TELNETSRV_CMDFLAG_WEBSRVONLY | this command definition is only for the web server, telnet server is ignoring it |
| TELNETSRV_CMDFLAG_CONFEXEC | Currently only used by the web server, command execution has to be confirmed by user |
| TELNETSRV_CMDFLAG_NEEDPARAM | Currently only used by the web server, user must provide a parameter before command execution |
| TELNETSRV_CMDFLAG_WEBSRV_SETRETURNTBL | Currently only used by the web server, when a parameter modification requires a new page |
| TELNETSRV_CMDFLAG_AUTOUPDATE | Currently only used by the web server, the command can be rescheduled for result update |
[oai telnet server home](telnetsrv.md) [oai telnet server home](telnetsrv.md)
This diff is collapsed.
...@@ -48,19 +48,54 @@ ...@@ -48,19 +48,54 @@
#define CMDSTATUS_VARNOTFOUND 3 #define CMDSTATUS_VARNOTFOUND 3
#define CMDSTATUS_NOTFOUND 4 #define CMDSTATUS_NOTFOUND 4
/* definitions to store 2 dim table, used to store command results before */
/* displaying them either on console or web page */
#define TELNET_MAXLINE_NUM 100
#define TELNET_MAXCOL_NUM 10
typedef struct col {
char coltitle[TELNET_CMD_MAXSIZE];
unsigned int coltype;
} acol_t;
typedef struct line {
char *val[TELNET_MAXCOL_NUM];
} aline_t;
typedef struct webdatadef {
char tblname[TELNET_HELPSTR_SIZE];
int numlines;
int numcols;
acol_t columns[TELNET_MAXCOL_NUM];
aline_t lines[TELNET_MAXLINE_NUM];
} webdatadef_t;
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* structure to be used when adding a module to the telnet server */ /* structure to be used when adding a module to the telnet server */
/* This is the second parameter of the add_telnetcmd function, which can be used */ /* This is the second parameter of the add_telnetcmd function, which can be used */
/* to add a set of new command to the telnet server shell */ /* to add a set of new command to the telnet server shell */
typedef void(*telnet_printfunc_t)(const char* format, ...); typedef void(*telnet_printfunc_t)(const char* format, ...);
typedef int(*cmdfunc_t)(char*, int, telnet_printfunc_t prnt); typedef int(*cmdfunc_t)(char*, int, telnet_printfunc_t prnt);
typedef int (*webfunc_t)(char *cmdbuff, int debug, telnet_printfunc_t prnt, ...);
typedef int (*webfunc_getdata_t)(char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt);
typedef int(*qcmdfunc_t)(char*, int, telnet_printfunc_t prnt,void *arg); typedef int(*qcmdfunc_t)(char*, int, telnet_printfunc_t prnt,void *arg);
#define TELNETSRV_CMDFLAG_PUSHINTPOOLQ (1<<0) // ask the telnet server to push the command in a thread pool queue #define TELNETSRV_CMDFLAG_PUSHINTPOOLQ (1 << 0) // ask the telnet server to push the command in a thread pool queue
#define TELNETSRV_CMDFLAG_GETWEBDATA (1 << 1) // When called from web server, use the getdata variant of the function
#define TELNETSRV_CMDFLAG_TELNETONLY (1 << 2) // Command only for telnet client connections
#define TELNETSRV_CMDFLAG_WEBSRVONLY (1 << 3) // Command only for web server connections
#define TELNETSRV_CMDFLAG_CONFEXEC (1 << 4) // Ask for confirm before exec
#define TELNETSRV_CMDFLAG_GETWEBTBLDATA (1 << 8) // When called from web server, use the get table data variant of the function
#define TELNETSRV_CMDFLAG_NEEDPARAM (1 << 10) // websrv: The command needs a parameter
#define TELNETSRV_CMDFLAG_WEBSRV_SETRETURNTBL (1 << 11) // websrv: set callback returns a new table
#define TELNETSRV_CMDFLAG_AUTOUPDATE (1 << 12) // command can be re-submitted automatically for result update
typedef struct cmddef { typedef struct cmddef {
char cmdname[TELNET_CMD_MAXSIZE]; char cmdname[TELNET_CMD_MAXSIZE];
char helpstr[TELNET_HELPSTR_SIZE]; char helpstr[TELNET_HELPSTR_SIZE];
cmdfunc_t cmdfunc; cmdfunc_t cmdfunc;
union {
webfunc_t webfunc;
webfunc_getdata_t webfunc_getdata;
};
unsigned int cmdflags; unsigned int cmdflags;
void *qptr; void *qptr;
} telnetshell_cmddef_t; } telnetshell_cmddef_t;
...@@ -78,6 +113,8 @@ typedef struct telnetsrv_qmsg { ...@@ -78,6 +113,8 @@ typedef struct telnetsrv_qmsg {
/*structure to be used when adding a module to the telnet server */ /*structure to be used when adding a module to the telnet server */
/* This is the first parameter of the add_telnetcmd function, which can be used */ /* This is the first parameter of the add_telnetcmd function, which can be used */
/* to add a set of new variables which can be got/set from the telnet server shell */ /* to add a set of new variables which can be got/set from the telnet server shell */
/* var type: bits 0-3, type value (1 to 15)
* type modifier, bits 4-31 */
#define TELNET_VARTYPE_INT32 1 #define TELNET_VARTYPE_INT32 1
#define TELNET_VARTYPE_INT16 2 #define TELNET_VARTYPE_INT16 2
#define TELNET_VARTYPE_INT64 3 #define TELNET_VARTYPE_INT64 3
...@@ -85,9 +122,16 @@ typedef struct telnetsrv_qmsg { ...@@ -85,9 +122,16 @@ typedef struct telnetsrv_qmsg {
#define TELNET_VARTYPE_DOUBLE 5 #define TELNET_VARTYPE_DOUBLE 5
#define TELNET_VARTYPE_INT8 6 #define TELNET_VARTYPE_INT8 6
#define TELNET_VARTYPE_UINT 7 #define TELNET_VARTYPE_UINT 7
#define TELNET_CHECKVAL_RDONLY 16
#define TELNET_CHECKVAL_BOOL 32
#define TELNET_VAR_NEEDFREE 64
#define TELNET_CHECKVAL_LOGLVL 128
#define TELNET_CHECKVAL_SIMALGO 256
typedef struct variabledef { typedef struct variabledef {
char varname[TELNET_CMD_MAXSIZE]; char varname[TELNET_CMD_MAXSIZE];
char vartype; char vartype;
char checkval;
void *varvalptr; void *varvalptr;
} telnetshell_vardef_t; } telnetshell_vardef_t;
...@@ -113,6 +157,7 @@ typedef struct { ...@@ -113,6 +157,7 @@ typedef struct {
int priority; // server running priority int priority; // server running priority
char *histfile; // command history char *histfile; // command history
int histsize; // command history length int histsize; // command history length
char *logfile; // filename to use when redirecting output to file
int new_socket; // socket of the client connection int new_socket; // socket of the client connection
int logfilefd; // file id of the log file when log output is redirected to a file int logfilefd; // file id of the log file when log output is redirected to a file
int saved_stdout; // file id of the previous stdout, used to be able to restore original stdout int saved_stdout; // file id of the previous stdout, used to be able to restore original stdout
...@@ -145,14 +190,25 @@ VT escape sequence definition, for smarter display.... ...@@ -145,14 +190,25 @@ VT escape sequence definition, for smarter display....
#define STDFMT "\x1b[0m" #define STDFMT "\x1b[0m"
/*---------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------*/
#define NICE_MAX 19
#define NICE_MIN -20
#define TELNET_ADDCMD_FNAME "add_telnetcmd" #define TELNET_ADDCMD_FNAME "add_telnetcmd"
#define TELNET_POLLCMDQ_FNAME "poll_telnetcmdq" #define TELNET_POLLCMDQ_FNAME "poll_telnetcmdq"
#define TELNET_PUSHCMD_FNAME "telnet_pushcmd"
typedef int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *); typedef int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
typedef void(*poll_telnetcmdq_func_t)(void *qid,void *arg); typedef void(*poll_telnetcmdq_func_t)(void *qid,void *arg);
typedef void (*push_telnetcmd_func_t)(telnetshell_cmddef_t *cmd, char *cmdbuff, telnet_printfunc_t prnt);
#ifdef TELNETSERVERCODE #ifdef TELNETSERVERCODE
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd); int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd);
void set_sched(pthread_t tid, int pid,int priority); void set_sched(pthread_t tid, int pid,int priority);
void set_affinity(pthread_t tid, int pid, int coreid); void set_affinity(pthread_t tid, int pid, int coreid);
extern int get_phybsize(void); extern int get_phybsize(void);
#endif #endif
#ifdef WEBSERVERCODE
extern void telnet_pushcmd(telnetshell_cmddef_t *cmd, char *cmdbuff, telnet_printfunc_t prnt);
extern telnetsrv_params_t *get_telnetsrv_params(void);
extern char *telnet_getvarvalue(telnetshell_vardef_t *var, int varindex);
extern int telnet_setvarvalue(telnetshell_vardef_t *var, char *strval, telnet_printfunc_t prnt);
extern void telnetsrv_freetbldata(webdatadef_t *wdata);
#endif
#endif #endif
...@@ -32,6 +32,6 @@ endforeach() ...@@ -32,6 +32,6 @@ endforeach()
install(TARGETS telnetsrv DESTINATION bin) install(TARGETS telnetsrv DESTINATION bin)
if (EXISTS "${OPENAIR_BUILD_DIR}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/ran_build/build") if (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
install(TARGETS telnetsrv DESTINATION ${OPENAIR_BUILD_DIR}/ran_build/build) install(TARGETS telnetsrv DESTINATION ${OPENAIR_CMAKE}/ran_build/build)
endif (EXISTS "${OPENAIR_BUILD_DIR}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/ran_build/build") endif (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
...@@ -42,14 +42,17 @@ ...@@ -42,14 +42,17 @@
int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt); int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt);
telnetshell_cmddef_t loader_cmdarray[] = { telnetshell_cmddef_t loader_cmdarray[] = {
{"show","[params,modules]",loader_show_cmd}, {"show", "[params,modules]", loader_show_cmd, {(webfunc_t)loader_show_cmd}, 0, NULL},
{"","",NULL}, {"", "", NULL, {NULL}, 0, NULL},
}; };
/*-------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------*/
int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt) int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt)
{ {
if (buff == NULL) {
prnt("ERROR wrong loader SHOW command...\n");
return 0;
}
if (debug > 0) if (debug > 0)
prnt( "loader_show_cmd received %s\n",buff); prnt( "loader_show_cmd received %s\n",buff);
...@@ -58,21 +61,19 @@ int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt) ...@@ -58,21 +61,19 @@ int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt)
prnt( " Main executable build version: \"%s\"\n", loader_data.mainexec_buildversion); prnt( " Main executable build version: \"%s\"\n", loader_data.mainexec_buildversion);
prnt( " Default shared lib path: \"%s\"\n", loader_data.shlibpath); prnt( " Default shared lib path: \"%s\"\n", loader_data.shlibpath);
prnt( " Max number of shared lib : %i\n", loader_data.maxshlibs); prnt( " Max number of shared lib : %i\n", loader_data.maxshlibs);
} } else if (strcasestr(buff, "modules") != NULL || buff[0] == 0 || strcasestr(buff, "show") != NULL) {
else if (strcasestr(buff,"modules") != NULL) { prnt("%i shared lib have been dynamicaly loaded by the oai loader\n", loader_data.numshlibs);
prnt( "%i shared lib have been dynamicaly loaded by the oai loader\n", loader_data.numshlibs); for (int i = 0; i < loader_data.numshlibs; i++) {
for (int i=0 ; i<loader_data.numshlibs ; i++) { prnt(" Module %i: %s\n", i, loader_data.shlibs[i].name);
prnt( " Module %i: %s\n", i,loader_data.shlibs[i].name); prnt(" Shared library build version: \"%s\"\n", ((loader_data.shlibs[i].shlib_buildversion == NULL) ? "" : loader_data.shlibs[i].shlib_buildversion));
prnt( " Shared library build version: \"%s\"\n",((loader_data.shlibs[i].shlib_buildversion == NULL )?"":loader_data.shlibs[i].shlib_buildversion)); prnt(" Shared library path: \"%s\"\n", loader_data.shlibs[i].thisshlib_path);
prnt( " Shared library path: \"%s\"\n", loader_data.shlibs[i].thisshlib_path); prnt(" %i function pointers registered:\n", loader_data.shlibs[i].numfunc);
prnt( " %i function pointers registered:\n", loader_data.shlibs[i].numfunc); for (int j = 0; j < loader_data.shlibs[i].numfunc; j++) {
for(int j=0 ; j<loader_data.shlibs[i].numfunc;j++) { prnt(" function %i %s at %p\n", j, loader_data.shlibs[i].funcarray[j].fname, loader_data.shlibs[i].funcarray[j].fptr);
prnt( " function %i %s at %p\n",j,
loader_data.shlibs[i].funcarray[j].fname, loader_data.shlibs[i].funcarray[j].fptr);
}
} }
}
} else { } else {
prnt("%s: wrong loader command...\n",buff); prnt("%s: wrong loader command...\n", buff);
} }
return 0; return 0;
} }
......
...@@ -37,14 +37,11 @@ ...@@ -37,14 +37,11 @@
#include "common/utils/load_module_shlib.h" #include "common/utils/load_module_shlib.h"
telnetshell_vardef_t loader_globalvardef[] = {{"mainversion", TELNET_VARTYPE_STRING, TELNET_CHECKVAL_RDONLY, &(loader_data.mainexec_buildversion)},
telnetshell_vardef_t loader_globalvardef[] = { {"defpath", TELNET_VARTYPE_STRING, TELNET_CHECKVAL_RDONLY, &(loader_data.shlibpath)},
{"mainversion",TELNET_VARTYPE_STRING,&(loader_data.mainexec_buildversion)}, {"maxshlibs", TELNET_VARTYPE_INT32, TELNET_CHECKVAL_RDONLY, &(loader_data.maxshlibs)},
{"defpath",TELNET_VARTYPE_STRING,&(loader_data.shlibpath)}, {"numshlibs", TELNET_VARTYPE_INT32, TELNET_CHECKVAL_RDONLY, &(loader_data.numshlibs)},
{"maxshlibs",TELNET_VARTYPE_INT32,&(loader_data.maxshlibs)}, {"", 0, 0, NULL}};
{"numshlibs",TELNET_VARTYPE_INT32,&(loader_data.numshlibs)},
{"",0,NULL}
};
telnetshell_vardef_t *loader_modulesvardef; telnetshell_vardef_t *loader_modulesvardef;
extern void add_loader_cmds(void); extern void add_loader_cmds(void);
......
...@@ -91,9 +91,7 @@ telnetshell_cmddef_t measur_cmdarray[] = { ...@@ -91,9 +91,7 @@ telnetshell_cmddef_t measur_cmdarray[] = {
{"","",NULL} {"","",NULL}
}; };
telnetshell_vardef_t measur_vardef[] = { telnetshell_vardef_t measur_vardef[] = {{"", 0, 0, NULL}};
{"",0,NULL}
};
/* function to be implemented in any telnetsrv_xxx_measurements.c sources /* function to be implemented in any telnetsrv_xxx_measurements.c sources
to allow common measurment code to access measurments data */ to allow common measurment code to access measurments data */
extern int get_measurgroups(telnet_measurgroupdef_t **measurgroups); extern int get_measurgroups(telnet_measurgroupdef_t **measurgroups);
......
...@@ -44,17 +44,7 @@ ...@@ -44,17 +44,7 @@
#define TELNETVAR_PHYCC0 0 #define TELNETVAR_PHYCC0 0
#define TELNETVAR_PHYCC1 1 #define TELNETVAR_PHYCC1 1
telnetshell_vardef_t phy_vardef[] = { telnetshell_vardef_t phy_vardef[] = {{"", 0, 0, NULL}};
//{"iqmax",TELNET_VARTYPE_INT16,NULL},
//{"iqmin",TELNET_VARTYPE_INT16,NULL},
//{"loglvl",TELNET_VARTYPE_INT32,NULL},
//{"sndslp",TELNET_VARTYPE_INT32,NULL},
//{"rxrescale",TELNET_VARTYPE_INT32,NULL},
//{"txshift",TELNET_VARTYPE_INT32,NULL},
//{"rachemin",TELNET_VARTYPE_INT32,NULL},
//{"rachdmax",TELNET_VARTYPE_INT32,NULL},
{"",0,NULL}
};
#else #else
......
This diff is collapsed.
...@@ -44,11 +44,12 @@ ...@@ -44,11 +44,12 @@
extern int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt); extern int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt);
extern int proccmd_thread(char *buf, int debug, telnet_printfunc_t prnt); extern int proccmd_thread(char *buf, int debug, telnet_printfunc_t prnt);
extern int proccmd_exit(char *buf, int debug, telnet_printfunc_t prnt); extern int proccmd_exit(char *buf, int debug, telnet_printfunc_t prnt);
extern int proccmd_restart(char *buf, int debug, telnet_printfunc_t prnt);
extern int proccmd_log(char *buf, int debug, telnet_printfunc_t prnt); extern int proccmd_log(char *buf, int debug, telnet_printfunc_t prnt);
telnetshell_vardef_t proc_vardef[] = { extern int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt);
{"",0,NULL} telnetshell_vardef_t proc_vardef[] = {{"", 0, 0, NULL}};
}; #define PROCCMD_LOG_HELP_STRING \
#define PROCCMD_LOG_HELP_STRING " log sub commands: \n\ " log sub commands: \n\
show: display current log configuration \n\ show: display current log configuration \n\
online, noonline: enable or disable console logs \n\ online, noonline: enable or disable console logs \n\
enable, disable id1-id2: enable or disable logs for components index id1 to id2 \n\ enable, disable id1-id2: enable or disable logs for components index id1 to id2 \n\
...@@ -60,24 +61,32 @@ telnetshell_vardef_t proc_vardef[] = { ...@@ -60,24 +61,32 @@ telnetshell_vardef_t proc_vardef[] = {
print_<opt> <0|1> disable or enable the \"opt\" log option, use the show command to get \ print_<opt> <0|1> disable or enable the \"opt\" log option, use the show command to get \
the available options\n\ the available options\n\
dump_<mod> debug_<mod > disable or enable the debug file generation or debug code\ dump_<mod> debug_<mod > disable or enable the debug file generation or debug code\
for \"mod\" module. use the show command to get the available modules\n" for \"mod\" module. use the show command to get the available modules\n"
#define PROCCMD_THREAD_HELP_STRING " thread sub commands: \n\ #define PROCCMD_THREAD_HELP_STRING \
" thread sub commands: \n\
<thread id> aff <core> : set affinity of thread <thread id> to core <core> \n\ <thread id> aff <core> : set affinity of thread <thread id> to core <core> \n\
<thread id> prio <prio> : set scheduling parameters for thread <thread id> \n\ <thread id> prio <prio> : set scheduling parameters for thread <thread id> \n\
if prio < -20: linux scheduling policy set to FIFO, \n\ -100 < prio < 0: linux scheduling policy set to FIFO, priority -prio, \n\
with priority = -20 - prio \n\ -200 < prio < -100: linux scheduling policy set to RR, priority -(prio+100), \n\
if prio > 19: linux scheduling policy set to OTHER, \n\ 0 <= prio < 40: linux scheduling policy set to NORMAL, nice value prio-20 \n\
with priority (nice value) = prio \n\ 40 <= prio < 80: linux scheduling policy set to BATCH, nice value prio-60 \n\
prio >=80: linux scheduling policy set to IDLE \n\
use \"softmodem show thread\" to get <thread id> \n" use \"softmodem show thread\" to get <thread id> \n"
telnetshell_cmddef_t proc_cmdarray[] = { telnetshell_cmddef_t proc_cmdarray[] = {
{"show","loglvl|thread|config", proccmd_show}, {"show", "loglvl|thread|config", proccmd_show, {(webfunc_t)proccmd_websrv_getdata}, TELNETSRV_CMDFLAG_TELNETONLY, NULL},
{"log","(enter help for details)", proccmd_log}, {"log", "(enter help for details)", proccmd_log, {NULL}, TELNETSRV_CMDFLAG_TELNETONLY, NULL},
{"thread","(enter help for details)", proccmd_thread}, {"show loglvl", "", proccmd_log, {(webfunc_t)proccmd_websrv_getdata}, TELNETSRV_CMDFLAG_WEBSRVONLY | TELNETSRV_CMDFLAG_GETWEBTBLDATA, NULL},
{"exit","", proccmd_exit}, {"show logopt", "", proccmd_log, {(webfunc_t)proccmd_websrv_getdata}, TELNETSRV_CMDFLAG_WEBSRVONLY | TELNETSRV_CMDFLAG_GETWEBTBLDATA, NULL},
{"","",NULL}, {"show dbgopt", "", proccmd_log, {(webfunc_t)proccmd_websrv_getdata}, TELNETSRV_CMDFLAG_WEBSRVONLY | TELNETSRV_CMDFLAG_GETWEBTBLDATA, NULL},
{"show config", "", proccmd_show, {(webfunc_t)proccmd_show}, TELNETSRV_CMDFLAG_WEBSRVONLY, NULL},
{"show thread", "", proccmd_thread, {(webfunc_t)proccmd_show}, TELNETSRV_CMDFLAG_WEBSRVONLY | TELNETSRV_CMDFLAG_AUTOUPDATE, NULL},
{"thread", "(enter help for details)", proccmd_thread, {NULL}, TELNETSRV_CMDFLAG_TELNETONLY, NULL},
{"show threadsched", "", proccmd_show, {(webfunc_t)proccmd_websrv_getdata}, TELNETSRV_CMDFLAG_WEBSRVONLY | TELNETSRV_CMDFLAG_GETWEBTBLDATA, NULL},
{"exit", "", proccmd_exit, {NULL}, TELNETSRV_CMDFLAG_CONFEXEC, NULL},
{"restart", "", proccmd_restart, {NULL}, TELNETSRV_CMDFLAG_CONFEXEC, NULL},
{"", "", NULL},
}; };
#else #else
extern void add_proccmd_cmds(void); extern void add_proccmd_cmds(void);
......
The oai web server is an optional monitoring and debugging tool. Purpose is to give access to oai softmodems functionalities via a web interface. In this first release interface to the telnet server commands and to the softscope are delivered.
* [Using the web server](webserverusage.md)
* [enhancing the webserver](webserverdevcmd.md)
* [web server architecture ](webserverarch.md)
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
# web server interface principles
The web server interface is implemented in two parts: a back-end, included in the softmodem process and a front-end which is a browser application.
The oai web server back-end is implemented in a shared library to be loaded by the [oai shared library loader](loader) when `--websrv` option is specified on the command line. `libwebsrv.so ` code is common to all oai softmodem executables, the current release has been tested with the nr UE and the gNB.
The front-end is an [angular](https://angular.io/docs) application. After being built and installed it is delivered to browsers by the back-end at connection time.
Front-end and back-end communicate via http request - http response transactions, including `json` body. these `json` interfaces are defined in the [frontend/src/app/api/XXXX.api.ts](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/websrv/src/frontend/src/app/api/) files. Back-end decapsulates the http requests it receives, looking for the `json`body to determine the requested information or command. Then the back-end builds a http response, with a `json`body encapsulating the requested information or the requested command result.
When unsolicited communication, from back-end to front-end is necessary, a [websocket](https://www.rfc-editor.org/rfc/rfc6455) link is opened. This is the case for the softscope interface.
# web server interface source files
web server source files are located in [common/utils/websrv](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/websrv)
1. back-end files are directly located in the `websrv` repository
1. The [frontend/src](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/websrv/src/frontend) sub-directory contains the angular front-end source tree.
1. [common/utils/websrv/helpfiles](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/websrv/helpfiles) contains files delivered to the front-end to respond to help requests.
[oai web server interface home](websrv.md)
\ No newline at end of file
This diff is collapsed.
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"common/utils/websrv/frontend/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
\ No newline at end of file
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
/artifacts
/builds
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
config.toml
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false,
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
"softmodemngx": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/softmodem-ngx",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/purple-green.css",
"src/styles.css"
],
"scripts": [],
"allowedCommonJsDependencies": [
"@firebase/auth",
"firebase"
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "1.5mb",
"maximumError": "2mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "softmodemngx:build:production"
},
"development": {
"browserTarget": "softmodemngx:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "softmodemngx:build"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
}
}
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const {SpecReporter, StacktraceOption} = require("jasmine-spec-reporter");
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout : 11000,
specs : [ "./src/**/*.e2e-spec.ts" ],
capabilities : {browserName : "chrome", chromeOptions : {args : [ "--headless", "--no-sandbox" ]}},
directConnect : true,
SELENIUM_PROMISE_MANAGER : true,
baseUrl : "http://localhost:4200/",
framework : "jasmine",
jasmineNodeOpts : {showColors : true, defaultTimeoutInterval : 30000, print : function() {}},
onPrepare() {
require("ts-node").register({project : require("path").join(__dirname, "./tsconfig.json")});
jasmine.getEnv().addReporter(new SpecReporter({spec : {displayStacktrace : StacktraceOption.PRETTY}}));
}
};
\ No newline at end of file
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const {SpecReporter, StacktraceOption} = require("jasmine-spec-reporter");
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout : 11000,
specs : [ "./src/**/*.e2e-spec.ts" ],
capabilities : {browserName : "chrome"},
directConnect : true,
SELENIUM_PROMISE_MANAGER : false,
baseUrl : "http://localhost:4200/",
framework : "jasmine",
jasmineNodeOpts : {showColors : true, defaultTimeoutInterval : 30000, print : function() {}},
onPrepare() {
require("ts-node").register({project : require("path").join(__dirname, "./tsconfig.json")});
jasmine.getEnv().addReporter(new SpecReporter({spec : {displayStacktrace : StacktraceOption.PRETTY}}));
}
};
import {browser, logging} from "protractor";
import {AppPage} from "./app.po";
describe("workspace-project App", () => {
let page: AppPage;
beforeEach(() => { page = new AppPage(); });
// it('should display welcome message', async () => {
// await page.navigateTo();
// expect(await page.getTitleText()).toEqual('example app is running!');
// });
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level : logging.Level.SEVERE,
} as logging.Entry));
});
});
import {browser, by, element} from "protractor";
export class AppPage {
async navigateTo(): Promise<unknown>
{
return browser.get(browser.baseUrl);
}
async getTitleText(): Promise<string>
{
return element(by.css("app-root .content span")).getText();
}
}
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": ["jasmine", "node"]
}
}
This diff is collapsed.
{
"name": "softmodemngx",
"version": "2.0.0",
"scripts": {
"lint": "ng lint",
"build": "ng build",
"dev": "ng serve --configuration=development",
"prod": "ng serve --configuration=production"
},
"private": true,
"dependencies": {
"@angular-slider/ngx-slider": "^2.0.4",
"@angular/animations": "^14.1.0",
"@angular/cdk": "^14.1.0",
"@angular/common": "^14.1.0",
"@angular/compiler": "^14.1.0",
"@angular/core": "^14.1.0",
"@angular/flex-layout": "^14.0.0-beta.40",
"@angular/forms": "^14.1.0",
"@angular/material": "^14.1.0",
"@angular/platform-browser": "^14.1.0",
"@angular/platform-browser-dynamic": "^14.1.0",
"@angular/router": "^14.1.0",
"chart.js": "^3.8.2",
"moment": "^2.29.3",
"ng2-charts": "^4.0.0",
"rxjs": "^6.6.6",
"tslib": "^2.0.0",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1401.0",
"@angular-devkit/build-angular": "^14.1.0",
"@angular-eslint/builder": "14.0.2",
"@angular-eslint/eslint-plugin": "14.0.2",
"@angular-eslint/eslint-plugin-template": "14.0.2",
"@angular-eslint/schematics": "14.0.2",
"@angular-eslint/template-parser": "14.0.2",
"@angular/cli": "^14.1.0",
"@angular/compiler-cli": "^14.1.0",
"@angular/language-service": "^14.1.0",
"@types/node": "^12.20.23",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"fs-extra": "^10.0.0",
"fuzzy": "^0.1.3",
"husky": "^5.1.3",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"jasmine-core": "~3.7.1",
"jasmine-spec-reporter": "~5.0.0",
"jsonc-parser": "^3.0.0",
"open": "^7.0.3",
"ts-node": "^8.10.2",
"tslint-angular": "^3.0.3",
"typescript": "~4.6.4"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged && ng lint && ng test",
"pre-push": "ng build --aot true"
}
}
}
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 ?
}
export interface IModule {
name: string;
}
export enum ILogLvl {
error = "error",
warn = "warn",
analysis = "analysis",
info = "info",
debug = "debug",
trace = "trace"
}
export enum ILogOutput {
stdout = "stdout",
telnet = "telnet",
web = "web",
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
}
export interface IVariable {
name: string;
value: string;
type: IArgType;
modifiable: boolean; // set command ?
}
export interface ICommand {
name: string;
confirm?: string;
question?: IQuestion;
param?: IVariable;
options?: ICommandOptions[];
}
export interface ITable {
columns: IColumn[];
rows: string[];
}
export interface IQuestion {
display: string;
pname: string;
type: IArgType;
}
export interface IResp {
display: string[], table?: ITable
}
export interface IParam {
value: string, col: IColumn
}
export interface IColumn { // should use IVariable ?
name: string;
type: IArgType;
modifiable: boolean; // set command ?
help: boolean; // is help available
}
export interface IRow {
params: IParam[], rawIndex: number, cmdName: string,
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",
})
export class CommandsApi {
constructor(private httpClient: HttpClient)
{
}
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/");
public readCommands$ = (moduleName: string) => this.httpClient.get<ICommand[]>(environment.backend + route + moduleName + "/commands/");
public runCommand$ = (command: ICommand, moduleName: string) => this.httpClient.post<IResp>(environment.backend + route + moduleName + "/commands/", command);
public setCmdVariable$ = (variable: IInfo, moduleName: string) => this.httpClient.post<IResp>(environment.backend + route + moduleName + "/variables/", variable);
public setCmdParams$ = (row: IRow, moduleName: string) => this.httpClient.post<IResp>(environment.backend + route + moduleName + "/set/", row);
}
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";
export interface HelpRequest {
module: string;
command: string;
object: string;
}
export interface HelpResp {
text: string;
}
const hlproute = "oaisoftmodem/helpfiles/";
@Injectable({
providedIn : "root",
})
export class HelpApi {
constructor(private httpClient: HttpClient)
{
}
public getHelp$ = (req: HelpRequest) => this.httpClient.get<HelpResp>(environment.backend + hlproute + req.module + "_" + req.command + "_" + req.object + ".html", {observe : "response"});
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 : ""; }),
)); // pipe
}
}
import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {environment} from "src/environments/environment";
export enum IScopeGraphType {
IQs = "IQs",
LLR = "LLR",
WF = "WF",
TRESP = "TRESP",
UNSUP = "UNSUP"
}
export interface IGraphDesc {
title: string;
type: IScopeGraphType;
id: number;
srvidx: number;
}
export interface IScopeDesc {
title: string;
graphs: IGraphDesc[];
}
export interface IScopeCmd {
name: string;
graphid?: number; // the graph srvidx
value: string;
}
export interface ISigDesc {
target_id: number;
antenna_id: number;
}
const route = "oaisoftmodem/scopectrl/";
@Injectable({
providedIn : "root",
})
export class ScopeApi {
constructor(private httpClient: HttpClient)
{
}
public getScopeInfos$ = () => this.httpClient.get<IScopeDesc>(environment.backend + route);
public setScopeParams$ = (cmd: IScopeCmd) => this.httpClient.post(environment.backend + route, cmd, {observe : "response"});
}
import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
import {AppComponent} from "./app.component";
import {CommandsComponent} from "./components/commands/commands.component";
const routes: Routes = [
{path : "", redirectTo : "/websrv", pathMatch : "full"},
{path : "websrv", component : AppComponent},
{path : "**", redirectTo : ""},
];
@NgModule({
imports : [ RouterModule.forRoot(routes, {relativeLinkResolution : "legacy"}) ],
exports : [ RouterModule ],
})
export class AppRoutingModule {
}
.mat-tab-group {
margin-bottom: 10px;
}
.mat-ink-bar{
height: 8px !important;
}
.mat-tab-label-active
{
color: #000000 !important;
}
<mat-tab-group backgroundColor="primary" color="accent">
<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
import {Component} from "@angular/core";
import {MatTabsModule} from "@angular/material/tabs";
@Component({
selector : "app-root",
templateUrl : "./app.component.html",
styleUrls : [ "./app.component.css" ],
})
export class AppComponent {
title = "oai softmodem";
isscopeavailable = false;
scopelabel = "";
constructor()
{
this.scopelabel = "";
this.isscopeavailable = false;
}
onScopeEnabled(enabled: boolean)
{
this.isscopeavailable = enabled;
this.scopelabel = enabled ? "Scope" : "";
}
}
import {DragDropModule} from "@angular/cdk/drag-drop";
import {HttpClientModule} from "@angular/common/http";
import {NgModule} from "@angular/core";
import {FlexLayoutModule} from "@angular/flex-layout";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {MatButtonModule} from "@angular/material/button";
import {MatCardModule} from "@angular/material/card";
import {MatChipsModule} from "@angular/material/chips";
import {MatDialogModule} from "@angular/material/dialog";
import {MatFormFieldModule} from "@angular/material/form-field";
import {MatGridListModule} from "@angular/material/grid-list";
import {MatInputModule} from "@angular/material/input";
import {MatListModule} from "@angular/material/list";
import {MatProgressSpinnerModule} from "@angular/material/progress-spinner";
import {MatSelectModule} from "@angular/material/select";
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
import {MatSliderModule} from "@angular/material/slider";
import {MatSnackBarModule} from "@angular/material/snack-bar";
import {MatTableModule} from "@angular/material/table";
import {MatTabsModule} from "@angular/material/tabs";
import {MatToolbarModule} from "@angular/material/toolbar";
import {MatTooltipModule} from "@angular/material/tooltip";
import {BrowserModule} from "@angular/platform-browser";
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 {AppRoutingModule} from "./app-routing.module";
import {AppComponent} from "./app.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 ],
imports : [
BrowserModule, AppRoutingModule, FormsModule, ReactiveFormsModule, BrowserAnimationsModule, HttpClientModule, MatButtonModule, FlexLayoutModule, MatDialogModule, DragDropModule,
MatSliderModule, MatFormFieldModule, MatInputModule, MatChipsModule, MatProgressSpinnerModule, MatToolbarModule, MatTableModule, MatListModule, MatSelectModule, MatSnackBarModule,
MatSlideToggleModule, MatGridListModule, MatCardModule, MatTabsModule, MatTooltipModule, NgChartsModule,
],
providers : [
// services
LoadingService,
WebSocketService,
// api
CommandsApi,
ScopeApi,
// interceptors
InterceptorProviders,
],
bootstrap : [ AppComponent ]
})
export class AppModule {
}
<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>
<mat-grid-tile [colspan]="1" [rowspan]="2">
<mat-card class="dashboard-card">
<mat-card-header>
<mat-card-title>Softmodem commands</mat-card-title>
</mat-card-header>
<mat-card-content class="dashboard-card-content">
<div class="spaceddiv" *ngIf="modules$ | async as modules" fxLaypout="row">
<mat-form-field>
<mat-label>Module</mat-label>
<mat-select (selectionChange)="onModuleSelect($event.value)" [(value)]="selectedModule">
<mat-option *ngFor="let module of modules" [value]="module"> {{ module.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div *ngIf="cmds$ | async as cmds">
<div *ngIf="cmds.length">
<mat-chip-list>
<mat-chip *ngFor="let cmd of cmds" (click)="onCmdSubmit(cmd)" [matTooltip]="cmd.hlp_cmd" > {{cmd.nameFC.value}}
</mat-chip>
</mat-chip-list>
</div>
</div>
</mat-card-content>
</mat-card>
</mat-grid-tile>
<mat-grid-tile *ngIf="vars$ | async as vars" [colspan]="1" [rowspan]="4">
<mat-card *ngIf="vars.length" class="dashboard-card">
<mat-card-header>
<mat-card-title>{{ selectedModule!.name }} variables</mat-card-title>
</mat-card-header>
<mat-card-content class="dashboard-card-content">
<div class="spaceddiv" *ngFor="let variable of vars">
<mat-form-field class="scrollablefield">
<mat-label>{{ variable.nameFC.value }}</mat-label>
<input matInput [formControl]="variable.valueFC" [readonly]="!variable.modifiableFC.value" />
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!variable.modifiableFC.value"
(click)="onVarsubmit(variable)">
set
</button>
</div>
</mat-card-content>
</mat-card>
</mat-grid-tile>
<mat-grid-tile *ngIf="(rows$ | async)?.length" [colspan]="1" [rowspan]="4">
<mat-card class="dashboard-card">
<mat-card-header>
<mat-card-title>{{ selectedModule!.name }} {{ selectedCmd!.name }} {{ selectedCmd!.param?.value}}</mat-card-title>
</mat-card-header>
<mat-card-content class="dashboard-card-content">
<div >
<mat-table mat-table [dataSource]="rows$" multiTemplateDataRows class="mat-elevation-z8">
<div class="TableRowdiv" *ngFor="let col of columns; index as colIndex" matColumnDef="{{col.name}}">
<mat-header-cell *matHeaderCellDef fxLayoutAlign="start center">
<div [matTooltip]="hlp_cc[colIndex]">
<h4>{{ col.name }}</h4>
</div>
</mat-header-cell>
<mat-cell *matCellDef="let row">
<div [ngSwitch]="col.type" [formGroup]="row" fxLayoutAlign="start center">
<mat-slide-toggle *ngSwitchCase="IArgType.boolean" [formControl]="row.paramsCtrls[colIndex].valueFC"
[checked]="row.paramsCtrls[colIndex].valueFC.value">
</mat-slide-toggle>
<mat-list-item role="listitem">
<mat-form-field *ngSwitchCase="IArgType.loglvl">
<mat-select [formControl]="row.paramsCtrls[colIndex].valueFC"
[(value)]="row.paramsCtrls[colIndex].valueFC.value">
<mat-option *ngFor="let level of logLvlValues" [value]="level"> {{ level }}
</mat-option>
</mat-select>
</mat-form-field>
</mat-list-item>
<div *ngSwitchDefault>
<mat-form-field>
<input matInput [formControl]="row.paramsCtrls[colIndex].valueFC" [readonly]="!col.modifiable" />
</mat-form-field>
</div>
</div>
</mat-cell>
</div>
<div matColumnDef="button">
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
<mat-cell *matCellDef="let row" fxLayoutAlign="center">
<button class="TableBtn" mat-raised-button color="primary" (click)="onParamSubmit(row)" [disabled]="row.pristine"> set
</button>
</mat-cell>
</div>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
</div>
</mat-card-content>
</mat-card>
</mat-grid-tile>
</mat-grid-list>
</div>
.spaceddiv {
height: 45px;
width: 40vw;
display: flex;
justify-content: space-between;
margin: 0 auto;
padding: 10px 0;
}
.TableRowdiv {
height: 38px;
display: flex;
/* justify-content: space-between;*/
margin: 2px;
width: 95%;
.item:nth-child(1n){
width: 10%;
}
.item {
width: 4%;
margin: 10px;
}
}
.TableBtn {
height: 25px;
width: 35p;
display:flex;
padding-bottom:8px;
}
.TableText {
display: flex;
width: 8em;
overflow-x: auto;
}
.scrollablefield {
width: 80%;
height: 20px;
.mat-input-element {
overflow-x: auto;
}
}
.mat-card {
height: 95%;
overflow-y: auto;
overflow-x: scroll;
}
.status {
color: green;
font-weight: 800;
}
.ng-invalid .status {
color: red;
}
.grid-container {
margin: 20px;
}
.dashboard-card {
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
}
.more-button {
position: absolute;
top: 5px;
right: 10px;
}
.dashboard-card-content {
text-align: center;
}
<h3>{{ data.title }}</h3>
<div fxLayoutGap="10px" mat-dialog-actions fxLayout="row" fxLayoutAlign="center start">
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Ok</button>
<button mat-button (click)="onNoClick()">Cancel</button>
</div>
\ No newline at end of file
/* eslint-disable @typescript-eslint/naming-convention */
import {Component, Inject} from "@angular/core";
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
@Component({selector : "app-confirm", templateUrl : "./confirm.component.html", styleUrls : [ "./confirm.component.css" ]})
export class ConfirmDialogComponent {
constructor(public dialogRef: MatDialogRef<void>, @Inject(MAT_DIALOG_DATA) public data: any)
{
}
onNoClick()
{
this.dialogRef.close();
}
}
/* icon that can be used to drag a dialog */
::ng-deep.dialogdrag-handle {
top: 1px;
left: 1px;
color: #ccc;
cursor: move;
width: 24px;
height: 24px;
}
/* make dialog for command response using the display field scrollable */
::ng-deep.cmdRespDialog {
resize: both;
overflow: scroll;
}
/* make only the dialog for command response using the display field movable */
/* (hide the close button and the drag icon) */
::ng-deep.varRespDialog #dialogclose {
display:none ;
}
::ng-deep.varRespDialog #dialogdrag {
display:none;
}
::ng-deep.errRespDialog #dialogclose {
display:none ;
}
::ng-deep.errRespDialog #dialogdrag {
display:none;
}
<div id="dialogdrag" cdkDrag cdkDragRootElement=".cdk-overlay-pane">
<div class="dialogdrag-handle" cdkDragHandle>
<svg width="24px" fill="currentColor" viewBox="0 0 24 24">
<path
d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z">
</path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>
</div>
</div>
<h3> {{ data.title }}</h3>
<pre [innerHTML]="data.body"></pre>
<mat-dialog-actions fxLayoutAlign="end">
<button id="dialogclose" mat-button mat-dialog-close>Close</button>
<button id="dialogupdate" mat-button (click)="onUpdate(data.control)"
*ngIf="data.updatable">{{data.control.updbtnname}}</button>
</mat-dialog-actions>
\ No newline at end of file
import {Component, ElementRef, Inject, OnInit, ViewChild} from "@angular/core";
import {MAT_DIALOG_DATA} from "@angular/material/dialog";
import {CmdCtrl} from "src/app/controls/cmd.control";
import {DialogService} from "src/app/services/dialog.service";
@Component({
selector : "app-dialog",
templateUrl : "./dialog.component.html",
styleUrls : [ "./dialog.component.css" ],
})
export class DialogComponent {
constructor(@Inject(MAT_DIALOG_DATA) public data: any)
{
}
onUpdate(control: CmdCtrl)
{
if (control.updbtnname === "Stop update") {
control.stopUpdate();
} else {
control.startUpdate();
}
}
}
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.
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.
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