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