tree: 30f6735144c5d112e100e2c61e2984eb64233c80 [path history] [tgz]
  1. Makefile.am
  2. README.md
  3. asfvolt-driver-build.sh
  4. asfvolt-driver-package.sh
  5. bal_stub.c
  6. bal_stub.h
  7. client.c.patch
  8. grpc-c_asfvolt16.patch
  9. grpc-c_compile-error.patch
  10. service.c.patch
  11. voltha_bal_driver.c
device_simulator/README.md

GRPC_C DEVICE SIMULATOR

This is an executable (voltha_bal_driver), which will receive asfvolt16 adapter grpc-c messages and call respective device stub. It will send received responses/asynchronous indications from Device stub to Adapter.

GETTING STARTED

prerequisites to install grpc

  • sudo apt-get install build-essential libxml2-dev libgeos++-dev libpq-dev libbz2-dev libtool automake openssl libssl-dev golang-goprotobuf-dev

INSTALLATION

steps to install grpc

steps to install grpc-c

  • cd grpc-c/thirdparty/protobuf-c
    • ./autogen.sh
    • ./configure
    • export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/protobuf
    • export LD_LIBRARY_PATH=/usr/local/lib
    • make
    • sudo make install

Apply grpc-c patch

  • cd grpc-c/ Patch 1: Apply patch in following link for grpc-c/lib - "https://github.com/Juniper/grpc-c/commit/353b40cd920cd749ed6cf71f8df17f1d5cf2c89d" Note: (This patch is having very few changes in two files(grpc-c/lib/client.c, grpc-c/lib/service.c. Download these two files from above link and replace at grpc-c/lib or merge these changes manually.)
    Patch 2: Apply patch in service.c.patch and client.c.patch
    • cp Makefile.am grpc-c/examples/
    • cp voltha_bal_driver.c grpc-c/examples/
    • cp bal_stub.c grpc-c/examples/
    • cp bal_stub.h grpc-c/examples/
      • Note: Update voltha adaptor IP in bal_stub.c
    • autoreconf --install
    • mkdir build && cd build
    • ../configure
    • make
    • sudo make install

To obtain proto files - Have a repo sync of opencord code base:

 - cp opencord/incubator/voltha/voltha/adapters/asfvolt16_olt/protos/* examples/

To autogenerate code from proto files:

 - make autogen

Build voltha_bal_driver:

 - Note: Remove "-O2" from Makefile
 - make clean_all;make 

The ultimate executable voltha_bal_driver can be found under ~/grpc-c/build/examples/.libs/

USAGE:

./voltha_bal_driver "serverIP:port1" -C "serverIP:port2" -A "serverIP:port3"
./bal_core_dist -C "serverIP:port2" -A "serverIP:port3"

NOTE: 'bal_core_dist' is a broadcom executable. A bash helper script 'asfvolt-driver-build.sh' is available to automate most of the build steps

CONTRIBUTING

VERSIONING

AUTHORS Radisys Adapter Team

Licence

Acknowledgments