|
|
|
@ -696,11 +696,6 @@ public final class EdgeGrpcSession implements Closeable { |
|
|
|
private ListenableFuture<List<Void>> processUplinkMsg(UplinkMsg uplinkMsg) { |
|
|
|
List<ListenableFuture<Void>> result = new ArrayList<>(); |
|
|
|
try { |
|
|
|
if (uplinkMsg.getEntityDataCount() > 0) { |
|
|
|
for (EntityDataProto entityData : uplinkMsg.getEntityDataList()) { |
|
|
|
result.addAll(ctx.getTelemetryProcessor().processTelemetryMsg(edge.getTenantId(), entityData)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getDeviceProfileUpdateMsgCount() > 0) { |
|
|
|
for (DeviceProfileUpdateMsg deviceProfileUpdateMsg : uplinkMsg.getDeviceProfileUpdateMsgList()) { |
|
|
|
result.add(((DeviceProfileProcessor) ctx.getDeviceProfileEdgeProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)) |
|
|
|
@ -731,6 +726,17 @@ public final class EdgeGrpcSession implements Closeable { |
|
|
|
.processAssetMsgFromEdge(edge.getTenantId(), edge, assetUpdateMsg)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getEntityViewUpdateMsgCount() > 0) { |
|
|
|
for (EntityViewUpdateMsg entityViewUpdateMsg : uplinkMsg.getEntityViewUpdateMsgList()) { |
|
|
|
result.add(((EntityViewProcessor) ctx.getEntityViewProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)) |
|
|
|
.processEntityViewMsgFromEdge(edge.getTenantId(), edge, entityViewUpdateMsg)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getEntityDataCount() > 0) { |
|
|
|
for (EntityDataProto entityData : uplinkMsg.getEntityDataList()) { |
|
|
|
result.addAll(ctx.getTelemetryProcessor().processTelemetryMsg(edge.getTenantId(), entityData)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getAlarmUpdateMsgCount() > 0) { |
|
|
|
for (AlarmUpdateMsg alarmUpdateMsg : uplinkMsg.getAlarmUpdateMsgList()) { |
|
|
|
result.add(((AlarmProcessor) ctx.getAlarmEdgeProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)) |
|
|
|
@ -743,12 +749,6 @@ public final class EdgeGrpcSession implements Closeable { |
|
|
|
.processAlarmCommentMsgFromEdge(edge.getTenantId(), edge.getId(), alarmCommentUpdateMsg)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getEntityViewUpdateMsgCount() > 0) { |
|
|
|
for (EntityViewUpdateMsg entityViewUpdateMsg : uplinkMsg.getEntityViewUpdateMsgList()) { |
|
|
|
result.add(((EntityViewProcessor) ctx.getEntityViewProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)) |
|
|
|
.processEntityViewMsgFromEdge(edge.getTenantId(), edge, entityViewUpdateMsg)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getRelationUpdateMsgCount() > 0) { |
|
|
|
for (RelationUpdateMsg relationUpdateMsg : uplinkMsg.getRelationUpdateMsgList()) { |
|
|
|
result.add(((RelationProcessor) ctx.getRelationEdgeProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)) |
|
|
|
@ -763,7 +763,8 @@ public final class EdgeGrpcSession implements Closeable { |
|
|
|
} |
|
|
|
if (uplinkMsg.getResourceUpdateMsgCount() > 0) { |
|
|
|
for (ResourceUpdateMsg resourceUpdateMsg : uplinkMsg.getResourceUpdateMsgList()) { |
|
|
|
result.add(((ResourceProcessor) ctx.getResourceEdgeProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)).processResourceMsgFromEdge(edge.getTenantId(), edge, resourceUpdateMsg)); |
|
|
|
result.add(((ResourceProcessor) ctx.getResourceEdgeProcessorFactory().getProcessorByEdgeVersion(this.edgeVersion)) |
|
|
|
.processResourceMsgFromEdge(edge.getTenantId(), edge, resourceUpdateMsg)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (uplinkMsg.getRuleChainMetadataRequestMsgCount() > 0) { |
|
|
|
|