[VOL-936] add changes for onu distance from OLT

Change-Id: If6201799946ac753780d0424c4bd986e2fb394d2
diff --git a/rw_core/core/device/remote/adapter_proxy.go b/rw_core/core/device/remote/adapter_proxy.go
index 4b04ee5..f4579ef 100755
--- a/rw_core/core/device/remote/adapter_proxy.go
+++ b/rw_core/core/device/remote/adapter_proxy.go
@@ -430,3 +430,30 @@
 		&kafka.KVArg{Key: "device", Value: device},
 		&kafka.KVArg{Key: "omcitestrequest", Value: omcitestrequest})
 }
+
+func (ap *AdapterProxy) GetExtValue(ctx context.Context, pdevice *voltha.Device, cdevice *voltha.Device, id string, valuetype voltha.ValueType_Type) (chan *kafka.RpcResponse, error) {
+	log.Debugw("GetExtValue", log.Fields{"device-id": pdevice.Id, "onuid": id})
+	rpc := "get_ext_value"
+	toTopic, err := ap.getAdapterTopic(pdevice.Id, pdevice.Adapter)
+	if err != nil {
+		return nil, err
+	}
+	// Use a device specific topic to send the request.  The adapter handling the device creates a device
+	// specific topic
+	args := []*kafka.KVArg{
+		{
+			Key:   "pDeviceId",
+			Value: &ic.StrType{Val: pdevice.Id},
+		},
+		{
+			Key:   "device",
+			Value: cdevice,
+		},
+		{
+			Key:   "valuetype",
+			Value: &ic.IntType{Val: int64(valuetype)},
+		}}
+
+	replyToTopic := ap.getCoreTopic()
+	return ap.sendRPC(ctx, rpc, toTopic, &replyToTopic, true, pdevice.Id, args...)
+}