Minor fixes & tweaks to improve error handing in preparation for BBSim REST API pull request.
Added comments to reduce golint warnings.
Main contributors: Pragya Arya, Vishesh Prasidh
Change-Id: I6f0b67a39dd0b8da0288306ac4f66098df53b18d
diff --git a/core/omci.go b/core/omci.go
index 433cb57..711bbc7 100644
--- a/core/omci.go
+++ b/core/omci.go
@@ -24,6 +24,7 @@
omci "github.com/opencord/omci-sim"
)
+// RunOmciResponder starts a go routine to process/respond to OMCI messages from VOLTHA
func RunOmciResponder(ctx context.Context, omciOut chan openolt.OmciMsg, omciIn chan openolt.OmciIndication, errch chan error) {
go func() {
defer logger.Debug("Omci response process was done")
@@ -57,8 +58,8 @@
}()
}
+// HexDecode converts the hex encoding to binary
func HexDecode(pkt []byte) []byte {
- // Convert the hex encoding to binary
// TODO - Change openolt adapter to send raw binary instead of hex encoded
p := make([]byte, len(pkt)/2)
for i, j := 0, 0; i < len(pkt); i, j = i+2, j+1 {