tree: ec26873dd426823896b3397cfe2a0f8ecd0c9810 [path history] [tgz]
  1. README.md
  2. generate-c-header.go
  3. voltha-defs.h
  4. voltha.go
  5. voltha/
netopeer/voltha-grpc-client/README.md

Voltha Golang GRPC Client

Introduction

This GoLang library is meant to be used as a layer between C libraries that need to interact with Voltha.

The Voltha GRPC Go api was generated by first copying all the voltha .proto files located under:

../../voltha/protos

Followed by the execution of the command:

protoc --go_out=plugins=grpc:. *.proto

TODO(s)

  • At the moment, the resulting API files had to be manually fixed to obtain a working solution. There were conflicting imports throughout the file. It still needs to be investigated

  • The user-facing API, i.e. the exported methods with the main voltha.go file, need to be manually added. Only a few commands have been completed as it requires a lot of effort to translate between the GRPC data model to C model that can be used by C libraries.

  • As a first attempt to auto-generate some of the code, a utility executable (generate-c-header .go) was implemented to create the C header that defines all the necessary C data structures based on the available Voltha GRPC data structures. This utility still needs some polishing.