SEBA-397 Add support for mib upload of TCONT MEs.

Also update openolt.proto to match voltha master (compatible with voltha 1.6)

Change-Id: Ib7ac1a2cdea6e67c4e59fa25819790973d4630e6
diff --git a/core/omci.go b/core/omci.go
index d74ef92..c9860c2 100644
--- a/core/omci.go
+++ b/core/omci.go
@@ -88,18 +88,19 @@
 	Content       OmciContent
 }
 
-const NumMibUploads byte = 18
+const NumMibUploads byte = 26
 
 type OnuKey struct {
 	IntfId, OnuId uint32
 }
 
 type OnuOmciState struct {
-	gemPortId    uint16
-	mibUploadCtr uint16
-	uniGInstance uint8
-	pptpInstance uint8
-	init         istate
+	gemPortId     uint16
+	mibUploadCtr  uint16
+	uniGInstance  uint8
+	tcontInstance uint8
+	pptpInstance  uint8
+	init          istate
 }
 
 type istate int
@@ -216,7 +217,7 @@
 }
 
 func NewOnuOmciState() *OnuOmciState {
-	return &OnuOmciState{gemPortId: 0, mibUploadCtr: 0, uniGInstance: 1, pptpInstance: 1}
+	return &OnuOmciState{gemPortId: 0, mibUploadCtr: 0, uniGInstance: 1, tcontInstance: 0, pptpInstance: 1}
 }
 
 func mibReset(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
@@ -255,10 +256,10 @@
 func mibUploadNext(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
 	var pkt []byte
 
-	logger.Debug("Omci MibUploadNext")
-
 	state := OnuOmciStateMap[key]
 
+	logger.Debug("Omci MibUploadNext %d", state.mibUploadCtr)
+
 	switch state.mibUploadCtr {
 	case 0:
 		// ONT Data (2)
@@ -335,33 +336,14 @@
 	case 8:
 		// Circuit Pack (6) - #8
 		pkt = []byte{
-			0x00, 0x0f, 0x2e, 0x0a, 0x00, 0x02, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
 			0x00, 0x06, 0x01, 0x80, 0x00, 0x04, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 9:
-		// ANI-G
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x01, 0x07, 0x80, 0x01, 0xff, 0xff, 0x01, 0x00,
-			0x08, 0x00, 0x30, 0x00, 0x00, 0x05, 0x09, 0x00,
-			0x00, 0xe0, 0x54, 0xff, 0xff, 0x00, 0x00, 0x0c,
-			0x63, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 10, 11, 12, 13:
-		// UNI-G
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x01, 0x08, 0x01, 0x01, 0xf8, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-		pkt[11] = state.uniGInstance // ME Instance
-		state.uniGInstance++
-	case 14, 15, 16, 17:
+	case 9, 10, 11, 12:
+		// PPTP (11)
 		pkt = []byte{
 			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
 			0x00, 0x0b, 0x01, 0x01, 0xff, 0xfe, 0x00, 0x2f,
@@ -371,6 +353,37 @@
 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
 		pkt[11] = state.pptpInstance // ME Instance
 		state.pptpInstance++
+	case 13, 14, 15, 16, 17, 18, 19, 20:
+		// T-CONT (262)
+		pkt = []byte{
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+			0x01, 0x06, 0x80, 0x00, 0xe0, 0x00, 0xff, 0xff,
+			0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+		pkt[11] = state.tcontInstance // TCONT ME Instance
+		state.tcontInstance++
+	case 21:
+		// ANI-G (263)
+		pkt = []byte{
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+			0x01, 0x07, 0x80, 0x01, 0xff, 0xff, 0x01, 0x00,
+			0x08, 0x00, 0x30, 0x00, 0x00, 0x05, 0x09, 0x00,
+			0x00, 0xe0, 0x54, 0xff, 0xff, 0x00, 0x00, 0x0c,
+			0x63, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+	case 22, 23, 24, 25:
+		// UNI-G (264)
+		pkt = []byte{
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+			0x01, 0x08, 0x01, 0x01, 0xf8, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+		pkt[11] = state.uniGInstance // UNI-G ME Instance
+		state.uniGInstance++
 	default:
 		logger.Error("Invalid MibUpload request %d", state.mibUploadCtr)
 		return nil, errors.New("Invalid MibUpload request")