...
|
...
|
@@ -83,6 +83,7 @@ import org.thingsboard.server.gen.edge.DeviceUpdateMsg; |
83
|
83
|
import org.thingsboard.server.gen.edge.DownlinkMsg;
|
84
|
84
|
import org.thingsboard.server.gen.edge.DownlinkResponseMsg;
|
85
|
85
|
import org.thingsboard.server.gen.edge.EdgeConfiguration;
|
|
86
|
+import org.thingsboard.server.gen.edge.EdgeUpdateMsg;
|
86
|
87
|
import org.thingsboard.server.gen.edge.EntityDataProto;
|
87
|
88
|
import org.thingsboard.server.gen.edge.EntityViewUpdateMsg;
|
88
|
89
|
import org.thingsboard.server.gen.edge.RelationRequestMsg;
|
...
|
...
|
@@ -244,12 +245,11 @@ public final class EdgeGrpcSession implements Closeable { |
244
|
245
|
void onConfigurationUpdate(Edge edge) {
|
245
|
246
|
try {
|
246
|
247
|
this.edge = edge;
|
247
|
|
- // TODO: voba - push edge configuration update to edge
|
248
|
|
-// sendResponseMsg(org.thingsboard.server.gen.integration.ResponseMsg.newBuilder()
|
249
|
|
-// .setIntegrationUpdateMsg(IntegrationUpdateMsg.newBuilder()
|
250
|
|
-// .setConfiguration(constructIntegrationConfigProto(configuration, defaultConverterProto, downLinkConverterProto))
|
251
|
|
-// .build())
|
252
|
|
-// .build());
|
|
248
|
+ EdgeUpdateMsg edgeConfig = EdgeUpdateMsg.newBuilder()
|
|
249
|
+ .setConfiguration(constructEdgeConfigProto(edge)).build();
|
|
250
|
+ outputStream.onNext(ResponseMsg.newBuilder()
|
|
251
|
+ .setEdgeUpdateMsg(edgeConfig)
|
|
252
|
+ .build());
|
253
|
253
|
} catch (Exception e) {
|
254
|
254
|
log.error("Failed to construct proto objects!", e);
|
255
|
255
|
}
|
...
|
...
|
@@ -903,7 +903,7 @@ public final class EdgeGrpcSession implements Closeable { |
903
|
903
|
}
|
904
|
904
|
}
|
905
|
905
|
if (uplinkMsg.getDeviceRpcCallMsgList() != null && !uplinkMsg.getDeviceRpcCallMsgList().isEmpty()) {
|
906
|
|
- for (DeviceRpcCallMsg deviceRpcCallMsg: uplinkMsg.getDeviceRpcCallMsgList()) {
|
|
906
|
+ for (DeviceRpcCallMsg deviceRpcCallMsg : uplinkMsg.getDeviceRpcCallMsgList()) {
|
907
|
907
|
result.add(ctx.getDeviceProcessor().processDeviceRpcCallResponseMsg(edge.getTenantId(), deviceRpcCallMsg));
|
908
|
908
|
}
|
909
|
909
|
}
|
...
|
...
|
|