X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Frnib.rst;fp=docs%2Frnib.rst;h=ec55bff4a1cb128bb14a31c8568737652e3a734e;hb=750eb5b040db75fae264da5e422038e08e5da345;hp=0000000000000000000000000000000000000000;hpb=0d52cac0302f98defe240ae646431d8b9c6bda5b;p=ric-plt%2Fxapp-frame-py.git diff --git a/docs/rnib.rst b/docs/rnib.rst new file mode 100644 index 0000000..ec55bff --- /dev/null +++ b/docs/rnib.rst @@ -0,0 +1,46 @@ +.. +.. Copyright (c) 2021 Samsung Electronics. +.. +.. Licensed under the Creative Commons Attribution 4.0 International +.. Public License (the "License"); you may not use this file except +.. in compliance with the License. You may obtain a copy of the License at +.. +.. https://creativecommons.org/licenses/by/4.0/ +.. +.. Unless required by applicable law or agreed to in writing, documentation +.. 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. +.. + + +RNIB(Radio network information base) +==================================== + +RNIB information is stored in SDL by E2mgr during the E2SETUP process. +It is saved as protobuf serialized, see [nodeb-rnib](https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/nodeb-rnib) for .proto definition. + +The .proto files defines the message format is located in the rnib repo. +The rnib repo is set to submodule. + +**How to compile .proto files** + +Prerequisite + +* protoc (v3.6.1) + +.. code-block:: bash + + $ PYTHON_OUT="ricxappframe/entities/rnib" + $ RNIB_PROTO="nodeb-rnib/entities" + $ protoc --python_out="${PYTHON_OUT}" \ + --proto_path="${RNIB_PROTO}" \ + $(find "${RNIB_PROTO}" -iname "*.proto" -printf "%f ") + $ sed -i -E 's/^import.*_pb2/from . \0/' ${PYTHON_OUT}/*_pb2.py + +**The reason why sed is needed** + +*To use relative imports in generated modules* : `protobuf issue +`_