Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Upgrade of ASN xapp definitions for the ns-O-RAN version of the RIC #12

Draft
wants to merge 1 commit into
base: ns-o-ran
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
# limitations under the License.
#==================================================================================

FROM wineslab/o-ran-sc-bldr-ubuntu18-c-go:9-u18.04 as buildenv
FROM ubuntu:latest as buildenv
ARG log_level_e2sim=2
# log_level_e2sim = 0 -> LOG_LEVEL_UNCOND 0
# log_level_e2sim = 1 -> LOG_LEVEL_ERROR 1
# log_level_e2sim = 2 -> LOG_LEVEL_INFO 2
# log_level_e2sim = 3 -> LOG_LEVEL_DEBUG 3

# RUN echo nameserver 8.8.8.8 > /etc/resolv.conf && echo nameserver 8.8.4.4 >> /etc/resolv.conf

# Install E2sim
RUN mkdir -p /workspace
RUN apt-get update && apt-get install -y build-essential git cmake libsctp-dev autoconf automake libtool bison flex libboost-all-dev
Expand All @@ -41,7 +43,7 @@ RUN ldconfig
WORKDIR /workspace

# Install ns-3
RUN apt-get install -y g++ python3 qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
RUN apt-get install -y g++ python3

RUN git clone -b release https://github.com/wineslab/ns-o-ran-ns3-mmwave /workspace/ns3-mmwave-oran
RUN git clone -b master https://github.com/o-ran-sc/sim-ns3-o-ran-e2 /workspace/ns3-mmwave-oran/contrib/oran-interface
Expand Down
30 changes: 15 additions & 15 deletions setup/sample-xapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,42 +61,43 @@ RUN apt-get update \
&& apt-get install -y \
python3 \
python3-pip \
# Install mdclog using debian package hosted at packagecloud.io
&& wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_${MDC_VER}_amd64.deb/download.deb \
gdb
# Install mdclog using debian package hosted at packagecloud.io
RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_${MDC_VER}_amd64.deb/download.deb \
&& wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog-dev_${MDC_VER}_amd64.deb/download.deb \
&& dpkg -i mdclog_${MDC_VER}_amd64.deb \
&& dpkg -i mdclog-dev_${MDC_VER}_amd64.deb \
&& rm mdclog_${MDC_VER}_amd64.deb mdclog-dev_${MDC_VER}_amd64.deb \
&& rm mdclog_${MDC_VER}_amd64.deb mdclog-dev_${MDC_VER}_amd64.deb
# Install RMR using debian package hosted at packagecloud.io
&& wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMR_VER}_amd64.deb/download.deb \
RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMR_VER}_amd64.deb/download.deb \
&& wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMR_VER}_amd64.deb/download.deb \
&& dpkg -i rmr_${RMR_VER}_amd64.deb \
&& dpkg -i rmr-dev_${RMR_VER}_amd64.deb \
&& rm rmr_${RMR_VER}_amd64.deb rmr-dev_${RMR_VER}_amd64.deb \
&& rm rmr_${RMR_VER}_amd64.deb rmr-dev_${RMR_VER}_amd64.deb
# Install RNIB libraries
&& wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rnib_${RNIB_VER}_all.deb/download.deb \
RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rnib_${RNIB_VER}_all.deb/download.deb \
&& dpkg -i rnib_${RNIB_VER}_all.deb \
&& rm rnib_${RNIB_VER}_all.deb \
&& rm rnib_${RNIB_VER}_all.deb
# Install dbaas
&& cd ${STAGE_DIR} \
RUN cd ${STAGE_DIR} \
&& git clone https://gerrit.o-ran-sc.org/r/ric-plt/dbaas \
&& cd dbaas/redismodule \
&& ./autogen.sh \
&& ./configure \
&& make -j ${nproc} all \
&& make install \
&& rm -Rf ${STAGE_DIR}/dbaas \
&& rm -Rf ${STAGE_DIR}/dbaas
# Install sdl
&& cd ${STAGE_DIR} \
RUN cd ${STAGE_DIR} \
&& git clone https://gerrit.o-ran-sc.org/r/ric-plt/sdl \
&& cd sdl \
&& ./autogen.sh \
&& ./configure \
&& make -j ${nproc} all \
&& make install \
&& rm -Rf ${STAGE_DIR}/sdl \
&& rm -Rf ${STAGE_DIR}/sdl
# Install rapidjson
&& cd ${STAGE_DIR} \
RUN cd ${STAGE_DIR} \
&& git clone https://github.com/Tencent/rapidjson \
&& cd rapidjson \
&& mkdir build \
Expand All @@ -105,14 +106,13 @@ RUN apt-get update \
&& make -j ${nproc} \
&& make install \
&& cd ${STAGE_DIR} \
&& rm -rf rapidjson \
&& rm -rf rapidjson
##-----------------------------------
# Now install the program
#------------------------------------
# build connector
&& export CPATH=$CPATH:/usr/local/include \
RUN export CPATH=$CPATH:/usr/local/include \
&& cd src \
&& make clean \
&& make -j ${nproc} \
&& make install \
&& ldconfig \
Expand Down
6 changes: 6 additions & 0 deletions setup/xapp-sm-connector/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions setup/xapp-sm-connector/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions setup/xapp-sm-connector/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 64 additions & 0 deletions setup/xapp-sm-connector/asn1c_defs/ARP.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2SM-KPM-IEs"
* found in "E2SM-KPM-v02.00.03.asn"
* `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example -D E2SM-KPM-v02.00.03`
*/

