feat(agv): 添加AGV重定位功能并扩展导航选项
- 新增AgvRelocalizeCommand消息定义,支持在当前活动地图中重新设置AGV定位位姿 - 在AgvService服务中添加relocalize RPC方法,调用前需确保AGV已停止 - 生成相应的Java gRPC服务端和客户端代码实现 - 扩展AgvMotionOptions添加blocked_timeout_ms参数,用于设置连续遇障时最大等待时间 - 更新导航等待工具类支持传入运动选项参数
This commit is contained in:
parent
53ed826480
commit
05f695c93c
@ -6,6 +6,7 @@ import com.cmvr.edge.client.model.EdgeCommonVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvMapNameVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvNavigateToPoseVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvNavigateToStationVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvRelocalizeVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvStartMappingVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvUploadMapVO;
|
||||
import com.cmvr.edge.client.model.agv.EdgeAgvVelocityVO;
|
||||
@ -101,6 +102,21 @@ public class EdgeAgvController {
|
||||
return AjaxResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 在当前活动地图中重新设置 AGV 定位位姿。
|
||||
*/
|
||||
@ApiOperation("AGV重定位")
|
||||
@PostMapping("/relocalize")
|
||||
public AjaxResult relocalize(@RequestBody @Validated EdgeAgvRelocalizeVO vo) {
|
||||
AgvUtils.AgvPose2d pose = AgvUtils.AgvPose2d.newBuilder()
|
||||
.setX(vo.getX())
|
||||
.setY(vo.getY())
|
||||
.setTheta(vo.getTheta())
|
||||
.build();
|
||||
edgeAgvService.relocalize(vo, pose);
|
||||
return AjaxResult.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("固定距离平移")
|
||||
@PostMapping("/translate")
|
||||
public AjaxResult translate(@RequestBody @Validated EdgeAgvTranslateVO vo) {
|
||||
@ -131,7 +147,7 @@ public class EdgeAgvController {
|
||||
.setY(vo.getY())
|
||||
.setTheta(vo.getTheta())
|
||||
.build();
|
||||
edgeAgvService.navigateToPose(vo, pose);
|
||||
edgeAgvService.navigateToPose(vo, pose, navigationOptions(vo.getBlockedTimeoutMs()));
|
||||
return AjaxResult.ok();
|
||||
}
|
||||
|
||||
@ -141,7 +157,7 @@ public class EdgeAgvController {
|
||||
@ApiOperation("导航到站点")
|
||||
@PostMapping("/navigateToStation")
|
||||
public AjaxResult navigateToStation(@RequestBody @Validated EdgeAgvNavigateToStationVO vo) {
|
||||
edgeAgvService.navigateToStation(vo, vo.getStationId());
|
||||
edgeAgvService.navigateToStation(vo, vo.getStationId(), navigationOptions(vo.getBlockedTimeoutMs()));
|
||||
return AjaxResult.ok();
|
||||
}
|
||||
|
||||
@ -311,6 +327,15 @@ public class EdgeAgvController {
|
||||
return vo;
|
||||
}
|
||||
|
||||
private AgvUtils.AgvMotionOptions navigationOptions(Integer blockedTimeoutMs) {
|
||||
int timeout = blockedTimeoutMs == null
|
||||
? EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS : blockedTimeoutMs;
|
||||
return AgvUtils.AgvMotionOptions.newBuilder()
|
||||
.setAsynchronous(false)
|
||||
.setBlockedTimeoutMs(timeout)
|
||||
.build();
|
||||
}
|
||||
|
||||
private Map<String, Object> toRuntimeStateMap(AgvUtils.AgvRuntimeState state) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("timestamp", state.getTimestamp());
|
||||
|
||||
@ -166,6 +166,13 @@ public class AimaFlowExecutionListener implements FlowExecutionListener {
|
||||
// 四舍五入保留2位小数
|
||||
progress = Math.round(progress * 100) / 100.0;
|
||||
JSONObject outputParams = event.getOutputParams();
|
||||
boolean nodeFailed = event.getEventType() == FlowExecutionEvent.EventType.NODE_FAILED;
|
||||
String nodeError = nodeFailed ? StrUtil.trim(event.getErrorMessage()) : null;
|
||||
JSONObject logOutputParams = outputParams == null
|
||||
? new JSONObject() : JSONObject.parseObject(outputParams.toJSONString());
|
||||
if (StrUtil.isNotBlank(nodeError)) {
|
||||
logOutputParams.put("errorMessage", nodeError);
|
||||
}
|
||||
String imageUrl = FlowMediaParamResolver.lastUrl(outputParams, "imageUrl");
|
||||
String videoUrl = FlowMediaParamResolver.lastUrl(outputParams, "videoUrl");
|
||||
String testCaseId = resolveTestCaseId(instId, taskInstance.getTaskId(), event);
|
||||
@ -181,15 +188,16 @@ public class AimaFlowExecutionListener implements FlowExecutionListener {
|
||||
.itemId(itemId)
|
||||
.itemOrder(event.getItemOrder())
|
||||
.itemOccurrence(event.getItemOccurrence())
|
||||
.logLevel("INFO")
|
||||
.logType("执行日志")
|
||||
.logContent("节点【" + event.getNodeName() + "】" + info)
|
||||
.actualResult(AimaLogExecutionContext.attach(outputParams, itemId,
|
||||
.logLevel(nodeFailed ? "ERROR" : "INFO")
|
||||
.logType(nodeFailed ? "异常日志" : "执行日志")
|
||||
.logContent("节点【" + event.getNodeName() + "】" + info
|
||||
+ (StrUtil.isBlank(nodeError) ? "" : ":" + StrUtil.sub(nodeError, 0, 300)))
|
||||
.actualResult(AimaLogExecutionContext.attach(logOutputParams, itemId,
|
||||
event.getItemOrder(), event.getItemOccurrence(),
|
||||
event.getEventType().name(), event.getNodeType()))
|
||||
.screenshotUrl(imageUrl)
|
||||
.videoUrl(videoUrl)
|
||||
.errorStack(event.getErrorMessage())
|
||||
.errorStack(nodeError)
|
||||
.logTime(now)
|
||||
.status(nodeLogStatus)
|
||||
.executionStep(event.getNodeName())
|
||||
|
||||
@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* AGV 导航到指定坐标的请求参数。
|
||||
*/
|
||||
@ -22,4 +24,8 @@ public class EdgeAgvNavigateToPoseVO extends EdgeCommonVO {
|
||||
|
||||
@ApiModelProperty(value = "目标朝向角,单位:弧度", required = true)
|
||||
private double theta;
|
||||
|
||||
@Min(value = 1, message = "连续遇障超时时间必须大于0")
|
||||
@ApiModelProperty(value = "连续遇障且底盘停止的超时时间,单位:毫秒", example = "60000")
|
||||
private Integer blockedTimeoutMs = 60_000;
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* AGV 导航到站点的请求参数。
|
||||
@ -19,4 +20,8 @@ public class EdgeAgvNavigateToStationVO extends EdgeCommonVO {
|
||||
@NotEmpty(message = "站点ID不能为空")
|
||||
@ApiModelProperty(value = "站点ID", required = true)
|
||||
private String stationId;
|
||||
|
||||
@Min(value = 1, message = "连续遇障超时时间必须大于0")
|
||||
@ApiModelProperty(value = "连续遇障且底盘停止的超时时间,单位:毫秒", example = "60000")
|
||||
private Integer blockedTimeoutMs = 60_000;
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package com.cmvr.edge.client.model.agv;
|
||||
|
||||
import com.cmvr.edge.client.model.EdgeCommonVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/** AGV 在当前地图中重新设置定位位姿的请求参数。 */
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("AGV重定位参数")
|
||||
public class EdgeAgvRelocalizeVO extends EdgeCommonVO {
|
||||
|
||||
@ApiModelProperty(value = "定位 X 坐标,单位:米", required = true)
|
||||
private double x;
|
||||
|
||||
@ApiModelProperty(value = "定位 Y 坐标,单位:米", required = true)
|
||||
private double y;
|
||||
|
||||
@ApiModelProperty(value = "定位朝向角,单位:弧度,逆时针为正", required = true)
|
||||
private double theta;
|
||||
}
|
||||
@ -15,6 +15,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface EdgeAgvService {
|
||||
|
||||
int DEFAULT_BLOCKED_TIMEOUT_MS = 60_000;
|
||||
|
||||
/**
|
||||
* 获取AGV运行时状态
|
||||
*
|
||||
@ -45,6 +47,11 @@ public interface EdgeAgvService {
|
||||
*/
|
||||
void clearFault(EdgeCommonVO edgeCommonVO);
|
||||
|
||||
/**
|
||||
* 在当前地图中重新设置 AGV 定位位姿。
|
||||
*/
|
||||
void relocalize(EdgeCommonVO edgeCommonVO, AgvUtils.AgvPose2d pose);
|
||||
|
||||
/**
|
||||
* 按指定速度平移固定距离。
|
||||
*/
|
||||
@ -58,6 +65,9 @@ public interface EdgeAgvService {
|
||||
*/
|
||||
void navigateToPose(EdgeCommonVO edgeCommonVO, AgvUtils.AgvPose2d pose);
|
||||
|
||||
void navigateToPose(EdgeCommonVO edgeCommonVO, AgvUtils.AgvPose2d pose,
|
||||
AgvUtils.AgvMotionOptions options);
|
||||
|
||||
/**
|
||||
* 导航到站点
|
||||
*
|
||||
@ -66,6 +76,9 @@ public interface EdgeAgvService {
|
||||
*/
|
||||
void navigateToStation(EdgeCommonVO edgeCommonVO, String stationId);
|
||||
|
||||
void navigateToStation(EdgeCommonVO edgeCommonVO, String stationId,
|
||||
AgvUtils.AgvMotionOptions options);
|
||||
|
||||
/**
|
||||
* 跟随路径
|
||||
*
|
||||
@ -74,6 +87,9 @@ public interface EdgeAgvService {
|
||||
*/
|
||||
void followPath(EdgeCommonVO edgeCommonVO, List<AgvUtils.AgvPathSegment> pathSegments);
|
||||
|
||||
void followPath(EdgeCommonVO edgeCommonVO, List<AgvUtils.AgvPathSegment> pathSegments,
|
||||
AgvUtils.AgvMotionOptions options);
|
||||
|
||||
/**
|
||||
* 暂停导航
|
||||
*
|
||||
|
||||
@ -65,6 +65,20 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
executeGrpcCall(() -> stub.clearFault(request));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void relocalize(EdgeCommonVO edgeCommonVO, AgvUtils.AgvPose2d pose) {
|
||||
if (pose == null) {
|
||||
throw new GlobalException("重定位位姿不能为空");
|
||||
}
|
||||
AgvServiceGrpc.AgvServiceBlockingStub stub = grpcServiceManager.getGrpcClient(
|
||||
edgeCommonVO.getRobotId(), AgvServiceGrpc.AgvServiceBlockingStub.class);
|
||||
AgvCommand.AgvRelocalizeCommand.Request request = AgvCommand.AgvRelocalizeCommand.Request.newBuilder()
|
||||
.setHeader(EdgeCommonUtil.buildRequest(edgeCommonVO.getDeviceId()))
|
||||
.setPose(pose)
|
||||
.build();
|
||||
executeGrpcCall(() -> stub.relocalize(request));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void translate(EdgeCommonVO edgeCommonVO, AgvUtils.AgvTranslation translation) {
|
||||
if (translation == null || translation.getDistance() <= 0) {
|
||||
@ -81,6 +95,12 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
|
||||
@Override
|
||||
public void navigateToPose(EdgeCommonVO edgeCommonVO, AgvUtils.AgvPose2d pose) {
|
||||
navigateToPose(edgeCommonVO, pose, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void navigateToPose(EdgeCommonVO edgeCommonVO, AgvUtils.AgvPose2d pose,
|
||||
AgvUtils.AgvMotionOptions options) {
|
||||
if (pose == null) {
|
||||
throw new GlobalException("目标位姿不能为空");
|
||||
}
|
||||
@ -90,12 +110,19 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
AgvCommand.AgvNavigateToPoseCommand.Request request = AgvCommand.AgvNavigateToPoseCommand.Request.newBuilder()
|
||||
.setHeader(EdgeCommonUtil.buildRequest(edgeCommonVO.getDeviceId()))
|
||||
.setPose(pose)
|
||||
.setOptions(normalizeNavigationOptions(options))
|
||||
.build();
|
||||
executeGrpcCall(() -> stub.navigateToPose(request));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void navigateToStation(EdgeCommonVO edgeCommonVO, String stationId) {
|
||||
navigateToStation(edgeCommonVO, stationId, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void navigateToStation(EdgeCommonVO edgeCommonVO, String stationId,
|
||||
AgvUtils.AgvMotionOptions options) {
|
||||
if (StrUtil.isBlank(stationId)) {
|
||||
throw new GlobalException("站点ID不能为空");
|
||||
}
|
||||
@ -104,9 +131,7 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
edgeCommonVO.getRobotId(), AgvServiceGrpc.AgvServiceBlockingStub.class);
|
||||
AgvCommand.AgvNavigateToStationCommand.Request request = AgvCommand.AgvNavigateToStationCommand.Request.newBuilder()
|
||||
.setHeader(EdgeCommonUtil.buildRequest(edgeCommonVO.getDeviceId()))
|
||||
.setOptions(AgvUtils.AgvMotionOptions.newBuilder()
|
||||
.setAsynchronous(false)
|
||||
.build())
|
||||
.setOptions(normalizeNavigationOptions(options))
|
||||
.setStationId(stationId)
|
||||
.build();
|
||||
executeGrpcCall(() -> stub.navigateToStation(request));
|
||||
@ -114,6 +139,12 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
|
||||
@Override
|
||||
public void followPath(EdgeCommonVO edgeCommonVO, List<AgvUtils.AgvPathSegment> pathSegments) {
|
||||
followPath(edgeCommonVO, pathSegments, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void followPath(EdgeCommonVO edgeCommonVO, List<AgvUtils.AgvPathSegment> pathSegments,
|
||||
AgvUtils.AgvMotionOptions options) {
|
||||
if (pathSegments == null || pathSegments.isEmpty()) {
|
||||
throw new GlobalException("路径段不能为空");
|
||||
}
|
||||
@ -123,6 +154,7 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
AgvCommand.AgvFollowPathCommand.Request request = AgvCommand.AgvFollowPathCommand.Request.newBuilder()
|
||||
.setHeader(EdgeCommonUtil.buildRequest(edgeCommonVO.getDeviceId()))
|
||||
.addAllPath(pathSegments)
|
||||
.setOptions(normalizeNavigationOptions(options))
|
||||
.build();
|
||||
executeGrpcCall(() -> stub.followPath(request));
|
||||
}
|
||||
@ -268,6 +300,15 @@ public class EdgeAgvServiceImpl implements EdgeAgvService {
|
||||
executeGrpcCall(() -> stub.stopMapping(request));
|
||||
}
|
||||
|
||||
AgvUtils.AgvMotionOptions normalizeNavigationOptions(AgvUtils.AgvMotionOptions options) {
|
||||
AgvUtils.AgvMotionOptions.Builder builder = options == null
|
||||
? AgvUtils.AgvMotionOptions.newBuilder() : options.toBuilder();
|
||||
if (builder.getBlockedTimeoutMs() <= 0) {
|
||||
builder.setBlockedTimeoutMs(EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS);
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行gRPC调用并处理异常
|
||||
*
|
||||
|
||||
@ -14,6 +14,7 @@ import com.cmvr.edge.client.manage.GrpcServiceManager;
|
||||
import com.cmvr.edge.client.model.system.EdgeSystemJsonCommandVO;
|
||||
import com.cmvr.edge.client.model.system.EdgeSystemUpdateParamsVO;
|
||||
import com.cmvr.edge.client.model.system.EdgeActionQueueVO;
|
||||
import com.cmvr.edge.client.service.EdgeAgvService;
|
||||
import com.cmvr.edge.client.service.EdgeSystemService;
|
||||
import com.cmvr.edge.client.utils.EdgeCommonUtil;
|
||||
import com.cmvr.common.exception.GlobalException;
|
||||
@ -314,6 +315,8 @@ public class EdgeSystemServiceImpl implements EdgeSystemService {
|
||||
.setSpeedRatio(params.getDoubleValue("speedRatio"))
|
||||
.setWaitTimeoutMs(params.getIntValue("waitTimeoutMs"))
|
||||
.setPollIntervalMs(params.getIntValue("pollIntervalMs"))
|
||||
.setBlockedTimeoutMs(params.getIntValue(
|
||||
"blockedTimeoutMs", EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS))
|
||||
.setAsynchronous(false)
|
||||
.build();
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.cmvr.edge.client.service.impl;
|
||||
|
||||
import cmvr.api.SafetyCommand;
|
||||
import cmvr.msgs.AgvUtils;
|
||||
import com.cmvr.edge.client.service.EdgeAgvService;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@ -38,4 +40,16 @@ public class EdgeSystemServiceImplTest {
|
||||
assertEquals(1000, minimum.getTimeoutMs());
|
||||
assertEquals(120000, maximum.getTimeoutMs());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void appliesDefaultAgvBlockedTimeoutWithoutOverwritingExplicitValue() {
|
||||
EdgeAgvServiceImpl agvService = new EdgeAgvServiceImpl(null);
|
||||
|
||||
AgvUtils.AgvMotionOptions defaults = agvService.normalizeNavigationOptions(null);
|
||||
AgvUtils.AgvMotionOptions explicit = agvService.normalizeNavigationOptions(
|
||||
AgvUtils.AgvMotionOptions.newBuilder().setBlockedTimeoutMs(12_000).build());
|
||||
|
||||
assertEquals(EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS, defaults.getBlockedTimeoutMs());
|
||||
assertEquals(12_000, explicit.getBlockedTimeoutMs());
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -143,6 +143,37 @@ public final class AgvServiceGrpc {
|
||||
return getClearFaultMethod;
|
||||
}
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<cmvr.api.AgvCommand.AgvRelocalizeCommand.Request,
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback> getRelocalizeMethod;
|
||||
|
||||
@io.grpc.stub.annotations.RpcMethod(
|
||||
fullMethodName = SERVICE_NAME + '/' + "relocalize",
|
||||
requestType = cmvr.api.AgvCommand.AgvRelocalizeCommand.Request.class,
|
||||
responseType = cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback.class,
|
||||
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
public static io.grpc.MethodDescriptor<cmvr.api.AgvCommand.AgvRelocalizeCommand.Request,
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback> getRelocalizeMethod() {
|
||||
io.grpc.MethodDescriptor<cmvr.api.AgvCommand.AgvRelocalizeCommand.Request, cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback> getRelocalizeMethod;
|
||||
if ((getRelocalizeMethod = AgvServiceGrpc.getRelocalizeMethod) == null) {
|
||||
synchronized (AgvServiceGrpc.class) {
|
||||
if ((getRelocalizeMethod = AgvServiceGrpc.getRelocalizeMethod) == null) {
|
||||
AgvServiceGrpc.getRelocalizeMethod = getRelocalizeMethod =
|
||||
io.grpc.MethodDescriptor.<cmvr.api.AgvCommand.AgvRelocalizeCommand.Request, cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "relocalize"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Request.getDefaultInstance()))
|
||||
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback.getDefaultInstance()))
|
||||
.setSchemaDescriptor(new AgvServiceMethodDescriptorSupplier("relocalize"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return getRelocalizeMethod;
|
||||
}
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<cmvr.api.AgvCommand.AgvNavigateToPoseCommand.Request,
|
||||
cmvr.api.AgvCommand.AgvNavigateToPoseCommand.Feedback> getNavigateToPoseMethod;
|
||||
|
||||
@ -762,6 +793,16 @@ public final class AgvServiceGrpc {
|
||||
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getClearFaultMethod(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 在当前活动地图中重新设置定位位姿。调用前 AGV 必须已经停止。
|
||||
* </pre>
|
||||
*/
|
||||
public void relocalize(cmvr.api.AgvCommand.AgvRelocalizeCommand.Request request,
|
||||
io.grpc.stub.StreamObserver<cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback> responseObserver) {
|
||||
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRelocalizeMethod(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 导航到指定地图位姿。目标位姿 x/y 单位为米,theta 单位为弧度。
|
||||
@ -964,6 +1005,13 @@ public final class AgvServiceGrpc {
|
||||
cmvr.api.Common.CommandHeader.Request,
|
||||
cmvr.api.Common.CommandHeader.Feedback>(
|
||||
this, METHODID_CLEAR_FAULT)))
|
||||
.addMethod(
|
||||
getRelocalizeMethod(),
|
||||
io.grpc.stub.ServerCalls.asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Request,
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback>(
|
||||
this, METHODID_RELOCALIZE)))
|
||||
.addMethod(
|
||||
getNavigateToPoseMethod(),
|
||||
io.grpc.stub.ServerCalls.asyncUnaryCall(
|
||||
@ -1149,6 +1197,17 @@ public final class AgvServiceGrpc {
|
||||
getChannel().newCall(getClearFaultMethod(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 在当前活动地图中重新设置定位位姿。调用前 AGV 必须已经停止。
|
||||
* </pre>
|
||||
*/
|
||||
public void relocalize(cmvr.api.AgvCommand.AgvRelocalizeCommand.Request request,
|
||||
io.grpc.stub.StreamObserver<cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback> responseObserver) {
|
||||
io.grpc.stub.ClientCalls.asyncUnaryCall(
|
||||
getChannel().newCall(getRelocalizeMethod(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 导航到指定地图位姿。目标位姿 x/y 单位为米,theta 单位为弧度。
|
||||
@ -1397,6 +1456,16 @@ public final class AgvServiceGrpc {
|
||||
getChannel(), getClearFaultMethod(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 在当前活动地图中重新设置定位位姿。调用前 AGV 必须已经停止。
|
||||
* </pre>
|
||||
*/
|
||||
public cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback relocalize(cmvr.api.AgvCommand.AgvRelocalizeCommand.Request request) {
|
||||
return io.grpc.stub.ClientCalls.blockingUnaryCall(
|
||||
getChannel(), getRelocalizeMethod(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 导航到指定地图位姿。目标位姿 x/y 单位为米,theta 单位为弧度。
|
||||
@ -1633,6 +1702,17 @@ public final class AgvServiceGrpc {
|
||||
getChannel().newCall(getClearFaultMethod(), getCallOptions()), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 在当前活动地图中重新设置定位位姿。调用前 AGV 必须已经停止。
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback> relocalize(
|
||||
cmvr.api.AgvCommand.AgvRelocalizeCommand.Request request) {
|
||||
return io.grpc.stub.ClientCalls.futureUnaryCall(
|
||||
getChannel().newCall(getRelocalizeMethod(), getCallOptions()), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 导航到指定地图位姿。目标位姿 x/y 单位为米,theta 单位为弧度。
|
||||
@ -1815,23 +1895,24 @@ public final class AgvServiceGrpc {
|
||||
private static final int METHODID_GET_NAVIGATION_STATUS = 1;
|
||||
private static final int METHODID_EMERGENCY_STOP = 2;
|
||||
private static final int METHODID_CLEAR_FAULT = 3;
|
||||
private static final int METHODID_NAVIGATE_TO_POSE = 4;
|
||||
private static final int METHODID_NAVIGATE_TO_STATION = 5;
|
||||
private static final int METHODID_FOLLOW_PATH = 6;
|
||||
private static final int METHODID_PAUSE_NAVIGATION = 7;
|
||||
private static final int METHODID_RESUME_NAVIGATION = 8;
|
||||
private static final int METHODID_CANCEL_NAVIGATION = 9;
|
||||
private static final int METHODID_SET_VELOCITY = 10;
|
||||
private static final int METHODID_STOP_VELOCITY_CONTROL = 11;
|
||||
private static final int METHODID_LIST_MAPS = 12;
|
||||
private static final int METHODID_LIST_STATIONS = 13;
|
||||
private static final int METHODID_SWITCH_MAP = 14;
|
||||
private static final int METHODID_UPLOAD_MAP = 15;
|
||||
private static final int METHODID_DOWNLOAD_MAP = 16;
|
||||
private static final int METHODID_START_MAPPING = 17;
|
||||
private static final int METHODID_STREAM_MAP = 18;
|
||||
private static final int METHODID_STOP_MAPPING = 19;
|
||||
private static final int METHODID_TRANSLATE = 20;
|
||||
private static final int METHODID_RELOCALIZE = 4;
|
||||
private static final int METHODID_NAVIGATE_TO_POSE = 5;
|
||||
private static final int METHODID_NAVIGATE_TO_STATION = 6;
|
||||
private static final int METHODID_FOLLOW_PATH = 7;
|
||||
private static final int METHODID_PAUSE_NAVIGATION = 8;
|
||||
private static final int METHODID_RESUME_NAVIGATION = 9;
|
||||
private static final int METHODID_CANCEL_NAVIGATION = 10;
|
||||
private static final int METHODID_SET_VELOCITY = 11;
|
||||
private static final int METHODID_STOP_VELOCITY_CONTROL = 12;
|
||||
private static final int METHODID_LIST_MAPS = 13;
|
||||
private static final int METHODID_LIST_STATIONS = 14;
|
||||
private static final int METHODID_SWITCH_MAP = 15;
|
||||
private static final int METHODID_UPLOAD_MAP = 16;
|
||||
private static final int METHODID_DOWNLOAD_MAP = 17;
|
||||
private static final int METHODID_START_MAPPING = 18;
|
||||
private static final int METHODID_STREAM_MAP = 19;
|
||||
private static final int METHODID_STOP_MAPPING = 20;
|
||||
private static final int METHODID_TRANSLATE = 21;
|
||||
|
||||
private static final class MethodHandlers<Req, Resp> implements
|
||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
@ -1866,6 +1947,10 @@ public final class AgvServiceGrpc {
|
||||
serviceImpl.clearFault((cmvr.api.Common.CommandHeader.Request) request,
|
||||
(io.grpc.stub.StreamObserver<cmvr.api.Common.CommandHeader.Feedback>) responseObserver);
|
||||
break;
|
||||
case METHODID_RELOCALIZE:
|
||||
serviceImpl.relocalize((cmvr.api.AgvCommand.AgvRelocalizeCommand.Request) request,
|
||||
(io.grpc.stub.StreamObserver<cmvr.api.AgvCommand.AgvRelocalizeCommand.Feedback>) responseObserver);
|
||||
break;
|
||||
case METHODID_NAVIGATE_TO_POSE:
|
||||
serviceImpl.navigateToPose((cmvr.api.AgvCommand.AgvNavigateToPoseCommand.Request) request,
|
||||
(io.grpc.stub.StreamObserver<cmvr.api.AgvCommand.AgvNavigateToPoseCommand.Feedback>) responseObserver);
|
||||
@ -1999,6 +2084,7 @@ public final class AgvServiceGrpc {
|
||||
.addMethod(getGetNavigationStatusMethod())
|
||||
.addMethod(getEmergencyStopMethod())
|
||||
.addMethod(getClearFaultMethod())
|
||||
.addMethod(getRelocalizeMethod())
|
||||
.addMethod(getNavigateToPoseMethod())
|
||||
.addMethod(getNavigateToStationMethod())
|
||||
.addMethod(getFollowPathMethod())
|
||||
|
||||
@ -25,7 +25,7 @@ public final class AgvServiceOuterClass {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\032cmvr/api/agv_service.proto\022\010cmvr.api\032\025" +
|
||||
"cmvr/api/common.proto\032\032cmvr/api/agv_comm" +
|
||||
"and.proto2\254\017\n\nAgvService\022f\n\017getRuntimeSt" +
|
||||
"and.proto2\213\020\n\nAgvService\022f\n\017getRuntimeSt" +
|
||||
"ate\022(.cmvr.api.AgvRuntimeStateCommand.Re" +
|
||||
"quest\032).cmvr.api.AgvRuntimeStateCommand." +
|
||||
"Feedback\022r\n\023getNavigationStatus\022,.cmvr.a" +
|
||||
@ -35,46 +35,48 @@ public final class AgvServiceOuterClass {
|
||||
"Header.Request\032 .cmvr.api.CommandHeader." +
|
||||
"Feedback\022O\n\nclearFault\022\037.cmvr.api.Comman" +
|
||||
"dHeader.Request\032 .cmvr.api.CommandHeader" +
|
||||
".Feedback\022i\n\016navigateToPose\022*.cmvr.api.A" +
|
||||
"gvNavigateToPoseCommand.Request\032+.cmvr.a" +
|
||||
"pi.AgvNavigateToPoseCommand.Feedback\022r\n\021" +
|
||||
"navigateToStation\022-.cmvr.api.AgvNavigate" +
|
||||
"ToStationCommand.Request\032..cmvr.api.AgvN" +
|
||||
"avigateToStationCommand.Feedback\022]\n\nfoll" +
|
||||
"owPath\022&.cmvr.api.AgvFollowPathCommand.R" +
|
||||
"equest\032\'.cmvr.api.AgvFollowPathCommand.F" +
|
||||
"eedback\022T\n\017pauseNavigation\022\037.cmvr.api.Co" +
|
||||
"mmandHeader.Request\032 .cmvr.api.CommandHe" +
|
||||
"ader.Feedback\022U\n\020resumeNavigation\022\037.cmvr" +
|
||||
".api.CommandHeader.Request\032 .cmvr.api.Co" +
|
||||
"mmandHeader.Feedback\022U\n\020cancelNavigation" +
|
||||
"\022\037.cmvr.api.CommandHeader.Request\032 .cmvr" +
|
||||
".api.CommandHeader.Feedback\022`\n\013setVeloci" +
|
||||
"ty\022\'.cmvr.api.AgvSetVelocityCommand.Requ" +
|
||||
"est\032(.cmvr.api.AgvSetVelocityCommand.Fee" +
|
||||
"dback\022X\n\023stopVelocityControl\022\037.cmvr.api." +
|
||||
"CommandHeader.Request\032 .cmvr.api.Command" +
|
||||
"Header.Feedback\022W\n\010listMaps\022$.cmvr.api.A" +
|
||||
"gvListMapsCommand.Request\032%.cmvr.api.Agv" +
|
||||
"ListMapsCommand.Feedback\022c\n\014listStations" +
|
||||
"\022(.cmvr.api.AgvListStationsCommand.Reque" +
|
||||
"st\032).cmvr.api.AgvListStationsCommand.Fee" +
|
||||
"dback\022N\n\tswitchMap\022\037.cmvr.api.AgvMapComm" +
|
||||
"and.Request\032 .cmvr.api.AgvMapCommand.Fee" +
|
||||
"dback\022N\n\tuploadMap\022\037.cmvr.api.AgvMapComm" +
|
||||
"and.Request\032 .cmvr.api.AgvMapCommand.Fee" +
|
||||
"dback\022P\n\013downloadMap\022\037.cmvr.api.AgvMapCo" +
|
||||
"mmand.Request\032 .cmvr.api.AgvMapCommand.F" +
|
||||
"eedback\022c\n\014startMapping\022(.cmvr.api.AgvSt" +
|
||||
"artMappingCommand.Request\032).cmvr.api.Agv" +
|
||||
"StartMappingCommand.Feedback\022\\\n\tstreamMa" +
|
||||
"p\022%.cmvr.api.AgvMapStreamCommand.Request" +
|
||||
"\032&.cmvr.api.AgvMapStreamCommand.Feedback" +
|
||||
"0\001\022P\n\013stopMapping\022\037.cmvr.api.CommandHead" +
|
||||
"er.Request\032 .cmvr.api.CommandHeader.Feed" +
|
||||
"back\022Z\n\ttranslate\022%.cmvr.api.AgvTranslat" +
|
||||
"eCommand.Request\032&.cmvr.api.AgvTranslate" +
|
||||
"Command.Feedbackb\006proto3"
|
||||
".Feedback\022]\n\nrelocalize\022&.cmvr.api.AgvRe" +
|
||||
"localizeCommand.Request\032\'.cmvr.api.AgvRe" +
|
||||
"localizeCommand.Feedback\022i\n\016navigateToPo" +
|
||||
"se\022*.cmvr.api.AgvNavigateToPoseCommand.R" +
|
||||
"equest\032+.cmvr.api.AgvNavigateToPoseComma" +
|
||||
"nd.Feedback\022r\n\021navigateToStation\022-.cmvr." +
|
||||
"api.AgvNavigateToStationCommand.Request\032" +
|
||||
"..cmvr.api.AgvNavigateToStationCommand.F" +
|
||||
"eedback\022]\n\nfollowPath\022&.cmvr.api.AgvFoll" +
|
||||
"owPathCommand.Request\032\'.cmvr.api.AgvFoll" +
|
||||
"owPathCommand.Feedback\022T\n\017pauseNavigatio" +
|
||||
"n\022\037.cmvr.api.CommandHeader.Request\032 .cmv" +
|
||||
"r.api.CommandHeader.Feedback\022U\n\020resumeNa" +
|
||||
"vigation\022\037.cmvr.api.CommandHeader.Reques" +
|
||||
"t\032 .cmvr.api.CommandHeader.Feedback\022U\n\020c" +
|
||||
"ancelNavigation\022\037.cmvr.api.CommandHeader" +
|
||||
".Request\032 .cmvr.api.CommandHeader.Feedba" +
|
||||
"ck\022`\n\013setVelocity\022\'.cmvr.api.AgvSetVeloc" +
|
||||
"ityCommand.Request\032(.cmvr.api.AgvSetVelo" +
|
||||
"cityCommand.Feedback\022X\n\023stopVelocityCont" +
|
||||
"rol\022\037.cmvr.api.CommandHeader.Request\032 .c" +
|
||||
"mvr.api.CommandHeader.Feedback\022W\n\010listMa" +
|
||||
"ps\022$.cmvr.api.AgvListMapsCommand.Request" +
|
||||
"\032%.cmvr.api.AgvListMapsCommand.Feedback\022" +
|
||||
"c\n\014listStations\022(.cmvr.api.AgvListStatio" +
|
||||
"nsCommand.Request\032).cmvr.api.AgvListStat" +
|
||||
"ionsCommand.Feedback\022N\n\tswitchMap\022\037.cmvr" +
|
||||
".api.AgvMapCommand.Request\032 .cmvr.api.Ag" +
|
||||
"vMapCommand.Feedback\022N\n\tuploadMap\022\037.cmvr" +
|
||||
".api.AgvMapCommand.Request\032 .cmvr.api.Ag" +
|
||||
"vMapCommand.Feedback\022P\n\013downloadMap\022\037.cm" +
|
||||
"vr.api.AgvMapCommand.Request\032 .cmvr.api." +
|
||||
"AgvMapCommand.Feedback\022c\n\014startMapping\022(" +
|
||||
".cmvr.api.AgvStartMappingCommand.Request" +
|
||||
"\032).cmvr.api.AgvStartMappingCommand.Feedb" +
|
||||
"ack\022\\\n\tstreamMap\022%.cmvr.api.AgvMapStream" +
|
||||
"Command.Request\032&.cmvr.api.AgvMapStreamC" +
|
||||
"ommand.Feedback0\001\022P\n\013stopMapping\022\037.cmvr." +
|
||||
"api.CommandHeader.Request\032 .cmvr.api.Com" +
|
||||
"mandHeader.Feedback\022Z\n\ttranslate\022%.cmvr." +
|
||||
"api.AgvTranslateCommand.Request\032&.cmvr.a" +
|
||||
"pi.AgvTranslateCommand.Feedbackb\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
|
||||
@ -3863,6 +3863,17 @@ public final class AgvUtils {
|
||||
* @return The pollIntervalMs.
|
||||
*/
|
||||
int getPollIntervalMs();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 连续遇障且底盘停止时的最大等待时间,单位:毫秒;
|
||||
* 0 或未传表示使用适配器默认值 60000 毫秒。
|
||||
* </pre>
|
||||
*
|
||||
* <code>int32 blocked_timeout_ms = 11;</code>
|
||||
* @return The blockedTimeoutMs.
|
||||
*/
|
||||
int getBlockedTimeoutMs();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
@ -4060,6 +4071,22 @@ public final class AgvUtils {
|
||||
return pollIntervalMs_;
|
||||
}
|
||||
|
||||
public static final int BLOCKED_TIMEOUT_MS_FIELD_NUMBER = 11;
|
||||
private int blockedTimeoutMs_;
|
||||
/**
|
||||
* <pre>
|
||||
* 连续遇障且底盘停止时的最大等待时间,单位:毫秒;
|
||||
* 0 或未传表示使用适配器默认值 60000 毫秒。
|
||||
* </pre>
|
||||
*
|
||||
* <code>int32 blocked_timeout_ms = 11;</code>
|
||||
* @return The blockedTimeoutMs.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getBlockedTimeoutMs() {
|
||||
return blockedTimeoutMs_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
@ -4104,6 +4131,9 @@ public final class AgvUtils {
|
||||
if (pollIntervalMs_ != 0) {
|
||||
output.writeInt32(10, pollIntervalMs_);
|
||||
}
|
||||
if (blockedTimeoutMs_ != 0) {
|
||||
output.writeInt32(11, blockedTimeoutMs_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@ -4153,6 +4183,10 @@ public final class AgvUtils {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(10, pollIntervalMs_);
|
||||
}
|
||||
if (blockedTimeoutMs_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(11, blockedTimeoutMs_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
@ -4195,6 +4229,8 @@ public final class AgvUtils {
|
||||
!= other.getWaitTimeoutMs()) return false;
|
||||
if (getPollIntervalMs()
|
||||
!= other.getPollIntervalMs()) return false;
|
||||
if (getBlockedTimeoutMs()
|
||||
!= other.getBlockedTimeoutMs()) return false;
|
||||
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||
return true;
|
||||
}
|
||||
@ -4234,6 +4270,8 @@ public final class AgvUtils {
|
||||
hash = (53 * hash) + getWaitTimeoutMs();
|
||||
hash = (37 * hash) + POLL_INTERVAL_MS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getPollIntervalMs();
|
||||
hash = (37 * hash) + BLOCKED_TIMEOUT_MS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getBlockedTimeoutMs();
|
||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
@ -4386,6 +4424,8 @@ public final class AgvUtils {
|
||||
|
||||
pollIntervalMs_ = 0;
|
||||
|
||||
blockedTimeoutMs_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -4422,6 +4462,7 @@ public final class AgvUtils {
|
||||
result.asynchronous_ = asynchronous_;
|
||||
result.waitTimeoutMs_ = waitTimeoutMs_;
|
||||
result.pollIntervalMs_ = pollIntervalMs_;
|
||||
result.blockedTimeoutMs_ = blockedTimeoutMs_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
@ -4500,6 +4541,9 @@ public final class AgvUtils {
|
||||
if (other.getPollIntervalMs() != 0) {
|
||||
setPollIntervalMs(other.getPollIntervalMs());
|
||||
}
|
||||
if (other.getBlockedTimeoutMs() != 0) {
|
||||
setBlockedTimeoutMs(other.getBlockedTimeoutMs());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
onChanged();
|
||||
return this;
|
||||
@ -4576,6 +4620,11 @@ public final class AgvUtils {
|
||||
|
||||
break;
|
||||
} // case 80
|
||||
case 88: {
|
||||
blockedTimeoutMs_ = input.readInt32();
|
||||
|
||||
break;
|
||||
} // case 88
|
||||
default: {
|
||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||
done = true; // was an endgroup tag
|
||||
@ -5027,6 +5076,52 @@ public final class AgvUtils {
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int blockedTimeoutMs_ ;
|
||||
/**
|
||||
* <pre>
|
||||
* 连续遇障且底盘停止时的最大等待时间,单位:毫秒;
|
||||
* 0 或未传表示使用适配器默认值 60000 毫秒。
|
||||
* </pre>
|
||||
*
|
||||
* <code>int32 blocked_timeout_ms = 11;</code>
|
||||
* @return The blockedTimeoutMs.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getBlockedTimeoutMs() {
|
||||
return blockedTimeoutMs_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* 连续遇障且底盘停止时的最大等待时间,单位:毫秒;
|
||||
* 0 或未传表示使用适配器默认值 60000 毫秒。
|
||||
* </pre>
|
||||
*
|
||||
* <code>int32 blocked_timeout_ms = 11;</code>
|
||||
* @param value The blockedTimeoutMs to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setBlockedTimeoutMs(int value) {
|
||||
|
||||
blockedTimeoutMs_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* 连续遇障且底盘停止时的最大等待时间,单位:毫秒;
|
||||
* 0 或未传表示使用适配器默认值 60000 毫秒。
|
||||
* </pre>
|
||||
*
|
||||
* <code>int32 blocked_timeout_ms = 11;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearBlockedTimeoutMs() {
|
||||
|
||||
blockedTimeoutMs_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
@ -23730,84 +23825,85 @@ java.lang.String defaultValue);
|
||||
"elocity\022\n\n\002vx\030\001 \001(\001\022\n\n\002vy\030\002 \001(\001\022\n\n\002wz\030\003 " +
|
||||
"\001(\001\"n\n\017AgvBatteryState\022\022\n\npercentage\030\001 \001" +
|
||||
"(\001\022\017\n\007voltage\030\002 \001(\001\022\017\n\007current\030\003 \001(\001\022\023\n\013" +
|
||||
"temperature\030\004 \001(\001\022\020\n\010charging\030\005 \001(\010\"\207\002\n\020" +
|
||||
"temperature\030\004 \001(\001\022\020\n\010charging\030\005 \001(\010\"\243\002\n\020" +
|
||||
"AgvMotionOptions\022\021\n\tmax_speed\030\001 \001(\001\022\031\n\021m" +
|
||||
"ax_angular_speed\030\002 \001(\001\022\030\n\020max_accelerati" +
|
||||
"on\030\003 \001(\001\022 \n\030max_angular_acceleration\030\004 \001" +
|
||||
"(\001\022\026\n\016reach_distance\030\005 \001(\001\022\023\n\013reach_angl" +
|
||||
"e\030\006 \001(\001\022\023\n\013speed_ratio\030\007 \001(\001\022\024\n\014asynchro" +
|
||||
"nous\030\010 \001(\010\022\027\n\017wait_timeout_ms\030\t \001(\005\022\030\n\020p" +
|
||||
"oll_interval_ms\030\n \001(\005\"z\n\020AgvAdapterParam" +
|
||||
"s\0227\n\006values\030\001 \003(\0132\'.cmvr.msgs.AgvAdapter" +
|
||||
"Params.ValuesEntry\032-\n\013ValuesEntry\022\013\n\003key" +
|
||||
"\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\317\002\n\017AgvRuntime" +
|
||||
"State\022\021\n\ttimestamp\030\001 \001(\001\022\014\n\004mode\030\002 \001(\005\022\021" +
|
||||
"\n\tconnected\030\003 \001(\010\022\021\n\tlocalized\030\004 \001(\010\022\016\n\006" +
|
||||
"moving\030\005 \001(\010\022\r\n\005fault\030\006 \001(\010\022\031\n\021emergency" +
|
||||
"_stopped\030\007 \001(\010\022\"\n\004pose\030\010 \001(\0132\024.cmvr.msgs" +
|
||||
".AgvPose2d\022(\n\010velocity\030\t \001(\0132\026.cmvr.msgs" +
|
||||
".AgvVelocity\022+\n\007battery\030\n \001(\0132\032.cmvr.msg" +
|
||||
"s.AgvBatteryState\022\023\n\013current_map\030\013 \001(\t\022\027" +
|
||||
"\n\017current_station\030\014 \001(\t\022\022\n\nlast_error\030\r " +
|
||||
"\001(\t\"_\n\nAgvStation\022\n\n\002id\030\001 \001(\t\022\014\n\004type\030\002 " +
|
||||
"\001(\t\022\"\n\004pose\030\003 \001(\0132\024.cmvr.msgs.AgvPose2d\022" +
|
||||
"\023\n\013description\030\004 \001(\t\"@\n\016AgvPathSegment\022\026" +
|
||||
"\n\016source_station\030\001 \001(\t\022\026\n\016target_station" +
|
||||
"\030\002 \001(\t\"0\n\rAgvMapPoint3D\022\t\n\001x\030\001 \001(\001\022\t\n\001y\030" +
|
||||
"\002 \001(\001\022\t\n\001z\030\003 \001(\001\"\307\001\n\017AgvUnifiedMap2D\022\020\n\010" +
|
||||
"frame_id\030\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\001\022\022\n\nres" +
|
||||
"olution\030\003 \001(\001\022\r\n\005width\030\004 \001(\r\022\016\n\006height\030\005" +
|
||||
" \001(\r\022$\n\006origin\030\006 \001(\0132\024.cmvr.msgs.AgvPose" +
|
||||
"2d\022\014\n\004data\030\007 \003(\005\022(\n\007objects\030\010 \003(\0132\027.cmvr" +
|
||||
".msgs.AgvMapObject\"l\n\023AgvMapPointSample3" +
|
||||
"D\022\t\n\001x\030\001 \001(\001\022\t\n\001y\030\002 \001(\001\022\t\n\001z\030\003 \001(\001\022\021\n\tin" +
|
||||
"tensity\030\004 \001(\002\022\014\n\004ring\030\005 \001(\r\022\023\n\013time_offs" +
|
||||
"et\030\006 \001(\001\"E\n\rAgvMapVoxel3D\022\t\n\001x\030\001 \001(\005\022\t\n\001" +
|
||||
"y\030\002 \001(\005\022\t\n\001z\030\003 \001(\005\022\023\n\013probability\030\004 \001(\002\"" +
|
||||
"~\n\rAgvMapPlane3D\022(\n\006center\030\001 \001(\0132\030.cmvr." +
|
||||
"msgs.AgvMapPoint3D\022(\n\006normal\030\002 \001(\0132\030.cmv" +
|
||||
"r.msgs.AgvMapPoint3D\022\t\n\001d\030\003 \001(\001\022\016\n\006radiu" +
|
||||
"s\030\004 \001(\001\"\360\001\n\014AgvMapObject\022\n\n\002id\030\001 \001(\t\022)\n\004" +
|
||||
"type\030\002 \001(\0162\033.cmvr.msgs.AgvMapObjectType\022" +
|
||||
"(\n\006points\030\003 \003(\0132\030.cmvr.msgs.AgvMapPoint3" +
|
||||
"D\022\017\n\007heading\030\004 \001(\001\022;\n\nproperties\030\005 \003(\0132\'" +
|
||||
".cmvr.msgs.AgvMapObject.PropertiesEntry\032" +
|
||||
"1\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" +
|
||||
"\030\002 \001(\t:\0028\001\"\376\001\n\017AgvUnifiedMap3D\022\020\n\010frame_" +
|
||||
"id\030\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\001\022\030\n\020voxel_res" +
|
||||
"olution\030\003 \001(\001\022.\n\006points\030\004 \003(\0132\036.cmvr.msg" +
|
||||
"s.AgvMapPointSample3D\022(\n\006voxels\030\005 \003(\0132\030." +
|
||||
"cmvr.msgs.AgvMapVoxel3D\022(\n\006planes\030\006 \003(\0132" +
|
||||
"\030.cmvr.msgs.AgvMapPlane3D\022(\n\007objects\030\007 \003" +
|
||||
"(\0132\027.cmvr.msgs.AgvMapObject\"\246\003\n\023AgvUnifi" +
|
||||
"edMapUpdate\022\016\n\006map_id\030\001 \001(\t\022\022\n\nsession_i" +
|
||||
"d\030\002 \001(\t\022\020\n\010sequence\030\003 \001(\004\022\024\n\014resume_toke" +
|
||||
"n\030\004 \001(\t\022-\n\tdimension\030\005 \001(\0162\032.cmvr.msgs.A" +
|
||||
"gvMapDimension\0220\n\013update_type\030\006 \001(\0162\033.cm" +
|
||||
"vr.msgs.AgvMapUpdateType\022\020\n\010frame_id\030\007 \001" +
|
||||
"(\t\022\021\n\ttimestamp\030\010 \001(\001\022\026\n\016snapshot_begin\030" +
|
||||
"\t \001(\010\022\024\n\014snapshot_end\030\n \001(\010\022\023\n\013chunk_ind" +
|
||||
"ex\030\013 \001(\r\022\023\n\013chunk_count\030\014 \001(\r\022,\n\006map_2d\030" +
|
||||
"\024 \001(\0132\032.cmvr.msgs.AgvUnifiedMap2DH\000\022,\n\006m" +
|
||||
"ap_3d\030\025 \001(\0132\032.cmvr.msgs.AgvUnifiedMap3DH" +
|
||||
"\000B\t\n\007payload\"U\n\023AgvNavigationStatus\022\r\n\005s" +
|
||||
"tate\030\001 \001(\005\022\014\n\004type\030\002 \001(\005\022\020\n\010progress\030\003 \001" +
|
||||
"(\001\022\017\n\007message\030\004 \001(\t*^\n\022AgvTranslationMod" +
|
||||
"e\022!\n\035AGV_TRANSLATION_MODE_ODOMETRY\020\000\022%\n!" +
|
||||
"AGV_TRANSLATION_MODE_LOCALIZATION\020\001*k\n\017A" +
|
||||
"gvMapDimension\022!\n\035AGV_MAP_DIMENSION_UNSP" +
|
||||
"ECIFIED\020\000\022\016\n\nAGV_MAP_2D\020\001\022\016\n\nAGV_MAP_3D\020" +
|
||||
"\002\022\025\n\021AGV_MAP_2D_AND_3D\020\003*\211\001\n\020AgvMapUpdat" +
|
||||
"eType\022\036\n\032AGV_MAP_UPDATE_UNSPECIFIED\020\000\022\033\n" +
|
||||
"\027AGV_MAP_UPDATE_SNAPSHOT\020\001\022\036\n\032AGV_MAP_UP" +
|
||||
"DATE_INCREMENTAL\020\002\022\030\n\024AGV_MAP_UPDATE_RES" +
|
||||
"ET\020\003*\376\001\n\020AgvMapObjectType\022\036\n\032AGV_MAP_OBJ" +
|
||||
"ECT_UNSPECIFIED\020\000\022\032\n\026AGV_MAP_OBJECT_STAT" +
|
||||
"ION\020\001\022\027\n\023AGV_MAP_OBJECT_LINE\020\002\022\027\n\023AGV_MA" +
|
||||
"P_OBJECT_AREA\020\003\022\031\n\025AGV_MAP_OBJECT_QR_TAG" +
|
||||
"\020\004\022\034\n\030AGV_MAP_OBJECT_REFLECTOR\020\005\022\037\n\033AGV_" +
|
||||
"MAP_OBJECT_BIN_LOCATION\020\006\022\"\n\036AGV_MAP_OBJ" +
|
||||
"ECT_EXTERNAL_DEVICE\020\007b\006proto3"
|
||||
"oll_interval_ms\030\n \001(\005\022\032\n\022blocked_timeout" +
|
||||
"_ms\030\013 \001(\005\"z\n\020AgvAdapterParams\0227\n\006values\030" +
|
||||
"\001 \003(\0132\'.cmvr.msgs.AgvAdapterParams.Value" +
|
||||
"sEntry\032-\n\013ValuesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" +
|
||||
"lue\030\002 \001(\t:\0028\001\"\317\002\n\017AgvRuntimeState\022\021\n\ttim" +
|
||||
"estamp\030\001 \001(\001\022\014\n\004mode\030\002 \001(\005\022\021\n\tconnected\030" +
|
||||
"\003 \001(\010\022\021\n\tlocalized\030\004 \001(\010\022\016\n\006moving\030\005 \001(\010" +
|
||||
"\022\r\n\005fault\030\006 \001(\010\022\031\n\021emergency_stopped\030\007 \001" +
|
||||
"(\010\022\"\n\004pose\030\010 \001(\0132\024.cmvr.msgs.AgvPose2d\022(" +
|
||||
"\n\010velocity\030\t \001(\0132\026.cmvr.msgs.AgvVelocity" +
|
||||
"\022+\n\007battery\030\n \001(\0132\032.cmvr.msgs.AgvBattery" +
|
||||
"State\022\023\n\013current_map\030\013 \001(\t\022\027\n\017current_st" +
|
||||
"ation\030\014 \001(\t\022\022\n\nlast_error\030\r \001(\t\"_\n\nAgvSt" +
|
||||
"ation\022\n\n\002id\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\"\n\004pose\030" +
|
||||
"\003 \001(\0132\024.cmvr.msgs.AgvPose2d\022\023\n\013descripti" +
|
||||
"on\030\004 \001(\t\"@\n\016AgvPathSegment\022\026\n\016source_sta" +
|
||||
"tion\030\001 \001(\t\022\026\n\016target_station\030\002 \001(\t\"0\n\rAg" +
|
||||
"vMapPoint3D\022\t\n\001x\030\001 \001(\001\022\t\n\001y\030\002 \001(\001\022\t\n\001z\030\003" +
|
||||
" \001(\001\"\307\001\n\017AgvUnifiedMap2D\022\020\n\010frame_id\030\001 \001" +
|
||||
"(\t\022\021\n\ttimestamp\030\002 \001(\001\022\022\n\nresolution\030\003 \001(" +
|
||||
"\001\022\r\n\005width\030\004 \001(\r\022\016\n\006height\030\005 \001(\r\022$\n\006orig" +
|
||||
"in\030\006 \001(\0132\024.cmvr.msgs.AgvPose2d\022\014\n\004data\030\007" +
|
||||
" \003(\005\022(\n\007objects\030\010 \003(\0132\027.cmvr.msgs.AgvMap" +
|
||||
"Object\"l\n\023AgvMapPointSample3D\022\t\n\001x\030\001 \001(\001" +
|
||||
"\022\t\n\001y\030\002 \001(\001\022\t\n\001z\030\003 \001(\001\022\021\n\tintensity\030\004 \001(" +
|
||||
"\002\022\014\n\004ring\030\005 \001(\r\022\023\n\013time_offset\030\006 \001(\001\"E\n\r" +
|
||||
"AgvMapVoxel3D\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\t\n\001z" +
|
||||
"\030\003 \001(\005\022\023\n\013probability\030\004 \001(\002\"~\n\rAgvMapPla" +
|
||||
"ne3D\022(\n\006center\030\001 \001(\0132\030.cmvr.msgs.AgvMapP" +
|
||||
"oint3D\022(\n\006normal\030\002 \001(\0132\030.cmvr.msgs.AgvMa" +
|
||||
"pPoint3D\022\t\n\001d\030\003 \001(\001\022\016\n\006radius\030\004 \001(\001\"\360\001\n\014" +
|
||||
"AgvMapObject\022\n\n\002id\030\001 \001(\t\022)\n\004type\030\002 \001(\0162\033" +
|
||||
".cmvr.msgs.AgvMapObjectType\022(\n\006points\030\003 " +
|
||||
"\003(\0132\030.cmvr.msgs.AgvMapPoint3D\022\017\n\007heading" +
|
||||
"\030\004 \001(\001\022;\n\nproperties\030\005 \003(\0132\'.cmvr.msgs.A" +
|
||||
"gvMapObject.PropertiesEntry\0321\n\017Propertie" +
|
||||
"sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\376" +
|
||||
"\001\n\017AgvUnifiedMap3D\022\020\n\010frame_id\030\001 \001(\t\022\021\n\t" +
|
||||
"timestamp\030\002 \001(\001\022\030\n\020voxel_resolution\030\003 \001(" +
|
||||
"\001\022.\n\006points\030\004 \003(\0132\036.cmvr.msgs.AgvMapPoin" +
|
||||
"tSample3D\022(\n\006voxels\030\005 \003(\0132\030.cmvr.msgs.Ag" +
|
||||
"vMapVoxel3D\022(\n\006planes\030\006 \003(\0132\030.cmvr.msgs." +
|
||||
"AgvMapPlane3D\022(\n\007objects\030\007 \003(\0132\027.cmvr.ms" +
|
||||
"gs.AgvMapObject\"\246\003\n\023AgvUnifiedMapUpdate\022" +
|
||||
"\016\n\006map_id\030\001 \001(\t\022\022\n\nsession_id\030\002 \001(\t\022\020\n\010s" +
|
||||
"equence\030\003 \001(\004\022\024\n\014resume_token\030\004 \001(\t\022-\n\td" +
|
||||
"imension\030\005 \001(\0162\032.cmvr.msgs.AgvMapDimensi" +
|
||||
"on\0220\n\013update_type\030\006 \001(\0162\033.cmvr.msgs.AgvM" +
|
||||
"apUpdateType\022\020\n\010frame_id\030\007 \001(\t\022\021\n\ttimest" +
|
||||
"amp\030\010 \001(\001\022\026\n\016snapshot_begin\030\t \001(\010\022\024\n\014sna" +
|
||||
"pshot_end\030\n \001(\010\022\023\n\013chunk_index\030\013 \001(\r\022\023\n\013" +
|
||||
"chunk_count\030\014 \001(\r\022,\n\006map_2d\030\024 \001(\0132\032.cmvr" +
|
||||
".msgs.AgvUnifiedMap2DH\000\022,\n\006map_3d\030\025 \001(\0132" +
|
||||
"\032.cmvr.msgs.AgvUnifiedMap3DH\000B\t\n\007payload" +
|
||||
"\"U\n\023AgvNavigationStatus\022\r\n\005state\030\001 \001(\005\022\014" +
|
||||
"\n\004type\030\002 \001(\005\022\020\n\010progress\030\003 \001(\001\022\017\n\007messag" +
|
||||
"e\030\004 \001(\t*^\n\022AgvTranslationMode\022!\n\035AGV_TRA" +
|
||||
"NSLATION_MODE_ODOMETRY\020\000\022%\n!AGV_TRANSLAT" +
|
||||
"ION_MODE_LOCALIZATION\020\001*k\n\017AgvMapDimensi" +
|
||||
"on\022!\n\035AGV_MAP_DIMENSION_UNSPECIFIED\020\000\022\016\n" +
|
||||
"\nAGV_MAP_2D\020\001\022\016\n\nAGV_MAP_3D\020\002\022\025\n\021AGV_MAP" +
|
||||
"_2D_AND_3D\020\003*\211\001\n\020AgvMapUpdateType\022\036\n\032AGV" +
|
||||
"_MAP_UPDATE_UNSPECIFIED\020\000\022\033\n\027AGV_MAP_UPD" +
|
||||
"ATE_SNAPSHOT\020\001\022\036\n\032AGV_MAP_UPDATE_INCREME" +
|
||||
"NTAL\020\002\022\030\n\024AGV_MAP_UPDATE_RESET\020\003*\376\001\n\020Agv" +
|
||||
"MapObjectType\022\036\n\032AGV_MAP_OBJECT_UNSPECIF" +
|
||||
"IED\020\000\022\032\n\026AGV_MAP_OBJECT_STATION\020\001\022\027\n\023AGV" +
|
||||
"_MAP_OBJECT_LINE\020\002\022\027\n\023AGV_MAP_OBJECT_ARE" +
|
||||
"A\020\003\022\031\n\025AGV_MAP_OBJECT_QR_TAG\020\004\022\034\n\030AGV_MA" +
|
||||
"P_OBJECT_REFLECTOR\020\005\022\037\n\033AGV_MAP_OBJECT_B" +
|
||||
"IN_LOCATION\020\006\022\"\n\036AGV_MAP_OBJECT_EXTERNAL" +
|
||||
"_DEVICE\020\007b\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
@ -23842,7 +23938,7 @@ java.lang.String defaultValue);
|
||||
internal_static_cmvr_msgs_AgvMotionOptions_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_msgs_AgvMotionOptions_descriptor,
|
||||
new java.lang.String[] { "MaxSpeed", "MaxAngularSpeed", "MaxAcceleration", "MaxAngularAcceleration", "ReachDistance", "ReachAngle", "SpeedRatio", "Asynchronous", "WaitTimeoutMs", "PollIntervalMs", });
|
||||
new java.lang.String[] { "MaxSpeed", "MaxAngularSpeed", "MaxAcceleration", "MaxAngularAcceleration", "ReachDistance", "ReachAngle", "SpeedRatio", "Asynchronous", "WaitTimeoutMs", "PollIntervalMs", "BlockedTimeoutMs", });
|
||||
internal_static_cmvr_msgs_AgvAdapterParams_descriptor =
|
||||
getDescriptor().getMessageTypes().get(5);
|
||||
internal_static_cmvr_msgs_AgvAdapterParams_fieldAccessorTable = new
|
||||
|
||||
@ -37,6 +37,23 @@ message AgvNavigationStatusCommand {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 在当前活动地图中重新设置 AGV 定位位姿。
|
||||
message AgvRelocalizeCommand {
|
||||
message Request {
|
||||
// header.device_id 指定目标 AGV 设备。
|
||||
CommandHeader.Request header = 1;
|
||||
// x/y 单位:米,theta 单位:弧度,逆时针为正。
|
||||
cmvr.msgs.AgvPose2d pose = 2;
|
||||
}
|
||||
|
||||
message Feedback {
|
||||
// 成功仅表示控制器接受命令,不表示定位已经收敛。
|
||||
CommandHeader.Feedback header = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 导航到指定地图位姿命令。
|
||||
message AgvNavigateToPoseCommand {
|
||||
// 请求体。
|
||||
|
||||
@ -20,6 +20,9 @@ service AgvService {
|
||||
// 清除可恢复故障或告警。
|
||||
rpc clearFault(CommandHeader.Request) returns (CommandHeader.Feedback);
|
||||
|
||||
// 在当前活动地图中重新设置定位位姿。调用前 AGV 必须已经停止。
|
||||
rpc relocalize(AgvRelocalizeCommand.Request)returns (AgvRelocalizeCommand.Feedback);
|
||||
|
||||
// 导航到指定地图位姿。目标位姿 x/y 单位为米,theta 单位为弧度。
|
||||
rpc navigateToPose(AgvNavigateToPoseCommand.Request) returns (AgvNavigateToPoseCommand.Feedback);
|
||||
|
||||
|
||||
@ -88,6 +88,9 @@ message AgvMotionOptions {
|
||||
int32 wait_timeout_ms = 9;
|
||||
// 同步导航的状态轮询周期,单位:毫秒;0 表示使用适配器默认值。
|
||||
int32 poll_interval_ms = 10;
|
||||
// 连续遇障且底盘停止时的最大等待时间,单位:毫秒;
|
||||
// 0 或未传表示使用适配器默认值 60000 毫秒。
|
||||
int32 blocked_timeout_ms = 11;
|
||||
}
|
||||
|
||||
// AGV 适配器扩展参数。用于传递厂商或控制器特有的参数。
|
||||
|
||||
@ -18,8 +18,6 @@ service SystemService {
|
||||
rpc ExecuteActionQueue(ActionQueueCommand.Request) returns (ActionQueueCommand.Feedback) {}
|
||||
|
||||
rpc GetSafetyState(GetSafetyStateCommand.Request) returns (GetSafetyStateCommand.Feedback) {}
|
||||
rpc RecoverSafetyState(RecoverSafetyStateCommand.Request) returns (RecoverSafetyStateCommand.Feedback) {
|
||||
option deprecated = true;
|
||||
}
|
||||
rpc RecoverSafetyState(RecoverSafetyStateCommand.Request) returns (RecoverSafetyStateCommand.Feedback) {}
|
||||
rpc RestoreOperationalState(RestoreOperationalStateCommand.Request) returns (RestoreOperationalStateCommand.Feedback) {}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.cmvr.common.utils.Threads;
|
||||
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
@ -30,6 +31,7 @@ public class ThreadPoolConfig
|
||||
private int keepAliveSeconds = 300;
|
||||
|
||||
@Bean(name = "threadPoolTaskExecutor")
|
||||
@Primary
|
||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor()
|
||||
{
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
|
||||
@ -174,6 +174,13 @@ public class InspectionFlowExecutionListener implements FlowExecutionListener {
|
||||
// 四舍五入保留2位小数
|
||||
progress = Math.round(progress * 100) / 100.0;
|
||||
JSONObject outputParams = event.getOutputParams();
|
||||
boolean nodeFailed = event.getEventType() == FlowExecutionEvent.EventType.NODE_FAILED;
|
||||
String nodeError = nodeFailed ? StrUtil.trim(event.getErrorMessage()) : null;
|
||||
JSONObject logOutputParams = outputParams == null
|
||||
? new JSONObject() : JSONObject.parseObject(outputParams.toJSONString());
|
||||
if (StrUtil.isNotBlank(nodeError)) {
|
||||
logOutputParams.put("errorMessage", nodeError);
|
||||
}
|
||||
String imageUrl = FlowMediaParamResolver.lastUrl(outputParams, "imageUrl");
|
||||
String videoUrl = FlowMediaParamResolver.lastUrl(outputParams, "videoUrl");
|
||||
String audioUrl = FlowMediaParamResolver.lastUrl(outputParams, "audioUrl");
|
||||
@ -200,10 +207,10 @@ public class InspectionFlowExecutionListener implements FlowExecutionListener {
|
||||
.nodeId(nodeId)
|
||||
.nodeName(event.getNodeName())
|
||||
.logType(logType)
|
||||
.logContent("节点【" + event.getNodeName() + "】" + info)
|
||||
.logContent("节点【" + event.getNodeName() + "】" + info
|
||||
+ (StrUtil.isBlank(nodeError) ? "" : ":" + StrUtil.sub(nodeError, 0, 300)))
|
||||
.mediaUrl(mediaUrl)
|
||||
.extraInfo(outputParams == null || outputParams.isEmpty()
|
||||
? null : outputParams.toJSONString())
|
||||
.extraInfo(logOutputParams.isEmpty() ? null : logOutputParams.toJSONString())
|
||||
.status(nodeLogStatus)
|
||||
.progress(progress)
|
||||
.logTime(now)
|
||||
|
||||
@ -36,6 +36,8 @@
|
||||
<version>0.6.1</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.25.5:exe:${os.detected.classifier}</protocArtifact>
|
||||
<outputDirectory>${basedir}/src/main/java</outputDirectory>
|
||||
<clearOutputDirectory>false</clearOutputDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
18700
cmvr-iot-quic-contract/src/main/java/cmvr/quic_edge/v1/QuicEdge.java
Normal file
18700
cmvr-iot-quic-contract/src/main/java/cmvr/quic_edge/v1/QuicEdge.java
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,76 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface DeviceManagerSnapshotOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.DeviceManagerSnapshot)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>string manager_name = 1;</code>
|
||||
* @return The managerName.
|
||||
*/
|
||||
java.lang.String getManagerName();
|
||||
/**
|
||||
* <code>string manager_name = 1;</code>
|
||||
* @return The bytes for managerName.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getManagerNameBytes();
|
||||
|
||||
/**
|
||||
* <code>string manager_version = 2;</code>
|
||||
* @return The managerVersion.
|
||||
*/
|
||||
java.lang.String getManagerVersion();
|
||||
/**
|
||||
* <code>string manager_version = 2;</code>
|
||||
* @return The bytes for managerVersion.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getManagerVersionBytes();
|
||||
|
||||
/**
|
||||
* <code>string manager_description = 3;</code>
|
||||
* @return The managerDescription.
|
||||
*/
|
||||
java.lang.String getManagerDescription();
|
||||
/**
|
||||
* <code>string manager_description = 3;</code>
|
||||
* @return The bytes for managerDescription.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getManagerDescriptionBytes();
|
||||
|
||||
/**
|
||||
* <code>uint64 sampled_at_unix_ms = 4;</code>
|
||||
* @return The sampledAtUnixMs.
|
||||
*/
|
||||
long getSampledAtUnixMs();
|
||||
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.ManagedDeviceStatus devices = 5;</code>
|
||||
*/
|
||||
java.util.List<com.cmvr.quic.gateway.v1.ManagedDeviceStatus>
|
||||
getDevicesList();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.ManagedDeviceStatus devices = 5;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.ManagedDeviceStatus getDevices(int index);
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.ManagedDeviceStatus devices = 5;</code>
|
||||
*/
|
||||
int getDevicesCount();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.ManagedDeviceStatus devices = 5;</code>
|
||||
*/
|
||||
java.util.List<? extends com.cmvr.quic.gateway.v1.ManagedDeviceStatusOrBuilder>
|
||||
getDevicesOrBuilderList();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.ManagedDeviceStatus devices = 5;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.ManagedDeviceStatusOrBuilder getDevicesOrBuilder(
|
||||
int index);
|
||||
}
|
||||
@ -0,0 +1,675 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code cmvr.quic_gateway.v1.GrpcEndpoint}
|
||||
*/
|
||||
public final class GrpcEndpoint extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:cmvr.quic_gateway.v1.GrpcEndpoint)
|
||||
GrpcEndpointOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use GrpcEndpoint.newBuilder() to construct.
|
||||
private GrpcEndpoint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private GrpcEndpoint() {
|
||||
host_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new GrpcEndpoint();
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpoint.class, com.cmvr.quic.gateway.v1.GrpcEndpoint.Builder.class);
|
||||
}
|
||||
|
||||
public static final int HOST_FIELD_NUMBER = 1;
|
||||
@SuppressWarnings("serial")
|
||||
private volatile java.lang.Object host_ = "";
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return The host.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.lang.String getHost() {
|
||||
java.lang.Object ref = host_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
host_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return The bytes for host.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.ByteString
|
||||
getHostBytes() {
|
||||
java.lang.Object ref = host_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
host_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int PORT_FIELD_NUMBER = 2;
|
||||
private int port_ = 0;
|
||||
/**
|
||||
* <code>uint32 port = 2;</code>
|
||||
* @return The port.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getPort() {
|
||||
return port_;
|
||||
}
|
||||
|
||||
public static final int TLS_FIELD_NUMBER = 3;
|
||||
private boolean tls_ = false;
|
||||
/**
|
||||
* <code>bool tls = 3;</code>
|
||||
* @return The tls.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean getTls() {
|
||||
return tls_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_);
|
||||
}
|
||||
if (port_ != 0) {
|
||||
output.writeUInt32(2, port_);
|
||||
}
|
||||
if (tls_ != false) {
|
||||
output.writeBool(3, tls_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_);
|
||||
}
|
||||
if (port_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(2, port_);
|
||||
}
|
||||
if (tls_ != false) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBoolSize(3, tls_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof com.cmvr.quic.gateway.v1.GrpcEndpoint)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpoint other = (com.cmvr.quic.gateway.v1.GrpcEndpoint) obj;
|
||||
|
||||
if (!getHost()
|
||||
.equals(other.getHost())) return false;
|
||||
if (getPort()
|
||||
!= other.getPort()) return false;
|
||||
if (getTls()
|
||||
!= other.getTls()) return false;
|
||||
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + HOST_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getHost().hashCode();
|
||||
hash = (37 * hash) + PORT_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getPort();
|
||||
hash = (37 * hash) + TLS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
|
||||
getTls());
|
||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.cmvr.quic.gateway.v1.GrpcEndpoint prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code cmvr.quic_gateway.v1.GrpcEndpoint}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:cmvr.quic_gateway.v1.GrpcEndpoint)
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpointOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpoint.class, com.cmvr.quic.gateway.v1.GrpcEndpoint.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using com.cmvr.quic.gateway.v1.GrpcEndpoint.newBuilder()
|
||||
private Builder() {
|
||||
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
bitField0_ = 0;
|
||||
host_ = "";
|
||||
port_ = 0;
|
||||
tls_ = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.GrpcEndpoint getDefaultInstanceForType() {
|
||||
return com.cmvr.quic.gateway.v1.GrpcEndpoint.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.GrpcEndpoint build() {
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpoint result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.GrpcEndpoint buildPartial() {
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpoint result = new com.cmvr.quic.gateway.v1.GrpcEndpoint(this);
|
||||
if (bitField0_ != 0) { buildPartial0(result); }
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
private void buildPartial0(com.cmvr.quic.gateway.v1.GrpcEndpoint result) {
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||
result.host_ = host_;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||
result.port_ = port_;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||
result.tls_ = tls_;
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof com.cmvr.quic.gateway.v1.GrpcEndpoint) {
|
||||
return mergeFrom((com.cmvr.quic.gateway.v1.GrpcEndpoint)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.cmvr.quic.gateway.v1.GrpcEndpoint other) {
|
||||
if (other == com.cmvr.quic.gateway.v1.GrpcEndpoint.getDefaultInstance()) return this;
|
||||
if (!other.getHost().isEmpty()) {
|
||||
host_ = other.host_;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
}
|
||||
if (other.getPort() != 0) {
|
||||
setPort(other.getPort());
|
||||
}
|
||||
if (other.getTls() != false) {
|
||||
setTls(other.getTls());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
case 10: {
|
||||
host_ = input.readStringRequireUtf8();
|
||||
bitField0_ |= 0x00000001;
|
||||
break;
|
||||
} // case 10
|
||||
case 16: {
|
||||
port_ = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
break;
|
||||
} // case 16
|
||||
case 24: {
|
||||
tls_ = input.readBool();
|
||||
bitField0_ |= 0x00000004;
|
||||
break;
|
||||
} // case 24
|
||||
default: {
|
||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||
done = true; // was an endgroup tag
|
||||
}
|
||||
break;
|
||||
} // default:
|
||||
} // switch (tag)
|
||||
} // while (!done)
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
onChanged();
|
||||
} // finally
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.lang.Object host_ = "";
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return The host.
|
||||
*/
|
||||
public java.lang.String getHost() {
|
||||
java.lang.Object ref = host_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
host_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return The bytes for host.
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getHostBytes() {
|
||||
java.lang.Object ref = host_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
host_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @param value The host to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setHost(
|
||||
java.lang.String value) {
|
||||
if (value == null) { throw new NullPointerException(); }
|
||||
host_ = value;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearHost() {
|
||||
host_ = getDefaultInstance().getHost();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @param value The bytes for host to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setHostBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) { throw new NullPointerException(); }
|
||||
checkByteStringIsUtf8(value);
|
||||
host_ = value;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int port_ ;
|
||||
/**
|
||||
* <code>uint32 port = 2;</code>
|
||||
* @return The port.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getPort() {
|
||||
return port_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 port = 2;</code>
|
||||
* @param value The port to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setPort(int value) {
|
||||
|
||||
port_ = value;
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 port = 2;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearPort() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
port_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean tls_ ;
|
||||
/**
|
||||
* <code>bool tls = 3;</code>
|
||||
* @return The tls.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean getTls() {
|
||||
return tls_;
|
||||
}
|
||||
/**
|
||||
* <code>bool tls = 3;</code>
|
||||
* @param value The tls to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setTls(boolean value) {
|
||||
|
||||
tls_ = value;
|
||||
bitField0_ |= 0x00000004;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>bool tls = 3;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearTls() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
tls_ = false;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:cmvr.quic_gateway.v1.GrpcEndpoint)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:cmvr.quic_gateway.v1.GrpcEndpoint)
|
||||
private static final com.cmvr.quic.gateway.v1.GrpcEndpoint DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new com.cmvr.quic.gateway.v1.GrpcEndpoint();
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.GrpcEndpoint getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<GrpcEndpoint>
|
||||
PARSER = new com.google.protobuf.AbstractParser<GrpcEndpoint>() {
|
||||
@java.lang.Override
|
||||
public GrpcEndpoint parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
Builder builder = newBuilder();
|
||||
try {
|
||||
builder.mergeFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(builder.buildPartial());
|
||||
} catch (com.google.protobuf.UninitializedMessageException e) {
|
||||
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(e)
|
||||
.setUnfinishedMessage(builder.buildPartial());
|
||||
}
|
||||
return builder.buildPartial();
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<GrpcEndpoint> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<GrpcEndpoint> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.GrpcEndpoint getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface GrpcEndpointOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.GrpcEndpoint)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return The host.
|
||||
*/
|
||||
java.lang.String getHost();
|
||||
/**
|
||||
* <code>string host = 1;</code>
|
||||
* @return The bytes for host.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getHostBytes();
|
||||
|
||||
/**
|
||||
* <code>uint32 port = 2;</code>
|
||||
* @return The port.
|
||||
*/
|
||||
int getPort();
|
||||
|
||||
/**
|
||||
* <code>bool tls = 3;</code>
|
||||
* @return The tls.
|
||||
*/
|
||||
boolean getTls();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,82 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface ManagedDeviceStatusOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.ManagedDeviceStatus)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>string device_id = 1;</code>
|
||||
* @return The deviceId.
|
||||
*/
|
||||
java.lang.String getDeviceId();
|
||||
/**
|
||||
* <code>string device_id = 1;</code>
|
||||
* @return The bytes for deviceId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getDeviceIdBytes();
|
||||
|
||||
/**
|
||||
* <code>int32 kind = 2;</code>
|
||||
* @return The kind.
|
||||
*/
|
||||
int getKind();
|
||||
|
||||
/**
|
||||
* <code>string type_name = 3;</code>
|
||||
* @return The typeName.
|
||||
*/
|
||||
java.lang.String getTypeName();
|
||||
/**
|
||||
* <code>string type_name = 3;</code>
|
||||
* @return The bytes for typeName.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTypeNameBytes();
|
||||
|
||||
/**
|
||||
* <code>bool enabled = 4;</code>
|
||||
* @return The enabled.
|
||||
*/
|
||||
boolean getEnabled();
|
||||
|
||||
/**
|
||||
* <code>int32 manager_state = 5;</code>
|
||||
* @return The managerState.
|
||||
*/
|
||||
int getManagerState();
|
||||
|
||||
/**
|
||||
* <code>int32 health = 6;</code>
|
||||
* @return The health.
|
||||
*/
|
||||
int getHealth();
|
||||
|
||||
/**
|
||||
* <code>bool has_error = 7;</code>
|
||||
* @return The hasError.
|
||||
*/
|
||||
boolean getHasError();
|
||||
|
||||
/**
|
||||
* <code>string error_message = 8;</code>
|
||||
* @return The errorMessage.
|
||||
*/
|
||||
java.lang.String getErrorMessage();
|
||||
/**
|
||||
* <code>string error_message = 8;</code>
|
||||
* @return The bytes for errorMessage.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getErrorMessageBytes();
|
||||
|
||||
/**
|
||||
* <code>uint64 status_updated_at_unix_ms = 9;</code>
|
||||
* @return The statusUpdatedAtUnixMs.
|
||||
*/
|
||||
long getStatusUpdatedAtUnixMs();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,106 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface MediaFrameOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.MediaFrame)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>string node_id = 1;</code>
|
||||
* @return The nodeId.
|
||||
*/
|
||||
java.lang.String getNodeId();
|
||||
/**
|
||||
* <code>string node_id = 1;</code>
|
||||
* @return The bytes for nodeId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNodeIdBytes();
|
||||
|
||||
/**
|
||||
* <code>string session_id = 2;</code>
|
||||
* @return The sessionId.
|
||||
*/
|
||||
java.lang.String getSessionId();
|
||||
/**
|
||||
* <code>string session_id = 2;</code>
|
||||
* @return The bytes for sessionId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSessionIdBytes();
|
||||
|
||||
/**
|
||||
* <code>uint64 session_epoch = 3;</code>
|
||||
* @return The sessionEpoch.
|
||||
*/
|
||||
long getSessionEpoch();
|
||||
|
||||
/**
|
||||
* <code>uint32 track_id = 4;</code>
|
||||
* @return The trackId.
|
||||
*/
|
||||
int getTrackId();
|
||||
|
||||
/**
|
||||
* <code>int32 kind = 5;</code>
|
||||
* @return The kind.
|
||||
*/
|
||||
int getKind();
|
||||
|
||||
/**
|
||||
* <code>string codec = 6;</code>
|
||||
* @return The codec.
|
||||
*/
|
||||
java.lang.String getCodec();
|
||||
/**
|
||||
* <code>string codec = 6;</code>
|
||||
* @return The bytes for codec.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCodecBytes();
|
||||
|
||||
/**
|
||||
* <code>string payload_format = 7;</code>
|
||||
* @return The payloadFormat.
|
||||
*/
|
||||
java.lang.String getPayloadFormat();
|
||||
/**
|
||||
* <code>string payload_format = 7;</code>
|
||||
* @return The bytes for payloadFormat.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPayloadFormatBytes();
|
||||
|
||||
/**
|
||||
* <code>uint64 packet_sequence = 8;</code>
|
||||
* @return The packetSequence.
|
||||
*/
|
||||
long getPacketSequence();
|
||||
|
||||
/**
|
||||
* <code>uint64 frame_sequence = 9;</code>
|
||||
* @return The frameSequence.
|
||||
*/
|
||||
long getFrameSequence();
|
||||
|
||||
/**
|
||||
* <code>uint64 capture_timestamp_us = 10;</code>
|
||||
* @return The captureTimestampUs.
|
||||
*/
|
||||
long getCaptureTimestampUs();
|
||||
|
||||
/**
|
||||
* <code>uint32 flags = 11;</code>
|
||||
* @return The flags.
|
||||
*/
|
||||
int getFlags();
|
||||
|
||||
/**
|
||||
* <code>bytes payload = 12;</code>
|
||||
* @return The payload.
|
||||
*/
|
||||
com.google.protobuf.ByteString getPayload();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,118 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface MediaTrackOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.MediaTrack)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 track_id = 1;</code>
|
||||
* @return The trackId.
|
||||
*/
|
||||
int getTrackId();
|
||||
|
||||
/**
|
||||
* <code>int32 kind = 2;</code>
|
||||
* @return The kind.
|
||||
*/
|
||||
int getKind();
|
||||
|
||||
/**
|
||||
* <code>string device_id = 3;</code>
|
||||
* @return The deviceId.
|
||||
*/
|
||||
java.lang.String getDeviceId();
|
||||
/**
|
||||
* <code>string device_id = 3;</code>
|
||||
* @return The bytes for deviceId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getDeviceIdBytes();
|
||||
|
||||
/**
|
||||
* <code>string source_track_id = 4;</code>
|
||||
* @return The sourceTrackId.
|
||||
*/
|
||||
java.lang.String getSourceTrackId();
|
||||
/**
|
||||
* <code>string source_track_id = 4;</code>
|
||||
* @return The bytes for sourceTrackId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSourceTrackIdBytes();
|
||||
|
||||
/**
|
||||
* <code>string codec = 5;</code>
|
||||
* @return The codec.
|
||||
*/
|
||||
java.lang.String getCodec();
|
||||
/**
|
||||
* <code>string codec = 5;</code>
|
||||
* @return The bytes for codec.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCodecBytes();
|
||||
|
||||
/**
|
||||
* <code>string payload_format = 6;</code>
|
||||
* @return The payloadFormat.
|
||||
*/
|
||||
java.lang.String getPayloadFormat();
|
||||
/**
|
||||
* <code>string payload_format = 6;</code>
|
||||
* @return The bytes for payloadFormat.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPayloadFormatBytes();
|
||||
|
||||
/**
|
||||
* <code>uint64 codec_generation = 7;</code>
|
||||
* @return The codecGeneration.
|
||||
*/
|
||||
long getCodecGeneration();
|
||||
|
||||
/**
|
||||
* <code>uint32 codec_generation_token = 8;</code>
|
||||
* @return The codecGenerationToken.
|
||||
*/
|
||||
int getCodecGenerationToken();
|
||||
|
||||
/**
|
||||
* <code>uint32 width = 9;</code>
|
||||
* @return The width.
|
||||
*/
|
||||
int getWidth();
|
||||
|
||||
/**
|
||||
* <code>uint32 height = 10;</code>
|
||||
* @return The height.
|
||||
*/
|
||||
int getHeight();
|
||||
|
||||
/**
|
||||
* <code>uint32 frames_per_second = 11;</code>
|
||||
* @return The framesPerSecond.
|
||||
*/
|
||||
int getFramesPerSecond();
|
||||
|
||||
/**
|
||||
* <code>uint32 sample_rate = 12;</code>
|
||||
* @return The sampleRate.
|
||||
*/
|
||||
int getSampleRate();
|
||||
|
||||
/**
|
||||
* <code>uint32 channels = 13;</code>
|
||||
* @return The channels.
|
||||
*/
|
||||
int getChannels();
|
||||
|
||||
/**
|
||||
* <code>bytes codec_config = 14;</code>
|
||||
* @return The codecConfig.
|
||||
*/
|
||||
com.google.protobuf.ByteString getCodecConfig();
|
||||
}
|
||||
@ -0,0 +1,811 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code cmvr.quic_gateway.v1.NetworkInterfaceAddress}
|
||||
*/
|
||||
public final class NetworkInterfaceAddress extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:cmvr.quic_gateway.v1.NetworkInterfaceAddress)
|
||||
NetworkInterfaceAddressOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use NetworkInterfaceAddress.newBuilder() to construct.
|
||||
private NetworkInterfaceAddress(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private NetworkInterfaceAddress() {
|
||||
interfaceName_ = "";
|
||||
ipAddress_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new NetworkInterfaceAddress();
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.class, com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.Builder.class);
|
||||
}
|
||||
|
||||
public static final int INTERFACE_NAME_FIELD_NUMBER = 1;
|
||||
@SuppressWarnings("serial")
|
||||
private volatile java.lang.Object interfaceName_ = "";
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return The interfaceName.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.lang.String getInterfaceName() {
|
||||
java.lang.Object ref = interfaceName_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
interfaceName_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return The bytes for interfaceName.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.ByteString
|
||||
getInterfaceNameBytes() {
|
||||
java.lang.Object ref = interfaceName_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
interfaceName_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int IP_ADDRESS_FIELD_NUMBER = 2;
|
||||
@SuppressWarnings("serial")
|
||||
private volatile java.lang.Object ipAddress_ = "";
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return The ipAddress.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.lang.String getIpAddress() {
|
||||
java.lang.Object ref = ipAddress_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
ipAddress_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return The bytes for ipAddress.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.ByteString
|
||||
getIpAddressBytes() {
|
||||
java.lang.Object ref = ipAddress_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
ipAddress_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int FAMILY_FIELD_NUMBER = 3;
|
||||
private int family_ = 0;
|
||||
/**
|
||||
* <code>int32 family = 3;</code>
|
||||
* @return The family.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getFamily() {
|
||||
return family_;
|
||||
}
|
||||
|
||||
public static final int LOOPBACK_FIELD_NUMBER = 4;
|
||||
private boolean loopback_ = false;
|
||||
/**
|
||||
* <code>bool loopback = 4;</code>
|
||||
* @return The loopback.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean getLoopback() {
|
||||
return loopback_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interfaceName_)) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, interfaceName_);
|
||||
}
|
||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_);
|
||||
}
|
||||
if (family_ != 0) {
|
||||
output.writeInt32(3, family_);
|
||||
}
|
||||
if (loopback_ != false) {
|
||||
output.writeBool(4, loopback_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interfaceName_)) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, interfaceName_);
|
||||
}
|
||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_);
|
||||
}
|
||||
if (family_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(3, family_);
|
||||
}
|
||||
if (loopback_ != false) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBoolSize(4, loopback_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof com.cmvr.quic.gateway.v1.NetworkInterfaceAddress)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddress other = (com.cmvr.quic.gateway.v1.NetworkInterfaceAddress) obj;
|
||||
|
||||
if (!getInterfaceName()
|
||||
.equals(other.getInterfaceName())) return false;
|
||||
if (!getIpAddress()
|
||||
.equals(other.getIpAddress())) return false;
|
||||
if (getFamily()
|
||||
!= other.getFamily()) return false;
|
||||
if (getLoopback()
|
||||
!= other.getLoopback()) return false;
|
||||
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + INTERFACE_NAME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getInterfaceName().hashCode();
|
||||
hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getIpAddress().hashCode();
|
||||
hash = (37 * hash) + FAMILY_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getFamily();
|
||||
hash = (37 * hash) + LOOPBACK_FIELD_NUMBER;
|
||||
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
|
||||
getLoopback());
|
||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.cmvr.quic.gateway.v1.NetworkInterfaceAddress prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code cmvr.quic_gateway.v1.NetworkInterfaceAddress}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:cmvr.quic_gateway.v1.NetworkInterfaceAddress)
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddressOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.class, com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.newBuilder()
|
||||
private Builder() {
|
||||
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
bitField0_ = 0;
|
||||
interfaceName_ = "";
|
||||
ipAddress_ = "";
|
||||
family_ = 0;
|
||||
loopback_ = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NetworkInterfaceAddress getDefaultInstanceForType() {
|
||||
return com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NetworkInterfaceAddress build() {
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddress result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NetworkInterfaceAddress buildPartial() {
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddress result = new com.cmvr.quic.gateway.v1.NetworkInterfaceAddress(this);
|
||||
if (bitField0_ != 0) { buildPartial0(result); }
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
private void buildPartial0(com.cmvr.quic.gateway.v1.NetworkInterfaceAddress result) {
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||
result.interfaceName_ = interfaceName_;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||
result.ipAddress_ = ipAddress_;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||
result.family_ = family_;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000008) != 0)) {
|
||||
result.loopback_ = loopback_;
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof com.cmvr.quic.gateway.v1.NetworkInterfaceAddress) {
|
||||
return mergeFrom((com.cmvr.quic.gateway.v1.NetworkInterfaceAddress)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.cmvr.quic.gateway.v1.NetworkInterfaceAddress other) {
|
||||
if (other == com.cmvr.quic.gateway.v1.NetworkInterfaceAddress.getDefaultInstance()) return this;
|
||||
if (!other.getInterfaceName().isEmpty()) {
|
||||
interfaceName_ = other.interfaceName_;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
}
|
||||
if (!other.getIpAddress().isEmpty()) {
|
||||
ipAddress_ = other.ipAddress_;
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
}
|
||||
if (other.getFamily() != 0) {
|
||||
setFamily(other.getFamily());
|
||||
}
|
||||
if (other.getLoopback() != false) {
|
||||
setLoopback(other.getLoopback());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
case 10: {
|
||||
interfaceName_ = input.readStringRequireUtf8();
|
||||
bitField0_ |= 0x00000001;
|
||||
break;
|
||||
} // case 10
|
||||
case 18: {
|
||||
ipAddress_ = input.readStringRequireUtf8();
|
||||
bitField0_ |= 0x00000002;
|
||||
break;
|
||||
} // case 18
|
||||
case 24: {
|
||||
family_ = input.readInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
break;
|
||||
} // case 24
|
||||
case 32: {
|
||||
loopback_ = input.readBool();
|
||||
bitField0_ |= 0x00000008;
|
||||
break;
|
||||
} // case 32
|
||||
default: {
|
||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||
done = true; // was an endgroup tag
|
||||
}
|
||||
break;
|
||||
} // default:
|
||||
} // switch (tag)
|
||||
} // while (!done)
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
onChanged();
|
||||
} // finally
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.lang.Object interfaceName_ = "";
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return The interfaceName.
|
||||
*/
|
||||
public java.lang.String getInterfaceName() {
|
||||
java.lang.Object ref = interfaceName_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
interfaceName_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return The bytes for interfaceName.
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getInterfaceNameBytes() {
|
||||
java.lang.Object ref = interfaceName_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
interfaceName_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @param value The interfaceName to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setInterfaceName(
|
||||
java.lang.String value) {
|
||||
if (value == null) { throw new NullPointerException(); }
|
||||
interfaceName_ = value;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearInterfaceName() {
|
||||
interfaceName_ = getDefaultInstance().getInterfaceName();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @param value The bytes for interfaceName to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setInterfaceNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) { throw new NullPointerException(); }
|
||||
checkByteStringIsUtf8(value);
|
||||
interfaceName_ = value;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private java.lang.Object ipAddress_ = "";
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return The ipAddress.
|
||||
*/
|
||||
public java.lang.String getIpAddress() {
|
||||
java.lang.Object ref = ipAddress_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
ipAddress_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return The bytes for ipAddress.
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIpAddressBytes() {
|
||||
java.lang.Object ref = ipAddress_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
ipAddress_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @param value The ipAddress to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setIpAddress(
|
||||
java.lang.String value) {
|
||||
if (value == null) { throw new NullPointerException(); }
|
||||
ipAddress_ = value;
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearIpAddress() {
|
||||
ipAddress_ = getDefaultInstance().getIpAddress();
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @param value The bytes for ipAddress to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setIpAddressBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) { throw new NullPointerException(); }
|
||||
checkByteStringIsUtf8(value);
|
||||
ipAddress_ = value;
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int family_ ;
|
||||
/**
|
||||
* <code>int32 family = 3;</code>
|
||||
* @return The family.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getFamily() {
|
||||
return family_;
|
||||
}
|
||||
/**
|
||||
* <code>int32 family = 3;</code>
|
||||
* @param value The family to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setFamily(int value) {
|
||||
|
||||
family_ = value;
|
||||
bitField0_ |= 0x00000004;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>int32 family = 3;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearFamily() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
family_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean loopback_ ;
|
||||
/**
|
||||
* <code>bool loopback = 4;</code>
|
||||
* @return The loopback.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean getLoopback() {
|
||||
return loopback_;
|
||||
}
|
||||
/**
|
||||
* <code>bool loopback = 4;</code>
|
||||
* @param value The loopback to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setLoopback(boolean value) {
|
||||
|
||||
loopback_ = value;
|
||||
bitField0_ |= 0x00000008;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>bool loopback = 4;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearLoopback() {
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
loopback_ = false;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:cmvr.quic_gateway.v1.NetworkInterfaceAddress)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:cmvr.quic_gateway.v1.NetworkInterfaceAddress)
|
||||
private static final com.cmvr.quic.gateway.v1.NetworkInterfaceAddress DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new com.cmvr.quic.gateway.v1.NetworkInterfaceAddress();
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NetworkInterfaceAddress getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<NetworkInterfaceAddress>
|
||||
PARSER = new com.google.protobuf.AbstractParser<NetworkInterfaceAddress>() {
|
||||
@java.lang.Override
|
||||
public NetworkInterfaceAddress parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
Builder builder = newBuilder();
|
||||
try {
|
||||
builder.mergeFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(builder.buildPartial());
|
||||
} catch (com.google.protobuf.UninitializedMessageException e) {
|
||||
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(e)
|
||||
.setUnfinishedMessage(builder.buildPartial());
|
||||
}
|
||||
return builder.buildPartial();
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<NetworkInterfaceAddress> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<NetworkInterfaceAddress> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NetworkInterfaceAddress getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface NetworkInterfaceAddressOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.NetworkInterfaceAddress)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return The interfaceName.
|
||||
*/
|
||||
java.lang.String getInterfaceName();
|
||||
/**
|
||||
* <code>string interface_name = 1;</code>
|
||||
* @return The bytes for interfaceName.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getInterfaceNameBytes();
|
||||
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return The ipAddress.
|
||||
*/
|
||||
java.lang.String getIpAddress();
|
||||
/**
|
||||
* <code>string ip_address = 2;</code>
|
||||
* @return The bytes for ipAddress.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIpAddressBytes();
|
||||
|
||||
/**
|
||||
* <code>int32 family = 3;</code>
|
||||
* @return The family.
|
||||
*/
|
||||
int getFamily();
|
||||
|
||||
/**
|
||||
* <code>bool loopback = 4;</code>
|
||||
* @return The loopback.
|
||||
*/
|
||||
boolean getLoopback();
|
||||
}
|
||||
@ -0,0 +1,760 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code cmvr.quic_gateway.v1.NodeEvent}
|
||||
*/
|
||||
public final class NodeEvent extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:cmvr.quic_gateway.v1.NodeEvent)
|
||||
NodeEventOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use NodeEvent.newBuilder() to construct.
|
||||
private NodeEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private NodeEvent() {
|
||||
type_ = 0;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new NodeEvent();
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NodeEvent_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NodeEvent_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.cmvr.quic.gateway.v1.NodeEvent.class, com.cmvr.quic.gateway.v1.NodeEvent.Builder.class);
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int TYPE_FIELD_NUMBER = 1;
|
||||
private int type_ = 0;
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return The enum numeric value on the wire for type.
|
||||
*/
|
||||
@java.lang.Override public int getTypeValue() {
|
||||
return type_;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return The type.
|
||||
*/
|
||||
@java.lang.Override public com.cmvr.quic.gateway.v1.NodeEventType getType() {
|
||||
com.cmvr.quic.gateway.v1.NodeEventType result = com.cmvr.quic.gateway.v1.NodeEventType.forNumber(type_);
|
||||
return result == null ? com.cmvr.quic.gateway.v1.NodeEventType.UNRECOGNIZED : result;
|
||||
}
|
||||
|
||||
public static final int NODE_FIELD_NUMBER = 2;
|
||||
private com.cmvr.quic.gateway.v1.NodeSnapshot node_;
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
* @return Whether the node field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasNode() {
|
||||
return ((bitField0_ & 0x00000001) != 0);
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
* @return The node.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeSnapshot getNode() {
|
||||
return node_ == null ? com.cmvr.quic.gateway.v1.NodeSnapshot.getDefaultInstance() : node_;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeSnapshotOrBuilder getNodeOrBuilder() {
|
||||
return node_ == null ? com.cmvr.quic.gateway.v1.NodeSnapshot.getDefaultInstance() : node_;
|
||||
}
|
||||
|
||||
public static final int EVENT_TIME_UNIX_MS_FIELD_NUMBER = 3;
|
||||
private long eventTimeUnixMs_ = 0L;
|
||||
/**
|
||||
* <code>uint64 event_time_unix_ms = 3;</code>
|
||||
* @return The eventTimeUnixMs.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public long getEventTimeUnixMs() {
|
||||
return eventTimeUnixMs_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (type_ != com.cmvr.quic.gateway.v1.NodeEventType.NODE_EVENT_TYPE_UNSPECIFIED.getNumber()) {
|
||||
output.writeEnum(1, type_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
output.writeMessage(2, getNode());
|
||||
}
|
||||
if (eventTimeUnixMs_ != 0L) {
|
||||
output.writeUInt64(3, eventTimeUnixMs_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (type_ != com.cmvr.quic.gateway.v1.NodeEventType.NODE_EVENT_TYPE_UNSPECIFIED.getNumber()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeEnumSize(1, type_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getNode());
|
||||
}
|
||||
if (eventTimeUnixMs_ != 0L) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt64Size(3, eventTimeUnixMs_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof com.cmvr.quic.gateway.v1.NodeEvent)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
com.cmvr.quic.gateway.v1.NodeEvent other = (com.cmvr.quic.gateway.v1.NodeEvent) obj;
|
||||
|
||||
if (type_ != other.type_) return false;
|
||||
if (hasNode() != other.hasNode()) return false;
|
||||
if (hasNode()) {
|
||||
if (!getNode()
|
||||
.equals(other.getNode())) return false;
|
||||
}
|
||||
if (getEventTimeUnixMs()
|
||||
!= other.getEventTimeUnixMs()) return false;
|
||||
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + TYPE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + type_;
|
||||
if (hasNode()) {
|
||||
hash = (37 * hash) + NODE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getNode().hashCode();
|
||||
}
|
||||
hash = (37 * hash) + EVENT_TIME_UNIX_MS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
|
||||
getEventTimeUnixMs());
|
||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.cmvr.quic.gateway.v1.NodeEvent prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code cmvr.quic_gateway.v1.NodeEvent}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:cmvr.quic_gateway.v1.NodeEvent)
|
||||
com.cmvr.quic.gateway.v1.NodeEventOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NodeEvent_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NodeEvent_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
com.cmvr.quic.gateway.v1.NodeEvent.class, com.cmvr.quic.gateway.v1.NodeEvent.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using com.cmvr.quic.gateway.v1.NodeEvent.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
getNodeFieldBuilder();
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
bitField0_ = 0;
|
||||
type_ = 0;
|
||||
node_ = null;
|
||||
if (nodeBuilder_ != null) {
|
||||
nodeBuilder_.dispose();
|
||||
nodeBuilder_ = null;
|
||||
}
|
||||
eventTimeUnixMs_ = 0L;
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.internal_static_cmvr_quic_gateway_v1_NodeEvent_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeEvent getDefaultInstanceForType() {
|
||||
return com.cmvr.quic.gateway.v1.NodeEvent.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeEvent build() {
|
||||
com.cmvr.quic.gateway.v1.NodeEvent result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeEvent buildPartial() {
|
||||
com.cmvr.quic.gateway.v1.NodeEvent result = new com.cmvr.quic.gateway.v1.NodeEvent(this);
|
||||
if (bitField0_ != 0) { buildPartial0(result); }
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
private void buildPartial0(com.cmvr.quic.gateway.v1.NodeEvent result) {
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||
result.type_ = type_;
|
||||
}
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||
result.node_ = nodeBuilder_ == null
|
||||
? node_
|
||||
: nodeBuilder_.build();
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||
result.eventTimeUnixMs_ = eventTimeUnixMs_;
|
||||
}
|
||||
result.bitField0_ |= to_bitField0_;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof com.cmvr.quic.gateway.v1.NodeEvent) {
|
||||
return mergeFrom((com.cmvr.quic.gateway.v1.NodeEvent)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.cmvr.quic.gateway.v1.NodeEvent other) {
|
||||
if (other == com.cmvr.quic.gateway.v1.NodeEvent.getDefaultInstance()) return this;
|
||||
if (other.type_ != 0) {
|
||||
setTypeValue(other.getTypeValue());
|
||||
}
|
||||
if (other.hasNode()) {
|
||||
mergeNode(other.getNode());
|
||||
}
|
||||
if (other.getEventTimeUnixMs() != 0L) {
|
||||
setEventTimeUnixMs(other.getEventTimeUnixMs());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
case 8: {
|
||||
type_ = input.readEnum();
|
||||
bitField0_ |= 0x00000001;
|
||||
break;
|
||||
} // case 8
|
||||
case 18: {
|
||||
input.readMessage(
|
||||
getNodeFieldBuilder().getBuilder(),
|
||||
extensionRegistry);
|
||||
bitField0_ |= 0x00000002;
|
||||
break;
|
||||
} // case 18
|
||||
case 24: {
|
||||
eventTimeUnixMs_ = input.readUInt64();
|
||||
bitField0_ |= 0x00000004;
|
||||
break;
|
||||
} // case 24
|
||||
default: {
|
||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||
done = true; // was an endgroup tag
|
||||
}
|
||||
break;
|
||||
} // default:
|
||||
} // switch (tag)
|
||||
} // while (!done)
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
onChanged();
|
||||
} // finally
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private int type_ = 0;
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return The enum numeric value on the wire for type.
|
||||
*/
|
||||
@java.lang.Override public int getTypeValue() {
|
||||
return type_;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @param value The enum numeric value on the wire for type to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setTypeValue(int value) {
|
||||
type_ = value;
|
||||
bitField0_ |= 0x00000001;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return The type.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeEventType getType() {
|
||||
com.cmvr.quic.gateway.v1.NodeEventType result = com.cmvr.quic.gateway.v1.NodeEventType.forNumber(type_);
|
||||
return result == null ? com.cmvr.quic.gateway.v1.NodeEventType.UNRECOGNIZED : result;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @param value The type to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setType(com.cmvr.quic.gateway.v1.NodeEventType value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
type_ = value.getNumber();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearType() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
type_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private com.cmvr.quic.gateway.v1.NodeSnapshot node_;
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshot, com.cmvr.quic.gateway.v1.NodeSnapshot.Builder, com.cmvr.quic.gateway.v1.NodeSnapshotOrBuilder> nodeBuilder_;
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
* @return Whether the node field is set.
|
||||
*/
|
||||
public boolean hasNode() {
|
||||
return ((bitField0_ & 0x00000002) != 0);
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
* @return The node.
|
||||
*/
|
||||
public com.cmvr.quic.gateway.v1.NodeSnapshot getNode() {
|
||||
if (nodeBuilder_ == null) {
|
||||
return node_ == null ? com.cmvr.quic.gateway.v1.NodeSnapshot.getDefaultInstance() : node_;
|
||||
} else {
|
||||
return nodeBuilder_.getMessage();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
public Builder setNode(com.cmvr.quic.gateway.v1.NodeSnapshot value) {
|
||||
if (nodeBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
node_ = value;
|
||||
} else {
|
||||
nodeBuilder_.setMessage(value);
|
||||
}
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
public Builder setNode(
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshot.Builder builderForValue) {
|
||||
if (nodeBuilder_ == null) {
|
||||
node_ = builderForValue.build();
|
||||
} else {
|
||||
nodeBuilder_.setMessage(builderForValue.build());
|
||||
}
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
public Builder mergeNode(com.cmvr.quic.gateway.v1.NodeSnapshot value) {
|
||||
if (nodeBuilder_ == null) {
|
||||
if (((bitField0_ & 0x00000002) != 0) &&
|
||||
node_ != null &&
|
||||
node_ != com.cmvr.quic.gateway.v1.NodeSnapshot.getDefaultInstance()) {
|
||||
getNodeBuilder().mergeFrom(value);
|
||||
} else {
|
||||
node_ = value;
|
||||
}
|
||||
} else {
|
||||
nodeBuilder_.mergeFrom(value);
|
||||
}
|
||||
if (node_ != null) {
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
public Builder clearNode() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
node_ = null;
|
||||
if (nodeBuilder_ != null) {
|
||||
nodeBuilder_.dispose();
|
||||
nodeBuilder_ = null;
|
||||
}
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
public com.cmvr.quic.gateway.v1.NodeSnapshot.Builder getNodeBuilder() {
|
||||
bitField0_ |= 0x00000002;
|
||||
onChanged();
|
||||
return getNodeFieldBuilder().getBuilder();
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
public com.cmvr.quic.gateway.v1.NodeSnapshotOrBuilder getNodeOrBuilder() {
|
||||
if (nodeBuilder_ != null) {
|
||||
return nodeBuilder_.getMessageOrBuilder();
|
||||
} else {
|
||||
return node_ == null ?
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshot.getDefaultInstance() : node_;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshot, com.cmvr.quic.gateway.v1.NodeSnapshot.Builder, com.cmvr.quic.gateway.v1.NodeSnapshotOrBuilder>
|
||||
getNodeFieldBuilder() {
|
||||
if (nodeBuilder_ == null) {
|
||||
nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshot, com.cmvr.quic.gateway.v1.NodeSnapshot.Builder, com.cmvr.quic.gateway.v1.NodeSnapshotOrBuilder>(
|
||||
getNode(),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
node_ = null;
|
||||
}
|
||||
return nodeBuilder_;
|
||||
}
|
||||
|
||||
private long eventTimeUnixMs_ ;
|
||||
/**
|
||||
* <code>uint64 event_time_unix_ms = 3;</code>
|
||||
* @return The eventTimeUnixMs.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public long getEventTimeUnixMs() {
|
||||
return eventTimeUnixMs_;
|
||||
}
|
||||
/**
|
||||
* <code>uint64 event_time_unix_ms = 3;</code>
|
||||
* @param value The eventTimeUnixMs to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setEventTimeUnixMs(long value) {
|
||||
|
||||
eventTimeUnixMs_ = value;
|
||||
bitField0_ |= 0x00000004;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint64 event_time_unix_ms = 3;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearEventTimeUnixMs() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
eventTimeUnixMs_ = 0L;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:cmvr.quic_gateway.v1.NodeEvent)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:cmvr.quic_gateway.v1.NodeEvent)
|
||||
private static final com.cmvr.quic.gateway.v1.NodeEvent DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new com.cmvr.quic.gateway.v1.NodeEvent();
|
||||
}
|
||||
|
||||
public static com.cmvr.quic.gateway.v1.NodeEvent getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<NodeEvent>
|
||||
PARSER = new com.google.protobuf.AbstractParser<NodeEvent>() {
|
||||
@java.lang.Override
|
||||
public NodeEvent parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
Builder builder = newBuilder();
|
||||
try {
|
||||
builder.mergeFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(builder.buildPartial());
|
||||
} catch (com.google.protobuf.UninitializedMessageException e) {
|
||||
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(e)
|
||||
.setUnfinishedMessage(builder.buildPartial());
|
||||
}
|
||||
return builder.buildPartial();
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<NodeEvent> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<NodeEvent> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.cmvr.quic.gateway.v1.NodeEvent getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface NodeEventOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.NodeEvent)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return The enum numeric value on the wire for type.
|
||||
*/
|
||||
int getTypeValue();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeEventType type = 1;</code>
|
||||
* @return The type.
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.NodeEventType getType();
|
||||
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
* @return Whether the node field is set.
|
||||
*/
|
||||
boolean hasNode();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
* @return The node.
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshot getNode();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.NodeSnapshot node = 2;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.NodeSnapshotOrBuilder getNodeOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>uint64 event_time_unix_ms = 3;</code>
|
||||
* @return The eventTimeUnixMs.
|
||||
*/
|
||||
long getEventTimeUnixMs();
|
||||
}
|
||||
@ -0,0 +1,141 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code cmvr.quic_gateway.v1.NodeEventType}
|
||||
*/
|
||||
public enum NodeEventType
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_UNSPECIFIED = 0;</code>
|
||||
*/
|
||||
NODE_EVENT_TYPE_UNSPECIFIED(0),
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_REGISTERED = 1;</code>
|
||||
*/
|
||||
NODE_EVENT_TYPE_REGISTERED(1),
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_HEARTBEAT = 2;</code>
|
||||
*/
|
||||
NODE_EVENT_TYPE_HEARTBEAT(2),
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_OFFLINE = 3;</code>
|
||||
*/
|
||||
NODE_EVENT_TYPE_OFFLINE(3),
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_MEDIA_CHANGED = 4;</code>
|
||||
*/
|
||||
NODE_EVENT_TYPE_MEDIA_CHANGED(4),
|
||||
UNRECOGNIZED(-1),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_UNSPECIFIED = 0;</code>
|
||||
*/
|
||||
public static final int NODE_EVENT_TYPE_UNSPECIFIED_VALUE = 0;
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_REGISTERED = 1;</code>
|
||||
*/
|
||||
public static final int NODE_EVENT_TYPE_REGISTERED_VALUE = 1;
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_HEARTBEAT = 2;</code>
|
||||
*/
|
||||
public static final int NODE_EVENT_TYPE_HEARTBEAT_VALUE = 2;
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_OFFLINE = 3;</code>
|
||||
*/
|
||||
public static final int NODE_EVENT_TYPE_OFFLINE_VALUE = 3;
|
||||
/**
|
||||
* <code>NODE_EVENT_TYPE_MEDIA_CHANGED = 4;</code>
|
||||
*/
|
||||
public static final int NODE_EVENT_TYPE_MEDIA_CHANGED_VALUE = 4;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
if (this == UNRECOGNIZED) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"Can't get the number of an unknown enum value.");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value The numeric wire value of the corresponding enum entry.
|
||||
* @return The enum associated with the given numeric wire value.
|
||||
* @deprecated Use {@link #forNumber(int)} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public static NodeEventType valueOf(int value) {
|
||||
return forNumber(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value The numeric wire value of the corresponding enum entry.
|
||||
* @return The enum associated with the given numeric wire value.
|
||||
*/
|
||||
public static NodeEventType forNumber(int value) {
|
||||
switch (value) {
|
||||
case 0: return NODE_EVENT_TYPE_UNSPECIFIED;
|
||||
case 1: return NODE_EVENT_TYPE_REGISTERED;
|
||||
case 2: return NODE_EVENT_TYPE_HEARTBEAT;
|
||||
case 3: return NODE_EVENT_TYPE_OFFLINE;
|
||||
case 4: return NODE_EVENT_TYPE_MEDIA_CHANGED;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<NodeEventType>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static final com.google.protobuf.Internal.EnumLiteMap<
|
||||
NodeEventType> internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<NodeEventType>() {
|
||||
public NodeEventType findValueByNumber(int number) {
|
||||
return NodeEventType.forNumber(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
if (this == UNRECOGNIZED) {
|
||||
throw new java.lang.IllegalStateException(
|
||||
"Can't get the descriptor of an unrecognized enum value.");
|
||||
}
|
||||
return getDescriptor().getValues().get(ordinal());
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return com.cmvr.quic.gateway.v1.QuicGatewayProtocol.getDescriptor().getEnumTypes().get(0);
|
||||
}
|
||||
|
||||
private static final NodeEventType[] VALUES = values();
|
||||
|
||||
public static NodeEventType valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
if (desc.getIndex() == -1) {
|
||||
return UNRECOGNIZED;
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int value;
|
||||
|
||||
private NodeEventType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:cmvr.quic_gateway.v1.NodeEventType)
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,190 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public interface NodeSnapshotOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:cmvr.quic_gateway.v1.NodeSnapshot)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>string node_id = 1;</code>
|
||||
* @return The nodeId.
|
||||
*/
|
||||
java.lang.String getNodeId();
|
||||
/**
|
||||
* <code>string node_id = 1;</code>
|
||||
* @return The bytes for nodeId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNodeIdBytes();
|
||||
|
||||
/**
|
||||
* <code>string boot_id = 2;</code>
|
||||
* @return The bootId.
|
||||
*/
|
||||
java.lang.String getBootId();
|
||||
/**
|
||||
* <code>string boot_id = 2;</code>
|
||||
* @return The bytes for bootId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getBootIdBytes();
|
||||
|
||||
/**
|
||||
* <code>string session_id = 3;</code>
|
||||
* @return The sessionId.
|
||||
*/
|
||||
java.lang.String getSessionId();
|
||||
/**
|
||||
* <code>string session_id = 3;</code>
|
||||
* @return The bytes for sessionId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSessionIdBytes();
|
||||
|
||||
/**
|
||||
* <code>string software_version = 4;</code>
|
||||
* @return The softwareVersion.
|
||||
*/
|
||||
java.lang.String getSoftwareVersion();
|
||||
/**
|
||||
* <code>string software_version = 4;</code>
|
||||
* @return The bytes for softwareVersion.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSoftwareVersionBytes();
|
||||
|
||||
/**
|
||||
* <code>bool online = 5;</code>
|
||||
* @return The online.
|
||||
*/
|
||||
boolean getOnline();
|
||||
|
||||
/**
|
||||
* <code>uint64 registered_at_unix_ms = 6;</code>
|
||||
* @return The registeredAtUnixMs.
|
||||
*/
|
||||
long getRegisteredAtUnixMs();
|
||||
|
||||
/**
|
||||
* <code>uint64 last_heartbeat_at_unix_ms = 7;</code>
|
||||
* @return The lastHeartbeatAtUnixMs.
|
||||
*/
|
||||
long getLastHeartbeatAtUnixMs();
|
||||
|
||||
/**
|
||||
* <code>uint64 heartbeat_sequence = 8;</code>
|
||||
* @return The heartbeatSequence.
|
||||
*/
|
||||
long getHeartbeatSequence();
|
||||
|
||||
/**
|
||||
* <code>string observed_source_ip = 9;</code>
|
||||
* @return The observedSourceIp.
|
||||
*/
|
||||
java.lang.String getObservedSourceIp();
|
||||
/**
|
||||
* <code>string observed_source_ip = 9;</code>
|
||||
* @return The bytes for observedSourceIp.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getObservedSourceIpBytes();
|
||||
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.GrpcEndpoint grpc_endpoint = 10;</code>
|
||||
* @return Whether the grpcEndpoint field is set.
|
||||
*/
|
||||
boolean hasGrpcEndpoint();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.GrpcEndpoint grpc_endpoint = 10;</code>
|
||||
* @return The grpcEndpoint.
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpoint getGrpcEndpoint();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.GrpcEndpoint grpc_endpoint = 10;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.GrpcEndpointOrBuilder getGrpcEndpointOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.NetworkInterfaceAddress local_interfaces = 11;</code>
|
||||
*/
|
||||
java.util.List<com.cmvr.quic.gateway.v1.NetworkInterfaceAddress>
|
||||
getLocalInterfacesList();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.NetworkInterfaceAddress local_interfaces = 11;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddress getLocalInterfaces(int index);
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.NetworkInterfaceAddress local_interfaces = 11;</code>
|
||||
*/
|
||||
int getLocalInterfacesCount();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.NetworkInterfaceAddress local_interfaces = 11;</code>
|
||||
*/
|
||||
java.util.List<? extends com.cmvr.quic.gateway.v1.NetworkInterfaceAddressOrBuilder>
|
||||
getLocalInterfacesOrBuilderList();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.NetworkInterfaceAddress local_interfaces = 11;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.NetworkInterfaceAddressOrBuilder getLocalInterfacesOrBuilder(
|
||||
int index);
|
||||
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.DeviceManagerSnapshot device_manager = 12;</code>
|
||||
* @return Whether the deviceManager field is set.
|
||||
*/
|
||||
boolean hasDeviceManager();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.DeviceManagerSnapshot device_manager = 12;</code>
|
||||
* @return The deviceManager.
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.DeviceManagerSnapshot getDeviceManager();
|
||||
/**
|
||||
* <code>.cmvr.quic_gateway.v1.DeviceManagerSnapshot device_manager = 12;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.DeviceManagerSnapshotOrBuilder getDeviceManagerOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>uint64 media_session_epoch = 13;</code>
|
||||
* @return The mediaSessionEpoch.
|
||||
*/
|
||||
long getMediaSessionEpoch();
|
||||
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.MediaTrack tracks = 14;</code>
|
||||
*/
|
||||
java.util.List<com.cmvr.quic.gateway.v1.MediaTrack>
|
||||
getTracksList();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.MediaTrack tracks = 14;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.MediaTrack getTracks(int index);
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.MediaTrack tracks = 14;</code>
|
||||
*/
|
||||
int getTracksCount();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.MediaTrack tracks = 14;</code>
|
||||
*/
|
||||
java.util.List<? extends com.cmvr.quic.gateway.v1.MediaTrackOrBuilder>
|
||||
getTracksOrBuilderList();
|
||||
/**
|
||||
* <code>repeated .cmvr.quic_gateway.v1.MediaTrack tracks = 14;</code>
|
||||
*/
|
||||
com.cmvr.quic.gateway.v1.MediaTrackOrBuilder getTracksOrBuilder(
|
||||
int index);
|
||||
|
||||
/**
|
||||
* <code>string robot_id = 15;</code>
|
||||
* @return The robotId.
|
||||
*/
|
||||
java.lang.String getRobotId();
|
||||
/**
|
||||
* <code>string robot_id = 15;</code>
|
||||
* @return The bytes for robotId.
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getRobotIdBytes();
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: cmvr/quic_gateway/v1/quic_gateway.proto
|
||||
|
||||
// Protobuf Java Version: 3.25.5
|
||||
package com.cmvr.quic.gateway.v1;
|
||||
|
||||
public final class QuicGatewayProtocol {
|
||||
private QuicGatewayProtocol() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_NodeEvent_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_NodeEvent_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_NodeSnapshot_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_NodeSnapshot_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_DeviceManagerSnapshot_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_DeviceManagerSnapshot_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_ManagedDeviceStatus_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_ManagedDeviceStatus_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_MediaTrack_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_MediaTrack_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_cmvr_quic_gateway_v1_MediaFrame_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_cmvr_quic_gateway_v1_MediaFrame_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\'cmvr/quic_gateway/v1/quic_gateway.prot" +
|
||||
"o\022\024cmvr.quic_gateway.v1\"\214\001\n\tNodeEvent\0221\n" +
|
||||
"\004type\030\001 \001(\0162#.cmvr.quic_gateway.v1.NodeE" +
|
||||
"ventType\0220\n\004node\030\002 \001(\0132\".cmvr.quic_gatew" +
|
||||
"ay.v1.NodeSnapshot\022\032\n\022event_time_unix_ms" +
|
||||
"\030\003 \001(\004\"\222\004\n\014NodeSnapshot\022\017\n\007node_id\030\001 \001(\t" +
|
||||
"\022\017\n\007boot_id\030\002 \001(\t\022\022\n\nsession_id\030\003 \001(\t\022\030\n" +
|
||||
"\020software_version\030\004 \001(\t\022\016\n\006online\030\005 \001(\010\022" +
|
||||
"\035\n\025registered_at_unix_ms\030\006 \001(\004\022!\n\031last_h" +
|
||||
"eartbeat_at_unix_ms\030\007 \001(\004\022\032\n\022heartbeat_s" +
|
||||
"equence\030\010 \001(\004\022\032\n\022observed_source_ip\030\t \001(" +
|
||||
"\t\0229\n\rgrpc_endpoint\030\n \001(\0132\".cmvr.quic_gat" +
|
||||
"eway.v1.GrpcEndpoint\022G\n\020local_interfaces" +
|
||||
"\030\013 \003(\0132-.cmvr.quic_gateway.v1.NetworkInt" +
|
||||
"erfaceAddress\022C\n\016device_manager\030\014 \001(\0132+." +
|
||||
"cmvr.quic_gateway.v1.DeviceManagerSnapsh" +
|
||||
"ot\022\033\n\023media_session_epoch\030\r \001(\004\0220\n\006track" +
|
||||
"s\030\016 \003(\0132 .cmvr.quic_gateway.v1.MediaTrac" +
|
||||
"k\022\020\n\010robot_id\030\017 \001(\t\"7\n\014GrpcEndpoint\022\014\n\004h" +
|
||||
"ost\030\001 \001(\t\022\014\n\004port\030\002 \001(\r\022\013\n\003tls\030\003 \001(\010\"g\n\027" +
|
||||
"NetworkInterfaceAddress\022\026\n\016interface_nam" +
|
||||
"e\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\016\n\006family\030\003 " +
|
||||
"\001(\005\022\020\n\010loopback\030\004 \001(\010\"\273\001\n\025DeviceManagerS" +
|
||||
"napshot\022\024\n\014manager_name\030\001 \001(\t\022\027\n\017manager" +
|
||||
"_version\030\002 \001(\t\022\033\n\023manager_description\030\003 " +
|
||||
"\001(\t\022\032\n\022sampled_at_unix_ms\030\004 \001(\004\022:\n\007devic" +
|
||||
"es\030\005 \003(\0132).cmvr.quic_gateway.v1.ManagedD" +
|
||||
"eviceStatus\"\316\001\n\023ManagedDeviceStatus\022\021\n\td" +
|
||||
"evice_id\030\001 \001(\t\022\014\n\004kind\030\002 \001(\005\022\021\n\ttype_nam" +
|
||||
"e\030\003 \001(\t\022\017\n\007enabled\030\004 \001(\010\022\025\n\rmanager_stat" +
|
||||
"e\030\005 \001(\005\022\016\n\006health\030\006 \001(\005\022\021\n\thas_error\030\007 \001" +
|
||||
"(\010\022\025\n\rerror_message\030\010 \001(\t\022!\n\031status_upda" +
|
||||
"ted_at_unix_ms\030\t \001(\004\"\260\002\n\nMediaTrack\022\020\n\010t" +
|
||||
"rack_id\030\001 \001(\r\022\014\n\004kind\030\002 \001(\005\022\021\n\tdevice_id" +
|
||||
"\030\003 \001(\t\022\027\n\017source_track_id\030\004 \001(\t\022\r\n\005codec" +
|
||||
"\030\005 \001(\t\022\026\n\016payload_format\030\006 \001(\t\022\030\n\020codec_" +
|
||||
"generation\030\007 \001(\004\022\036\n\026codec_generation_tok" +
|
||||
"en\030\010 \001(\r\022\r\n\005width\030\t \001(\r\022\016\n\006height\030\n \001(\r\022" +
|
||||
"\031\n\021frames_per_second\030\013 \001(\r\022\023\n\013sample_rat" +
|
||||
"e\030\014 \001(\r\022\020\n\010channels\030\r \001(\r\022\024\n\014codec_confi" +
|
||||
"g\030\016 \001(\014\"\376\001\n\nMediaFrame\022\017\n\007node_id\030\001 \001(\t\022" +
|
||||
"\022\n\nsession_id\030\002 \001(\t\022\025\n\rsession_epoch\030\003 \001" +
|
||||
"(\004\022\020\n\010track_id\030\004 \001(\r\022\014\n\004kind\030\005 \001(\005\022\r\n\005co" +
|
||||
"dec\030\006 \001(\t\022\026\n\016payload_format\030\007 \001(\t\022\027\n\017pac" +
|
||||
"ket_sequence\030\010 \001(\004\022\026\n\016frame_sequence\030\t \001" +
|
||||
"(\004\022\034\n\024capture_timestamp_us\030\n \001(\004\022\r\n\005flag" +
|
||||
"s\030\013 \001(\r\022\017\n\007payload\030\014 \001(\014*\257\001\n\rNodeEventTy" +
|
||||
"pe\022\037\n\033NODE_EVENT_TYPE_UNSPECIFIED\020\000\022\036\n\032N" +
|
||||
"ODE_EVENT_TYPE_REGISTERED\020\001\022\035\n\031NODE_EVEN" +
|
||||
"T_TYPE_HEARTBEAT\020\002\022\033\n\027NODE_EVENT_TYPE_OF" +
|
||||
"FLINE\020\003\022!\n\035NODE_EVENT_TYPE_MEDIA_CHANGED" +
|
||||
"\020\004B1\n\030com.cmvr.quic.gateway.v1B\023QuicGate" +
|
||||
"wayProtocolP\001b\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_cmvr_quic_gateway_v1_NodeEvent_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_cmvr_quic_gateway_v1_NodeEvent_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_NodeEvent_descriptor,
|
||||
new java.lang.String[] { "Type", "Node", "EventTimeUnixMs", });
|
||||
internal_static_cmvr_quic_gateway_v1_NodeSnapshot_descriptor =
|
||||
getDescriptor().getMessageTypes().get(1);
|
||||
internal_static_cmvr_quic_gateway_v1_NodeSnapshot_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_NodeSnapshot_descriptor,
|
||||
new java.lang.String[] { "NodeId", "BootId", "SessionId", "SoftwareVersion", "Online", "RegisteredAtUnixMs", "LastHeartbeatAtUnixMs", "HeartbeatSequence", "ObservedSourceIp", "GrpcEndpoint", "LocalInterfaces", "DeviceManager", "MediaSessionEpoch", "Tracks", "RobotId", });
|
||||
internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_descriptor =
|
||||
getDescriptor().getMessageTypes().get(2);
|
||||
internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_GrpcEndpoint_descriptor,
|
||||
new java.lang.String[] { "Host", "Port", "Tls", });
|
||||
internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_descriptor =
|
||||
getDescriptor().getMessageTypes().get(3);
|
||||
internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_NetworkInterfaceAddress_descriptor,
|
||||
new java.lang.String[] { "InterfaceName", "IpAddress", "Family", "Loopback", });
|
||||
internal_static_cmvr_quic_gateway_v1_DeviceManagerSnapshot_descriptor =
|
||||
getDescriptor().getMessageTypes().get(4);
|
||||
internal_static_cmvr_quic_gateway_v1_DeviceManagerSnapshot_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_DeviceManagerSnapshot_descriptor,
|
||||
new java.lang.String[] { "ManagerName", "ManagerVersion", "ManagerDescription", "SampledAtUnixMs", "Devices", });
|
||||
internal_static_cmvr_quic_gateway_v1_ManagedDeviceStatus_descriptor =
|
||||
getDescriptor().getMessageTypes().get(5);
|
||||
internal_static_cmvr_quic_gateway_v1_ManagedDeviceStatus_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_ManagedDeviceStatus_descriptor,
|
||||
new java.lang.String[] { "DeviceId", "Kind", "TypeName", "Enabled", "ManagerState", "Health", "HasError", "ErrorMessage", "StatusUpdatedAtUnixMs", });
|
||||
internal_static_cmvr_quic_gateway_v1_MediaTrack_descriptor =
|
||||
getDescriptor().getMessageTypes().get(6);
|
||||
internal_static_cmvr_quic_gateway_v1_MediaTrack_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_MediaTrack_descriptor,
|
||||
new java.lang.String[] { "TrackId", "Kind", "DeviceId", "SourceTrackId", "Codec", "PayloadFormat", "CodecGeneration", "CodecGenerationToken", "Width", "Height", "FramesPerSecond", "SampleRate", "Channels", "CodecConfig", });
|
||||
internal_static_cmvr_quic_gateway_v1_MediaFrame_descriptor =
|
||||
getDescriptor().getMessageTypes().get(7);
|
||||
internal_static_cmvr_quic_gateway_v1_MediaFrame_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_cmvr_quic_gateway_v1_MediaFrame_descriptor,
|
||||
new java.lang.String[] { "NodeId", "SessionId", "SessionEpoch", "TrackId", "Kind", "Codec", "PayloadFormat", "PacketSequence", "FrameSequence", "CaptureTimestampUs", "Flags", "Payload", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.cmvr.test.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Configuration
|
||||
public class MediaAnalysisAsyncConfig {
|
||||
|
||||
@Bean(name = "mediaAnalysisTaskExecutor")
|
||||
public ThreadPoolTaskExecutor mediaAnalysisTaskExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(4);
|
||||
executor.setMaxPoolSize(16);
|
||||
executor.setQueueCapacity(200);
|
||||
executor.setKeepAliveSeconds(300);
|
||||
executor.setThreadNamePrefix("media-analysis-");
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy());
|
||||
return executor;
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,7 @@ import com.cmvr.test.flow.context.TaskThreadRegistry;
|
||||
import com.cmvr.test.flow.runtime.engine.FlowItemExecutor;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteContext;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.operator.llm.AsyncMediaAnalysisCoordinator;
|
||||
import com.cmvr.test.service.ITeNodeInstService;
|
||||
import com.cmvr.test.service.ITeTaskInstService;
|
||||
import com.cmvr.test.model.domain.TeTaskInst;
|
||||
@ -60,6 +61,9 @@ public class FlowControlService {
|
||||
private final EdgeCameraService edgeCameraService;
|
||||
private final ITeTaskInstService taskInstService;
|
||||
|
||||
@Resource
|
||||
private AsyncMediaAnalysisCoordinator asyncMediaAnalysisCoordinator;
|
||||
|
||||
/**
|
||||
* 终止流程
|
||||
*/
|
||||
@ -75,6 +79,9 @@ public class FlowControlService {
|
||||
}
|
||||
// 先阻止节点继续执行,再清理设备与本地媒体会话,避免终止过程中重新登记录音/录像。
|
||||
taskInstHolder.syncStatus(instId, TaskStatusEnum.STOPPED);
|
||||
if (asyncMediaAnalysisCoordinator != null) {
|
||||
asyncMediaAnalysisCoordinator.cancelAll(instId);
|
||||
}
|
||||
taskThreadRegistry.interruptAll(instId);
|
||||
// 终止必须等设备和后端媒体会话完成清理后再返回,防止立即重跑命中旧录音/录像状态。
|
||||
stopAllRobots(ctx);
|
||||
|
||||
@ -6,6 +6,7 @@ import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import com.cmvr.test.flow.runtime.operator.llm.AsyncMediaAnalysisCoordinator;
|
||||
import com.cmvr.test.service.ex.ExAeEvaluationService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -21,6 +22,7 @@ public class FlowEndNodeHandler implements FlowNodeTypeHandler {
|
||||
|
||||
private final TaskInstHolder taskInstHolder;
|
||||
private final ExAeEvaluationService exAeEvaluationService;
|
||||
private final AsyncMediaAnalysisCoordinator asyncMediaAnalysisCoordinator;
|
||||
|
||||
@Resource(name = "threadPoolTaskExecutor")
|
||||
private final ThreadPoolTaskExecutor executor;
|
||||
@ -30,7 +32,18 @@ public class FlowEndNodeHandler implements FlowNodeTypeHandler {
|
||||
String instId = message.getInstId();
|
||||
String itemId = message.getItemId();
|
||||
String taskId = message.getTaskId();
|
||||
// Earlier items must not wait for media analysis; otherwise the next item
|
||||
// cannot start. The final END node is the task-level completion barrier.
|
||||
if (message.getPendingItemCount() == 0) {
|
||||
TaskNodeExecuteResult asyncResult = asyncMediaAnalysisCoordinator.awaitAll(instId);
|
||||
if (!asyncResult.isSuccess()) {
|
||||
return asyncResult;
|
||||
}
|
||||
}
|
||||
TaskContext context = taskInstHolder.getContext(instId);
|
||||
if (context == null) {
|
||||
return null;
|
||||
}
|
||||
RunModeEnum runMode = context.getRunMode();
|
||||
// if (runMode.equals(RunModeEnum.NORMAL) || runMode.equals(RunModeEnum.TRIAL)) {
|
||||
// // 仅语音交互和触控交互进行评估
|
||||
|
||||
@ -20,6 +20,7 @@ import com.cmvr.test.flow.runtime.interceptor.FlowMsgPreInterceptor;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteContext;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import com.cmvr.test.flow.runtime.operator.llm.AsyncMediaAnalysisCoordinator;
|
||||
import com.cmvr.test.model.dto.TeQueryTaskDetailDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -42,6 +43,7 @@ public class FlowItemExecutor {
|
||||
private final FlowExecutionChainBuilder chainBuilder;
|
||||
private final TaskThreadRegistry taskThreadRegistry;
|
||||
private final FlowRuntimeAssignmentResolver runtimeAssignmentResolver;
|
||||
private final AsyncMediaAnalysisCoordinator asyncMediaAnalysisCoordinator;
|
||||
|
||||
/**
|
||||
* 执行主流程(每个检测项调用一次)
|
||||
@ -257,6 +259,12 @@ public class FlowItemExecutor {
|
||||
private void postHandleBranchNode(TaskContext taskContext, FlowGraph graph, FlowNodeWrapper node, String startNodeId,
|
||||
List<FlowParamDef> startInputDefs, TaskNodeExecuteMessage rootMessage, Runnable onFinished,
|
||||
List<Integer> iterations, String nodeId, JSONObject inputParams, TaskNodeExecuteMessage message) {
|
||||
// Only wait for analysis results referenced by this branch and this item.
|
||||
for (String referencedNodeId : FlowBranchEvaluator.referencedNodeIds(node.getBranchConditions())) {
|
||||
asyncMediaAnalysisCoordinator.awaitNode(
|
||||
message.getInstId(), message.getItemId(), message.getItemOrder(),
|
||||
message.getItemOccurrence(), referencedNodeId, message.getIterations());
|
||||
}
|
||||
String matchedAnchorId = FlowBranchEvaluator.evaluate(taskContext, iterations,nodeId, node.getBranchConditions(), inputParams);
|
||||
FlowEdge matchedEdge = graph.getEdgeByFromAnchorId(matchedAnchorId);
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.cmvr.test.flow.runtime.engine.support;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.cmvr.test.enums.BranchConditionOpEnum;
|
||||
import com.cmvr.test.flow.builder.FlowBranchConditionGroup;
|
||||
@ -11,6 +12,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 分支节点条件匹配器
|
||||
@ -41,18 +43,7 @@ public class FlowBranchEvaluator {
|
||||
if (CollUtil.isEmpty(taskContext.getNodeOutputs())) {
|
||||
return;
|
||||
}
|
||||
HashSet<String> quoteIds = new HashSet<>();
|
||||
for (FlowBranchConditionGroup group : groups) {
|
||||
List<FlowBranchConditionGroup.ConditionExpression> expressions = group.getExpressions();
|
||||
for (FlowBranchConditionGroup.ConditionExpression expression : expressions) {
|
||||
if (expression.getNameType().equalsIgnoreCase("quote")) {
|
||||
List<String> nameQuotePath = expression.getNameQuotePath();
|
||||
if (CollUtil.isNotEmpty(nameQuotePath) && nameQuotePath.get(0).length() == 32) {
|
||||
quoteIds.add(nameQuotePath.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Set<String> quoteIds = referencedNodeIds(groups);
|
||||
for (String quoteId : quoteIds) {
|
||||
JSONObject nodeOutput = taskContext.getNodeOutput(quoteId, iterations);
|
||||
if (ObjUtil.isNotEmpty(nodeOutput)) {
|
||||
@ -62,6 +53,32 @@ public class FlowBranchEvaluator {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns upstream node IDs referenced by branch expressions.
|
||||
*/
|
||||
public static Set<String> referencedNodeIds(List<FlowBranchConditionGroup> groups) {
|
||||
Set<String> quoteIds = new HashSet<>();
|
||||
if (CollUtil.isEmpty(groups)) {
|
||||
return quoteIds;
|
||||
}
|
||||
for (FlowBranchConditionGroup group : groups) {
|
||||
if (group == null || CollUtil.isEmpty(group.getExpressions())) {
|
||||
continue;
|
||||
}
|
||||
for (FlowBranchConditionGroup.ConditionExpression expression : group.getExpressions()) {
|
||||
addReferencedNodeId(quoteIds, expression.getNameType(), expression.getNameQuotePath());
|
||||
addReferencedNodeId(quoteIds, expression.getValueType(), expression.getQuotePath());
|
||||
}
|
||||
}
|
||||
return quoteIds;
|
||||
}
|
||||
|
||||
private static void addReferencedNodeId(Set<String> quoteIds, String type, List<String> path) {
|
||||
if ("quote".equalsIgnoreCase(type) && CollUtil.isNotEmpty(path) && StrUtil.isNotBlank(path.get(0))) {
|
||||
quoteIds.add(path.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配某个条件组是否成立
|
||||
*/
|
||||
|
||||
@ -13,6 +13,7 @@ import com.cmvr.test.flow.builder.FlowParamDef;
|
||||
import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.operator.llm.AsyncMediaAnalysisCoordinator;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -23,6 +24,7 @@ import java.util.List;
|
||||
public class FlowNodeParamPreparer {
|
||||
|
||||
private final TaskInstHolder taskInstHolder;
|
||||
private final AsyncMediaAnalysisCoordinator asyncMediaAnalysisCoordinator;
|
||||
|
||||
public JSONObject prepare(FlowGraph graph,
|
||||
FlowNodeWrapper node,
|
||||
@ -86,6 +88,9 @@ public class FlowNodeParamPreparer {
|
||||
} else if ("output".equalsIgnoreCase(param.getQuoteType())) {
|
||||
// 2.2 引用上游的 output 参数(运行时实际执行结果)
|
||||
// 用 nodeId + iterations 作为 key,避免覆盖
|
||||
asyncMediaAnalysisCoordinator.awaitNode(
|
||||
rootMessage.getInstId(), rootMessage.getItemId(), rootMessage.getItemOrder(),
|
||||
rootMessage.getItemOccurrence(), refNodeId, rootMessage.getIterations());
|
||||
source = ctx.getNodeOutput(refNodeId, rootMessage.getIterations());
|
||||
} else {
|
||||
throw new GlobalException("参数应用类型出错!quoteType:" + param.getQuoteType());
|
||||
|
||||
@ -28,6 +28,9 @@ public class FlowAfterInterceptor extends AbstractFlowMsgPreInterceptor{
|
||||
@Override
|
||||
public TaskNodeExecuteResult doIntercept(TaskNodeExecuteMessage message, Function<TaskNodeExecuteMessage, TaskNodeExecuteResult> next) {
|
||||
TaskNodeExecuteResult result = next.apply(message);
|
||||
if (result != null && result.isDeferred()) {
|
||||
return result;
|
||||
}
|
||||
TaskContext taskContext = taskInstHolder.getContext(message.getInstId());
|
||||
if (result == null && (taskContext == null || taskContext.isPaused() || taskContext.isStopped())) {
|
||||
return null;
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
package com.cmvr.test.flow.runtime.interceptor;
|
||||
|
||||
import cn.hutool.core.exceptions.ExceptionUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.cmvr.common.exception.GlobalException;
|
||||
import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEventPublisher;
|
||||
@ -47,18 +45,11 @@ public class FlowExceptionInterceptor extends AbstractFlowMsgPreInterceptor {
|
||||
|
||||
log.error("节点执行异常:instId={}, nodeId={}, action={}",
|
||||
message.getInstId(), message.getNodeId(), message.getAction(), e);
|
||||
taskInstHolder.markFailed(
|
||||
message.getInstId(),
|
||||
message.getTaskId(),
|
||||
message.getItemId(),
|
||||
message.getNodeId(),
|
||||
message.getNodeType(),
|
||||
message.getAction().getOperate(), message.getAction().getOperate(),
|
||||
ObjUtil.isEmpty(message.getInputParams()) ? null : message.getInputParams().toJSONString(),
|
||||
"执行异常:" + StrUtil.sub(ExceptionUtil.getMessage(e), 0, 480),
|
||||
message.getIterations()
|
||||
);
|
||||
throw new GlobalException("任务执行失败", e);
|
||||
String detail = StrUtil.blankToDefault(ExceptionUtil.getMessage(e), e.toString());
|
||||
// Convert thrown device exceptions into a normal failed result. The outer
|
||||
// FlowAfterInterceptor can then publish NODE_FAILED with node identity and
|
||||
// the executor will persist the task failure exactly once.
|
||||
return TaskNodeExecuteResult.failure("执行异常:" + StrUtil.sub(detail, 0, 480));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,6 +40,10 @@ public class FlowLoggingInterceptor extends AbstractFlowMsgPreInterceptor {
|
||||
|
||||
TaskNodeExecuteResult result = next.apply(message);
|
||||
|
||||
if (result != null && result.isDeferred()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// 节点执行返回拦截 判断此时是否被终止或暂停
|
||||
TaskContext context = taskInstHolder.getContext(message.getInstId());
|
||||
if (context == null || context.isPaused()) {
|
||||
|
||||
@ -33,7 +33,7 @@ public class FlowOutputStoreInterceptor extends AbstractFlowMsgPreInterceptor {
|
||||
|
||||
TaskNodeExecuteResult result = next.apply(message);
|
||||
|
||||
if (result != null && result.isSuccess()) {
|
||||
if (result != null && result.isSuccess() && !result.isDeferred()) {
|
||||
TaskContext ctx = taskInstHolder.getContext(message.getInstId());
|
||||
if (ctx != null) {
|
||||
JSONObject outputParams = result.getOutputParams();
|
||||
|
||||
@ -18,6 +18,9 @@ public class TaskNodeExecuteResult {
|
||||
/** 错误信息(如果执行失败) */
|
||||
private String errorMsg;
|
||||
|
||||
/** 后台任务已经提交,节点的最终完成状态将由异步协调器写入。 */
|
||||
private boolean deferred;
|
||||
|
||||
public static TaskNodeExecuteResult success(JSONObject output) {
|
||||
TaskNodeExecuteResult result = new TaskNodeExecuteResult();
|
||||
result.setSuccess(true);
|
||||
@ -38,4 +41,10 @@ public class TaskNodeExecuteResult {
|
||||
result.setErrorMsg(msg);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static TaskNodeExecuteResult deferred(JSONObject output) {
|
||||
TaskNodeExecuteResult result = success(output);
|
||||
result.setDeferred(true);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,17 @@ public final class AgvNavigationWaiter {
|
||||
String stationId,
|
||||
long waitTimeoutMs,
|
||||
long pollIntervalMs) {
|
||||
return navigateToStationAndWait(edgeAgvService, common, stationId, waitTimeoutMs,
|
||||
pollIntervalMs, null);
|
||||
}
|
||||
|
||||
public static AgvUtils.AgvNavigationStatus navigateToStationAndWait(
|
||||
EdgeAgvService edgeAgvService,
|
||||
EdgeCommonVO common,
|
||||
String stationId,
|
||||
long waitTimeoutMs,
|
||||
long pollIntervalMs,
|
||||
AgvUtils.AgvMotionOptions options) {
|
||||
if (waitTimeoutMs <= 0) {
|
||||
throw new GlobalException("导航等待超时时间必须大于0");
|
||||
}
|
||||
@ -37,7 +48,7 @@ public final class AgvNavigationWaiter {
|
||||
throw new GlobalException("导航状态轮询间隔必须大于0且不能超过等待超时时间");
|
||||
}
|
||||
|
||||
edgeAgvService.navigateToStation(common, stationId);
|
||||
edgeAgvService.navigateToStation(common, stationId, options);
|
||||
long deadlineNanos = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(waitTimeoutMs);
|
||||
AgvUtils.AgvNavigationStatus lastStatus = null;
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ public class EdgeAgvOperateService implements EdgeOperateService {
|
||||
edgeCommonVO.setDeviceId(deviceId);
|
||||
|
||||
// 直接调用边缘端AGV服务执行导航
|
||||
edgeAgvService.navigateToPose(edgeCommonVO, pose);
|
||||
edgeAgvService.navigateToPose(edgeCommonVO, pose, navigationOptions(inputParams));
|
||||
|
||||
log.info("AGV移动任务下发成功");
|
||||
|
||||
@ -90,7 +90,8 @@ public class EdgeAgvOperateService implements EdgeOperateService {
|
||||
long waitTimeoutMs = inputParams.getLongValue("waitTimeoutMs", AgvNavigationWaiter.DEFAULT_WAIT_TIMEOUT_MS);
|
||||
long pollIntervalMs = inputParams.getLongValue("pollIntervalMs", AgvNavigationWaiter.DEFAULT_POLL_INTERVAL_MS);
|
||||
AgvUtils.AgvNavigationStatus status = AgvNavigationWaiter.navigateToStationAndWait(
|
||||
edgeAgvService, edgeCommonVO, stationId.trim(), waitTimeoutMs, pollIntervalMs);
|
||||
edgeAgvService, edgeCommonVO, stationId.trim(), waitTimeoutMs, pollIntervalMs,
|
||||
navigationOptions(inputParams));
|
||||
return TaskNodeExecuteResult.success(new JSONObject()
|
||||
.fluentPut("state", status.getState())
|
||||
.fluentPut("progress", status.getProgress())
|
||||
@ -104,4 +105,16 @@ public class EdgeAgvOperateService implements EdgeOperateService {
|
||||
|
||||
return TaskNodeExecuteResult.success();
|
||||
}
|
||||
|
||||
private AgvUtils.AgvMotionOptions navigationOptions(JSONObject inputParams) {
|
||||
int blockedTimeoutMs = inputParams.getIntValue(
|
||||
"blockedTimeoutMs", EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS);
|
||||
if (blockedTimeoutMs <= 0) {
|
||||
blockedTimeoutMs = EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS;
|
||||
}
|
||||
return AgvUtils.AgvMotionOptions.newBuilder()
|
||||
.setAsynchronous(false)
|
||||
.setBlockedTimeoutMs(blockedTimeoutMs)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,227 @@
|
||||
package com.cmvr.test.flow.runtime.operator.llm;
|
||||
|
||||
import cn.hutool.core.exceptions.ExceptionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.cmvr.common.exception.GlobalException;
|
||||
import com.cmvr.test.flow.builder.TaskKeyBuilder;
|
||||
import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEvent;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEventPublisher;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import com.cmvr.test.service.ITeNodeInstService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class AsyncMediaAnalysisCoordinator {
|
||||
|
||||
private final TaskInstHolder taskInstHolder;
|
||||
private final ITeNodeInstService nodeInstService;
|
||||
private final FlowExecutionEventPublisher eventPublisher;
|
||||
private final ThreadPoolTaskExecutor executor;
|
||||
private final Map<String, ExecutionGroup> groups = new ConcurrentHashMap<>();
|
||||
|
||||
public AsyncMediaAnalysisCoordinator(
|
||||
TaskInstHolder taskInstHolder,
|
||||
ITeNodeInstService nodeInstService,
|
||||
FlowExecutionEventPublisher eventPublisher,
|
||||
@Qualifier("mediaAnalysisTaskExecutor") ThreadPoolTaskExecutor executor) {
|
||||
this.taskInstHolder = taskInstHolder;
|
||||
this.nodeInstService = nodeInstService;
|
||||
this.eventPublisher = eventPublisher;
|
||||
this.executor = executor;
|
||||
}
|
||||
|
||||
public TaskNodeExecuteResult submit(TaskNodeExecuteMessage message, String requestId,
|
||||
Supplier<TaskNodeExecuteResult> analysis) {
|
||||
JSONObject accepted = new JSONObject()
|
||||
.fluentPut("asynchronous", true)
|
||||
.fluentPut("analysisStatus", "SUBMITTED")
|
||||
.fluentPut("requestId", requestId);
|
||||
TaskContext context = taskInstHolder.getContext(message.getInstId());
|
||||
if (context == null) {
|
||||
executor.execute(() -> runDetached(message, analysis));
|
||||
return TaskNodeExecuteResult.success(accepted);
|
||||
}
|
||||
|
||||
String moduleCode = context.getModuleCode();
|
||||
String nodeKey = nodeKey(message.getItemId(), message.getItemOrder(),
|
||||
message.getItemOccurrence(), message.getNodeId(), safeIterations(message));
|
||||
ExecutionGroup group = groups.computeIfAbsent(message.getInstId(), ignored -> new ExecutionGroup());
|
||||
CompletableFuture<TaskNodeExecuteResult> analysisFuture = CompletableFuture.supplyAsync(analysis, executor);
|
||||
CompletableFuture<Void> completion = analysisFuture.handle((result, error) -> {
|
||||
completeNode(message, moduleCode, result, error, group, nodeKey);
|
||||
return null;
|
||||
});
|
||||
group.jobs.put(nodeKey, completion);
|
||||
log.info("异步媒体分析已提交:instId={}, nodeId={}, requestId={}",
|
||||
message.getInstId(), message.getNodeId(), requestId);
|
||||
return TaskNodeExecuteResult.deferred(accepted);
|
||||
}
|
||||
|
||||
public void awaitNode(String instId, String itemId, Integer itemOrder, Integer itemOccurrence,
|
||||
String nodeId, List<Integer> iterations) {
|
||||
ExecutionGroup group = groups.get(instId);
|
||||
if (group == null) return;
|
||||
String key = nodeKey(itemId, itemOrder, itemOccurrence, nodeId, safeIterations(iterations));
|
||||
CompletableFuture<Void> job = group.jobs.get(key);
|
||||
if (job != null) await(job);
|
||||
String error = group.nodeFailures.get(key);
|
||||
if (error != null) throw new GlobalException(error);
|
||||
}
|
||||
|
||||
public TaskNodeExecuteResult awaitAll(String instId) {
|
||||
ExecutionGroup group = groups.get(instId);
|
||||
if (group == null) return TaskNodeExecuteResult.success();
|
||||
boolean completed = false;
|
||||
try {
|
||||
while (true) {
|
||||
CompletableFuture<?>[] snapshot = group.jobs.values().toArray(new CompletableFuture[0]);
|
||||
await(CompletableFuture.allOf(snapshot));
|
||||
if (group.jobs.values().stream().allMatch(CompletableFuture::isDone)) break;
|
||||
}
|
||||
completed = true;
|
||||
String error = group.failure.get();
|
||||
return error == null ? TaskNodeExecuteResult.success() : TaskNodeExecuteResult.failure(error);
|
||||
} finally {
|
||||
if (completed) groups.remove(instId, group);
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelAll(String instId) {
|
||||
ExecutionGroup group = groups.remove(instId);
|
||||
if (group == null) return;
|
||||
group.cancelled = true;
|
||||
group.jobs.values().forEach(job -> job.cancel(true));
|
||||
log.info("已取消任务的异步媒体分析登记:instId={}, count={}", instId, group.jobs.size());
|
||||
}
|
||||
|
||||
private void completeNode(TaskNodeExecuteMessage message, String moduleCode,
|
||||
TaskNodeExecuteResult result, Throwable error, ExecutionGroup group,
|
||||
String nodeKey) {
|
||||
try {
|
||||
TaskContext currentContext = taskInstHolder.getContext(message.getInstId());
|
||||
if (group.cancelled || currentContext == null || currentContext.isStopped()) {
|
||||
log.info("任务已终止,忽略异步媒体分析结果:instId={}, nodeId={}",
|
||||
message.getInstId(), message.getNodeId());
|
||||
return;
|
||||
}
|
||||
Throwable cause = error == null ? null : ExceptionUtil.getRootCause(error);
|
||||
if (cause == null && (result == null || !result.isSuccess())) {
|
||||
cause = new GlobalException(result == null ? "异步分析结果为空" : result.getErrorMsg());
|
||||
}
|
||||
if (cause != null) {
|
||||
String detail = "异步分析失败:" + StrUtil.sub(
|
||||
StrUtil.blankToDefault(ExceptionUtil.getMessage(cause), cause.toString()), 0, 480);
|
||||
group.failure.compareAndSet(null, detail);
|
||||
group.nodeFailures.put(nodeKey, detail);
|
||||
nodeInstService.logFailed(message.getInstId(), message.getTaskId(), message.getItemId(),
|
||||
message.getNodeId(), message.getNodeType(),
|
||||
message.getAction() == null ? null : message.getAction().getOperate(),
|
||||
message.getAction() == null ? null : message.getAction().getAction(),
|
||||
message.getInputParams() == null ? null : message.getInputParams().toJSONString(),
|
||||
detail, safeIterations(message));
|
||||
publish(message, moduleCode, FlowExecutionEvent.EventType.NODE_FAILED, null, detail);
|
||||
return;
|
||||
}
|
||||
|
||||
JSONObject output = result.getOutputParams() == null ? new JSONObject() : result.getOutputParams();
|
||||
taskInstHolder.setNodeOutParams(message.getInstId(), message.getNodeId(), safeIterations(message), output);
|
||||
taskInstHolder.markNodeSuccess(message.getInstId(), message.getItemId(), message.getNodeId(),
|
||||
message.getPendingItemCount(), message.getNodeType(), output.toJSONString(),
|
||||
"异步分析执行成功", safeIterations(message));
|
||||
publish(message, moduleCode, FlowExecutionEvent.EventType.NODE_COMPLETED, output, null);
|
||||
} catch (Throwable finalizeError) {
|
||||
String detail = "异步分析结果处理失败:" + StrUtil.sub(
|
||||
StrUtil.blankToDefault(ExceptionUtil.getMessage(finalizeError), finalizeError.toString()), 0, 480);
|
||||
group.failure.compareAndSet(null, detail);
|
||||
group.nodeFailures.put(nodeKey, detail);
|
||||
log.error("异步媒体分析结果处理异常:instId={}, nodeId={}",
|
||||
message.getInstId(), message.getNodeId(), finalizeError);
|
||||
}
|
||||
}
|
||||
|
||||
private void publish(TaskNodeExecuteMessage message, String moduleCode,
|
||||
FlowExecutionEvent.EventType eventType, JSONObject output, String error) {
|
||||
int nodeCount = message.getGraph() == null ? 0 : message.getGraph().allNodeIds().size();
|
||||
eventPublisher.publishEvent(FlowExecutionEvent.builder()
|
||||
.eventType(eventType)
|
||||
.nodeName(message.getNodeName())
|
||||
.instId(message.getInstId())
|
||||
.taskId(message.getTaskId())
|
||||
.moduleCode(moduleCode)
|
||||
.itemId(message.getItemId())
|
||||
.itemOrder(message.getItemOrder())
|
||||
.itemOccurrence(message.getItemOccurrence())
|
||||
.nodeId(message.getNodeId())
|
||||
.nodeCount(nodeCount)
|
||||
.nodeType(message.getNodeType())
|
||||
.action(message.getAction())
|
||||
.outputParams(output)
|
||||
.robotId(message.getRobotId())
|
||||
.iterations(new ArrayList<>(safeIterations(message)))
|
||||
.errorMessage(error)
|
||||
.build());
|
||||
}
|
||||
|
||||
private void runDetached(TaskNodeExecuteMessage message, Supplier<TaskNodeExecuteResult> analysis) {
|
||||
try {
|
||||
analysis.get();
|
||||
} catch (Throwable error) {
|
||||
log.error("单节点异步媒体分析失败:nodeId={}", message.getNodeId(), error);
|
||||
}
|
||||
}
|
||||
|
||||
private List<Integer> safeIterations(TaskNodeExecuteMessage message) {
|
||||
return safeIterations(message.getIterations());
|
||||
}
|
||||
|
||||
private List<Integer> safeIterations(List<Integer> iterations) {
|
||||
return iterations == null ? List.of() : iterations;
|
||||
}
|
||||
|
||||
private String nodeKey(String itemId, Integer itemOrder, Integer itemOccurrence,
|
||||
String nodeId, List<Integer> iterations) {
|
||||
return StrUtil.blankToDefault(itemId, "item") + ":"
|
||||
+ (itemOrder == null ? 0 : itemOrder) + ":"
|
||||
+ (itemOccurrence == null ? 0 : itemOccurrence) + ":"
|
||||
+ TaskKeyBuilder.buildKey(nodeId, iterations);
|
||||
}
|
||||
|
||||
private void await(CompletableFuture<?> future) {
|
||||
try {
|
||||
future.get();
|
||||
} catch (InterruptedException error) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new GlobalException("等待异步分析被中断", error);
|
||||
} catch (ExecutionException error) {
|
||||
Throwable cause = ExceptionUtil.getRootCause(error);
|
||||
throw new GlobalException("异步分析执行失败:" + ExceptionUtil.getMessage(cause), cause);
|
||||
} catch (CancellationException error) {
|
||||
throw new GlobalException("异步分析已取消", error);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class ExecutionGroup {
|
||||
private final Map<String, CompletableFuture<Void>> jobs = new ConcurrentHashMap<>();
|
||||
private final Map<String, String> nodeFailures = new ConcurrentHashMap<>();
|
||||
private final AtomicReference<String> failure = new AtomicReference<>();
|
||||
private volatile boolean cancelled;
|
||||
}
|
||||
}
|
||||
@ -7,8 +7,8 @@ import com.cmvr.test.enums.ActionEnum;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import com.cmvr.test.flow.runtime.operator.FlowMediaParamResolver;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@ -16,11 +16,22 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class LLMMediaAnalysisOperateService implements LLMOperateService {
|
||||
|
||||
private static final Set<String> VIDEO_ANALYSIS_MODES = Set.of("AUTO", "FAST", "ACCURATE");
|
||||
private final MediaAnalysisClient mediaAnalysisClient;
|
||||
private final AsyncMediaAnalysisCoordinator asyncCoordinator;
|
||||
|
||||
@Autowired
|
||||
public LLMMediaAnalysisOperateService(MediaAnalysisClient mediaAnalysisClient,
|
||||
AsyncMediaAnalysisCoordinator asyncCoordinator) {
|
||||
this.mediaAnalysisClient = mediaAnalysisClient;
|
||||
this.asyncCoordinator = asyncCoordinator;
|
||||
}
|
||||
|
||||
LLMMediaAnalysisOperateService(MediaAnalysisClient mediaAnalysisClient) {
|
||||
this(mediaAnalysisClient, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supports(ActionEnum action) {
|
||||
@ -91,6 +102,12 @@ public class LLMMediaAnalysisOperateService implements LLMOperateService {
|
||||
}
|
||||
options.put("prompt", prompt);
|
||||
options.put("analysisMode", analysisMode);
|
||||
String analysisMethod = StringUtils.defaultIfBlank(
|
||||
input.getString("analysisMethod"), "AUTO").trim().toUpperCase();
|
||||
if (!Set.of("AUTO", "VISION_MODEL", "TEXT_LOCATE", "REFERENCE_MATCH").contains(analysisMethod)) {
|
||||
throw new GlobalException("图片分析方式无效: {}", analysisMethod);
|
||||
}
|
||||
options.put("analysisMethod", analysisMethod);
|
||||
String referenceImageUrl = FlowMediaParamResolver.lastUrl(input, "referenceImageUrl");
|
||||
if (StringUtils.isNotBlank(referenceImageUrl)) {
|
||||
options.put("referenceImageUrl", referenceImageUrl);
|
||||
@ -102,7 +119,8 @@ public class LLMMediaAnalysisOperateService implements LLMOperateService {
|
||||
}
|
||||
|
||||
JSONObject request = new JSONObject();
|
||||
request.put("requestId", buildRequestId(message));
|
||||
String requestId = buildRequestId(message);
|
||||
request.put("requestId", requestId);
|
||||
request.put("analysisType", audio ? "AUDIO_CLASSIFICATION"
|
||||
: (image ? "IMAGE_ANALYSIS" : "VIDEO_ANALYSIS"));
|
||||
request.put("profileCode", profileCode);
|
||||
@ -113,6 +131,19 @@ public class LLMMediaAnalysisOperateService implements LLMOperateService {
|
||||
request.put("options", options);
|
||||
request.put("context", context);
|
||||
|
||||
String finalExpectedLabel = expectedLabel;
|
||||
String finalExpectedLabelName = expectedLabelName;
|
||||
if (Boolean.TRUE.equals(input.getBoolean("asynchronous")) && asyncCoordinator != null) {
|
||||
return asyncCoordinator.submit(message, requestId,
|
||||
() -> analyze(request, audio, image, mediaUrl, mediaUrls,
|
||||
finalExpectedLabel, finalExpectedLabelName));
|
||||
}
|
||||
return analyze(request, audio, image, mediaUrl, mediaUrls, expectedLabel, expectedLabelName);
|
||||
}
|
||||
|
||||
private TaskNodeExecuteResult analyze(JSONObject request, boolean audio, boolean image,
|
||||
String mediaUrl, List<String> mediaUrls,
|
||||
String expectedLabel, String expectedLabelName) {
|
||||
JSONObject response = mediaAnalysisClient.analyze(request);
|
||||
JSONObject output = response.getJSONObject("result");
|
||||
if (output == null) {
|
||||
@ -184,12 +215,35 @@ public class LLMMediaAnalysisOperateService implements LLMOperateService {
|
||||
Integer maxWidth = source.getInteger("maxWidth");
|
||||
Integer maxImages = source.getInteger("maxImages");
|
||||
Integer maxOutputTokens = source.getInteger("maxOutputTokens");
|
||||
Double matchThreshold = source.getDouble("matchThreshold");
|
||||
Double locateConfidenceThreshold = source.getDouble("locateConfidenceThreshold");
|
||||
String matchSelector = StringUtils.trimToNull(source.getString("matchSelector"));
|
||||
Integer matchIndex = source.getInteger("matchIndex");
|
||||
String matchSort = StringUtils.trimToNull(source.getString("matchSort"));
|
||||
validateRange("图片宽度", maxWidth, 640, 1600);
|
||||
validateRange("图片数量", maxImages, 1, 12);
|
||||
validateRange("最大输出长度", maxOutputTokens, 32, 4096);
|
||||
validateRange("最低匹配分数", matchThreshold, 0.2D, 0.95D);
|
||||
validateRange("最低定位置信度", locateConfidenceThreshold, 0.2D, 0.95D);
|
||||
validateRange("匹配序号", matchIndex, 1, 20);
|
||||
if (matchSelector != null && !Set.of(
|
||||
"BEST", "INDEX", "TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT"
|
||||
).contains(matchSelector.toUpperCase())) {
|
||||
throw new GlobalException("匹配结果选择方式无效: {}", matchSelector);
|
||||
}
|
||||
if (matchSort != null && !Set.of("ROW_MAJOR", "COLUMN_MAJOR").contains(matchSort.toUpperCase())) {
|
||||
throw new GlobalException("匹配排序方式无效: {}", matchSort);
|
||||
}
|
||||
if (maxWidth != null) tuning.put("maxWidth", maxWidth);
|
||||
if (maxImages != null) tuning.put("maxImages", maxImages);
|
||||
if (maxOutputTokens != null) tuning.put("maxOutputTokens", maxOutputTokens);
|
||||
if (matchThreshold != null) tuning.put("matchThreshold", matchThreshold);
|
||||
if (locateConfidenceThreshold != null) {
|
||||
tuning.put("locateConfidenceThreshold", locateConfidenceThreshold);
|
||||
}
|
||||
if (matchSelector != null) tuning.put("matchSelector", matchSelector.toUpperCase());
|
||||
if (matchIndex != null) tuning.put("matchIndex", matchIndex);
|
||||
if (matchSort != null) tuning.put("matchSort", matchSort.toUpperCase());
|
||||
return tuning;
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ public class FlowActionExecutorService {
|
||||
.build();
|
||||
|
||||
// 直接调用边缘端AGV服务
|
||||
edgeAgvService.navigateToPose(edgeCommonVO, pose);
|
||||
edgeAgvService.navigateToPose(edgeCommonVO, pose, buildAgvNavigationOptions(payload));
|
||||
|
||||
log.info("AGV移动任务下发成功");
|
||||
|
||||
@ -274,7 +274,8 @@ public class FlowActionExecutorService {
|
||||
long waitTimeoutMs = payload.getLongValue("waitTimeoutMs", AgvNavigationWaiter.DEFAULT_WAIT_TIMEOUT_MS);
|
||||
long pollIntervalMs = payload.getLongValue("pollIntervalMs", AgvNavigationWaiter.DEFAULT_POLL_INTERVAL_MS);
|
||||
AgvNavigationWaiter.navigateToStationAndWait(
|
||||
edgeAgvService, edgeCommonVO, stationId.trim(), waitTimeoutMs, pollIntervalMs);
|
||||
edgeAgvService, edgeCommonVO, stationId.trim(), waitTimeoutMs, pollIntervalMs,
|
||||
buildAgvNavigationOptions(payload));
|
||||
log.info("AGV移动到指定站点完成,设备ID: {},站点ID: {}", deviceId, stationId);
|
||||
return "AGV移动到指定站点完成";
|
||||
}
|
||||
@ -284,6 +285,18 @@ public class FlowActionExecutorService {
|
||||
}
|
||||
}
|
||||
|
||||
private AgvUtils.AgvMotionOptions buildAgvNavigationOptions(JSONObject payload) {
|
||||
int blockedTimeoutMs = payload.getIntValue(
|
||||
"blockedTimeoutMs", EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS);
|
||||
if (blockedTimeoutMs <= 0) {
|
||||
blockedTimeoutMs = EdgeAgvService.DEFAULT_BLOCKED_TIMEOUT_MS;
|
||||
}
|
||||
return AgvUtils.AgvMotionOptions.newBuilder()
|
||||
.setAsynchronous(false)
|
||||
.setBlockedTimeoutMs(blockedTimeoutMs)
|
||||
.build();
|
||||
}
|
||||
|
||||
private String executeInspectionAlertAction(ActionEnum action, JSONObject payload) {
|
||||
String robotId = payload.getString("robotId");
|
||||
java.util.List<String> types = resolveInspectionAlertEventTypes(payload);
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
package com.cmvr.test.flow.runtime.dispatcher;
|
||||
|
||||
import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskContextManager;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEventPublisher;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import com.cmvr.test.flow.runtime.operator.llm.AsyncMediaAnalysisCoordinator;
|
||||
import com.cmvr.test.service.ITeNodeInstService;
|
||||
import org.junit.Test;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class FlowEndNodeHandlerTest {
|
||||
|
||||
@Test
|
||||
public void waitsForAsyncAnalysisOnlyAtLastItem() {
|
||||
AtomicInteger awaitAllCalls = new AtomicInteger();
|
||||
AsyncMediaAnalysisCoordinator coordinator = new AsyncMediaAnalysisCoordinator(null, null, null, null) {
|
||||
@Override
|
||||
public TaskNodeExecuteResult awaitAll(String instId) {
|
||||
awaitAllCalls.incrementAndGet();
|
||||
return TaskNodeExecuteResult.success();
|
||||
}
|
||||
};
|
||||
|
||||
ITeNodeInstService nodeService = (ITeNodeInstService) Proxy.newProxyInstance(
|
||||
ITeNodeInstService.class.getClassLoader(), new Class<?>[]{ITeNodeInstService.class},
|
||||
(proxy, method, args) -> defaultValue(method.getReturnType()));
|
||||
TaskContextManager contextManager = new TaskContextManager();
|
||||
TaskContext context = new TaskContext();
|
||||
context.setInstId("inst-1");
|
||||
contextManager.register(context);
|
||||
TaskInstHolder holder = new TaskInstHolder(nodeService, contextManager, null,
|
||||
new FlowExecutionEventPublisher(List.of()));
|
||||
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(1);
|
||||
executor.setMaxPoolSize(1);
|
||||
executor.initialize();
|
||||
try {
|
||||
FlowEndNodeHandler handler = new FlowEndNodeHandler(holder, null, coordinator, executor);
|
||||
|
||||
TaskNodeExecuteMessage earlierItem = message(1);
|
||||
assertTrue(handler.handle(earlierItem).isSuccess());
|
||||
assertEquals(0, awaitAllCalls.get());
|
||||
|
||||
TaskNodeExecuteMessage lastItem = message(0);
|
||||
assertTrue(handler.handle(lastItem).isSuccess());
|
||||
assertEquals(1, awaitAllCalls.get());
|
||||
} finally {
|
||||
executor.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
private TaskNodeExecuteMessage message(int pendingItemCount) {
|
||||
TaskNodeExecuteMessage message = new TaskNodeExecuteMessage();
|
||||
message.setInstId("inst-1");
|
||||
message.setTaskId("task-1");
|
||||
message.setItemId("item-1");
|
||||
message.setPendingItemCount(pendingItemCount);
|
||||
return message;
|
||||
}
|
||||
|
||||
private static Object defaultValue(Class<?> type) {
|
||||
if (!type.isPrimitive()) return null;
|
||||
if (type == boolean.class) return false;
|
||||
if (type == char.class) return '\0';
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.cmvr.test.flow.runtime.engine.support;
|
||||
|
||||
import com.cmvr.test.flow.builder.FlowBranchConditionGroup;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class FlowBranchEvaluatorTest {
|
||||
|
||||
@Test
|
||||
public void extractsBothSidesOfQuotedBranchExpressions() {
|
||||
FlowBranchConditionGroup.ConditionExpression expression =
|
||||
new FlowBranchConditionGroup.ConditionExpression();
|
||||
expression.setNameType("quote");
|
||||
expression.setNameQuotePath(List.of("video-node", "output", "passed"));
|
||||
expression.setValueType("quote");
|
||||
expression.setQuotePath(List.of("audio-node", "output", "passed"));
|
||||
|
||||
FlowBranchConditionGroup group = new FlowBranchConditionGroup();
|
||||
group.setExpressions(List.of(expression));
|
||||
|
||||
assertEquals(Set.of("video-node", "audio-node"),
|
||||
FlowBranchEvaluator.referencedNodeIds(List.of(group)));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.cmvr.test.flow.runtime.interceptor;
|
||||
|
||||
import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskContextManager;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEventPublisher;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class FlowExceptionInterceptorTest {
|
||||
|
||||
@Test
|
||||
public void convertsDeviceExceptionToFailedResultWithOriginalReason() {
|
||||
TaskContextManager contextManager = new TaskContextManager();
|
||||
TaskContext context = new TaskContext();
|
||||
context.setInstId("inst-1");
|
||||
contextManager.register(context);
|
||||
|
||||
FlowExecutionEventPublisher publisher = new FlowExecutionEventPublisher(Collections.emptyList());
|
||||
TaskInstHolder holder = new TaskInstHolder(null, contextManager, null, publisher);
|
||||
FlowExceptionInterceptor interceptor = new FlowExceptionInterceptor(publisher, holder);
|
||||
TaskNodeExecuteMessage message = new TaskNodeExecuteMessage();
|
||||
message.setInstId("inst-1");
|
||||
message.setNodeId("arm-node");
|
||||
|
||||
TaskNodeExecuteResult result = interceptor.doIntercept(message, ignored -> {
|
||||
throw new IllegalStateException("机械臂通信失败: setPayload ret=13");
|
||||
});
|
||||
|
||||
assertFalse(result.isSuccess());
|
||||
assertTrue(result.getErrorMsg().contains("机械臂通信失败: setPayload ret=13"));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
package com.cmvr.test.flow.runtime.operator.llm;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.cmvr.test.enums.ActionEnum;
|
||||
import com.cmvr.test.flow.context.TaskContext;
|
||||
import com.cmvr.test.flow.context.TaskContextManager;
|
||||
import com.cmvr.test.flow.context.TaskInstHolder;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEvent;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionEventPublisher;
|
||||
import com.cmvr.test.flow.runtime.event.FlowExecutionListener;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
|
||||
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
|
||||
import com.cmvr.test.service.ITeNodeInstService;
|
||||
import org.junit.Test;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class AsyncMediaAnalysisCoordinatorTest {
|
||||
|
||||
@Test
|
||||
public void submitsImmediatelyAndStoresFinalResultBeforeAwaitReturns() throws Exception {
|
||||
Fixture fixture = fixture();
|
||||
CountDownLatch started = new CountDownLatch(1);
|
||||
CountDownLatch release = new CountDownLatch(1);
|
||||
try {
|
||||
TaskNodeExecuteResult submitted = fixture.coordinator.submit(fixture.message, "request-1", () -> {
|
||||
started.countDown();
|
||||
await(release);
|
||||
return TaskNodeExecuteResult.success(new JSONObject().fluentPut("passed", true));
|
||||
});
|
||||
|
||||
assertTrue(submitted.isSuccess());
|
||||
assertTrue(submitted.isDeferred());
|
||||
assertTrue(started.await(1, TimeUnit.SECONDS));
|
||||
assertNull(fixture.context.getNodeOutput("analysis-node", Collections.emptyList()));
|
||||
|
||||
release.countDown();
|
||||
assertTrue(fixture.coordinator.awaitAll("inst-1").isSuccess());
|
||||
assertTrue(fixture.context.getNodeOutput(
|
||||
"analysis-node", Collections.emptyList()).getBooleanValue("passed"));
|
||||
assertTrue(fixture.nodeSucceeded.get());
|
||||
assertEquals(FlowExecutionEvent.EventType.NODE_COMPLETED,
|
||||
fixture.lastEvent.get().getEventType());
|
||||
} finally {
|
||||
release.countDown();
|
||||
fixture.executor.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void reportsBackgroundFailureAtFlowBarrier() {
|
||||
Fixture fixture = fixture();
|
||||
try {
|
||||
fixture.coordinator.submit(fixture.message, "request-2", () -> {
|
||||
throw new IllegalStateException("vision service unavailable");
|
||||
});
|
||||
|
||||
TaskNodeExecuteResult result = fixture.coordinator.awaitAll("inst-1");
|
||||
|
||||
assertFalse(result.isSuccess());
|
||||
assertTrue(result.getErrorMsg().contains("vision service unavailable"));
|
||||
assertTrue(fixture.nodeFailed.get());
|
||||
assertEquals(FlowExecutionEvent.EventType.NODE_FAILED,
|
||||
fixture.lastEvent.get().getEventType());
|
||||
} finally {
|
||||
fixture.executor.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unrelatedItemFailureDoesNotBreakCurrentItemDependencyWait() {
|
||||
Fixture fixture = fixture();
|
||||
try {
|
||||
TaskNodeExecuteMessage failedItem = fixture.message;
|
||||
fixture.coordinator.submit(failedItem, "request-failed", () -> {
|
||||
throw new IllegalStateException("first item failed");
|
||||
});
|
||||
|
||||
TaskNodeExecuteMessage currentItem = message("item-2");
|
||||
fixture.coordinator.submit(currentItem, "request-current", () ->
|
||||
TaskNodeExecuteResult.success(new JSONObject().fluentPut("passed", true)));
|
||||
|
||||
fixture.coordinator.awaitNode("inst-1", "item-2", null, null,
|
||||
"analysis-node", Collections.emptyList());
|
||||
assertFalse(fixture.coordinator.awaitAll("inst-1").isSuccess());
|
||||
} finally {
|
||||
fixture.executor.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
private Fixture fixture() {
|
||||
AtomicBoolean nodeSucceeded = new AtomicBoolean();
|
||||
AtomicBoolean nodeFailed = new AtomicBoolean();
|
||||
ITeNodeInstService nodeService = (ITeNodeInstService) Proxy.newProxyInstance(
|
||||
ITeNodeInstService.class.getClassLoader(), new Class<?>[]{ITeNodeInstService.class},
|
||||
(proxy, method, args) -> {
|
||||
if ("logSuccess".equals(method.getName())) nodeSucceeded.set(true);
|
||||
if ("logFailed".equals(method.getName())) nodeFailed.set(true);
|
||||
return defaultValue(method.getReturnType());
|
||||
});
|
||||
AtomicReference<FlowExecutionEvent> lastEvent = new AtomicReference<>();
|
||||
FlowExecutionListener listener = new FlowExecutionListener() {
|
||||
@Override
|
||||
public void onEvent(FlowExecutionEvent event) {
|
||||
lastEvent.set(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleCode() {
|
||||
return "AIMA";
|
||||
}
|
||||
};
|
||||
FlowExecutionEventPublisher publisher = new FlowExecutionEventPublisher(List.of(listener));
|
||||
TaskContextManager contextManager = new TaskContextManager();
|
||||
TaskContext context = new TaskContext();
|
||||
context.setInstId("inst-1");
|
||||
context.setModuleCode("AIMA");
|
||||
contextManager.register(context);
|
||||
TaskInstHolder holder = new TaskInstHolder(nodeService, contextManager, null, publisher);
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(1);
|
||||
executor.setMaxPoolSize(1);
|
||||
executor.setQueueCapacity(10);
|
||||
executor.setThreadNamePrefix("media-analysis-test-");
|
||||
executor.initialize();
|
||||
AsyncMediaAnalysisCoordinator coordinator = new AsyncMediaAnalysisCoordinator(
|
||||
holder, nodeService, publisher, executor);
|
||||
|
||||
TaskNodeExecuteMessage message = message("item-1");
|
||||
return new Fixture(coordinator, executor, context, message,
|
||||
nodeSucceeded, nodeFailed, lastEvent);
|
||||
}
|
||||
|
||||
private TaskNodeExecuteMessage message(String itemId) {
|
||||
TaskNodeExecuteMessage message = new TaskNodeExecuteMessage();
|
||||
message.setInstId("inst-1");
|
||||
message.setTaskId("task-1");
|
||||
message.setItemId(itemId);
|
||||
message.setNodeId("analysis-node");
|
||||
message.setNodeName("视频分析");
|
||||
message.setNodeType("LLM");
|
||||
message.setAction(ActionEnum.VIDEO_ANALYZE);
|
||||
message.setInputParams(new JSONObject());
|
||||
message.setIterations(Collections.emptyList());
|
||||
return message;
|
||||
}
|
||||
|
||||
private void await(CountDownLatch latch) {
|
||||
try {
|
||||
latch.await();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private Object defaultValue(Class<?> type) {
|
||||
if (!type.isPrimitive()) return null;
|
||||
if (type == boolean.class) return false;
|
||||
if (type == char.class) return '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
private record Fixture(
|
||||
AsyncMediaAnalysisCoordinator coordinator,
|
||||
ThreadPoolTaskExecutor executor,
|
||||
TaskContext context,
|
||||
TaskNodeExecuteMessage message,
|
||||
AtomicBoolean nodeSucceeded,
|
||||
AtomicBoolean nodeFailed,
|
||||
AtomicReference<FlowExecutionEvent> lastEvent) {
|
||||
}
|
||||
}
|
||||
@ -154,11 +154,16 @@ public class LLMMediaAnalysisOperateServiceTest {
|
||||
.fluentAdd("https://files.example/scene-2.jpg"))
|
||||
.fluentPut("referenceImageUrl", "https://files.example/icon.jpg")
|
||||
.fluentPut("prompt", "最后一张图片是参考图,输出匹配图标的中心坐标 JSON")
|
||||
.fluentPut("analysisMethod", "REFERENCE_MATCH")
|
||||
.fluentPut("analysisMode", "ACCURATE")
|
||||
.fluentPut("analysisTuning", new JSONObject()
|
||||
.fluentPut("maxWidth", 1280)
|
||||
.fluentPut("maxImages", 8)
|
||||
.fluentPut("maxOutputTokens", 256));
|
||||
.fluentPut("maxOutputTokens", 256)
|
||||
.fluentPut("matchThreshold", 0.55D)
|
||||
.fluentPut("matchSelector", "INDEX")
|
||||
.fluentPut("matchIndex", 3)
|
||||
.fluentPut("matchSort", "COLUMN_MAJOR"));
|
||||
|
||||
TaskNodeExecuteResult result = service.execute(message(ActionEnum.IMAGE_ANALYZE, input));
|
||||
|
||||
@ -168,12 +173,48 @@ public class LLMMediaAnalysisOperateServiceTest {
|
||||
JSONObject options = captured.get().getJSONObject("options");
|
||||
assertEquals("最后一张图片是参考图,输出匹配图标的中心坐标 JSON", options.getString("prompt"));
|
||||
assertEquals("https://files.example/icon.jpg", options.getString("referenceImageUrl"));
|
||||
assertEquals("REFERENCE_MATCH", options.getString("analysisMethod"));
|
||||
assertEquals(8, options.getJSONObject("tuning").getIntValue("maxImages"));
|
||||
assertEquals(256, options.getJSONObject("tuning").getIntValue("maxOutputTokens"));
|
||||
assertEquals(0.55D, options.getJSONObject("tuning").getDoubleValue("matchThreshold"), 0.0001D);
|
||||
assertEquals("INDEX", options.getJSONObject("tuning").getString("matchSelector"));
|
||||
assertEquals(3, options.getJSONObject("tuning").getIntValue("matchIndex"));
|
||||
assertEquals("COLUMN_MAJOR", options.getJSONObject("tuning").getString("matchSort"));
|
||||
assertEquals(2, result.getOutputParams().getJSONArray("mediaUrls").size());
|
||||
assertNull(result.getOutputParams().get("passed"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forwardsDescriptionLocationMethodAndThreshold() {
|
||||
AtomicReference<JSONObject> captured = new AtomicReference<>();
|
||||
MediaAnalysisClient client = request -> {
|
||||
captured.set(request);
|
||||
return new JSONObject()
|
||||
.fluentPut("status", "SUCCEEDED")
|
||||
.fluentPut("analysisType", "IMAGE_ANALYSIS")
|
||||
.fluentPut("profileCode", "common.image_analysis.v1")
|
||||
.fluentPut("result", new JSONObject()
|
||||
.fluentPut("result", new JSONArray().fluentAdd(10).fluentAdd(20).fluentAdd(30).fluentAdd(40))
|
||||
.fluentPut("matched", true));
|
||||
};
|
||||
LLMMediaAnalysisOperateService service = new LLMMediaAnalysisOperateService(client);
|
||||
JSONObject input = new JSONObject()
|
||||
.fluentPut("profileCode", "common.image_analysis.v1")
|
||||
.fluentPut("imageUrl", "https://files.example/scene.jpg")
|
||||
.fluentPut("prompt", "右上角的蓝牙图标")
|
||||
.fluentPut("analysisMethod", "TEXT_LOCATE")
|
||||
.fluentPut("analysisMode", "ACCURATE")
|
||||
.fluentPut("analysisTuning", new JSONObject()
|
||||
.fluentPut("locateConfidenceThreshold", 0.65D));
|
||||
|
||||
service.execute(message(ActionEnum.IMAGE_ANALYZE, input));
|
||||
|
||||
JSONObject options = captured.get().getJSONObject("options");
|
||||
assertEquals("TEXT_LOCATE", options.getString("analysisMethod"));
|
||||
assertEquals(0.65D, options.getJSONObject("tuning")
|
||||
.getDoubleValue("locateConfidenceThreshold"), 0.0001D);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void restoresStaticImageUrlArraySerializedByLegacyFlowParamModel() {
|
||||
AtomicReference<JSONObject> captured = new AtomicReference<>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user