#include "ARP.h"

int
ARP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;

if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}

value = *(const long *)sptr;

if((value >= 1 && value <= 15)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}

/*
* This type is implemented using NativeInteger,
* so here we adjust the DEF accordingly.
*/
static asn_oer_constraints_t asn_OER_type_ARP_constr_1 CC_NOTUSED = {
{ 0, 0 },
-1};
asn_per_constraints_t asn_PER_type_ARP_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 15 } /* (1..15,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const ber_tlv_tag_t asn_DEF_ARP_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_ARP = {
"ARP",
"ARP",
&asn_OP_NativeInteger,
asn_DEF_ARP_tags_1,
sizeof(asn_DEF_ARP_tags_1)
/sizeof(asn_DEF_ARP_tags_1[0]), /* 1 */
asn_DEF_ARP_tags_1, /* Same as above */
sizeof(asn_DEF_ARP_tags_1)
/sizeof(asn_DEF_ARP_tags_1[0]), /* 1 */
{ &asn_OER_type_ARP_constr_1, &asn_PER_type_ARP_constr_1, ARP_constraint },
0, 0, /* No members */
0 /* No specifics */
};

46 changes: 46 additions & 0 deletions setup/xapp-sm-connector/asn1c_defs/ARP.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2SM-KPM-IEs"
* found in "E2SM-KPM-v02.00.03.asn"
* `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example -D E2SM-KPM-v02.00.03`
*/

#ifndef _ARP_H_
#define _ARP_H_


#include <asn_application.h>

/* Including external dependencies */
#include <NativeInteger.h>

#ifdef __cplusplus
extern "C" {
#endif

/* ARP */
typedef long ARP_t;

/* Implementation */
extern asn_per_constraints_t asn_PER_type_ARP_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_ARP;
asn_struct_free_f ARP_free;
asn_struct_print_f ARP_print;
asn_constr_check_f ARP_constraint;
ber_type_decoder_f ARP_decode_ber;
der_type_encoder_f ARP_encode_der;
xer_type_decoder_f ARP_decode_xer;
xer_type_encoder_f ARP_encode_xer;
oer_type_decoder_f ARP_decode_oer;
oer_type_encoder_f ARP_encode_oer;
per_type_decoder_f ARP_decode_uper;
per_type_encoder_f ARP_encode_uper;
per_type_decoder_f ARP_decode_aper;
per_type_encoder_f ARP_encode_aper;

#ifdef __cplusplus
}
#endif

#endif /* _ARP_H_ */
#include <asn_internal.h>
Loading