|
@ -36,6 +36,21 @@ public class TestController { |
|
|
private final OtherModuleService otherModuleService; |
|
|
private final OtherModuleService otherModuleService; |
|
|
private final DeviceEmergencyStopService deviceEmergencyStopService; |
|
|
private final DeviceEmergencyStopService deviceEmergencyStopService; |
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "启动虚拟模式") |
|
|
|
|
|
@PostMapping("/virtual") |
|
|
|
|
|
public Result<?> changeVirtualMode() { |
|
|
|
|
|
deviceStateService.getDeviceState().setVirtual(true); |
|
|
|
|
|
deviceStateService.getDeviceState().setInitComplete(true); |
|
|
|
|
|
return Result.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "模拟向硬件写入完毕") |
|
|
|
|
|
@PostMapping("/initComplete") |
|
|
|
|
|
public Result<?> setInitComplete(Boolean initComplete) { |
|
|
|
|
|
deviceStateService.getDeviceState().setInitComplete(initComplete); |
|
|
|
|
|
return Result.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Operation(summary = "获取所有传感器读数") |
|
|
@Operation(summary = "获取所有传感器读数") |
|
|
@GetMapping("/all-sensor") |
|
|
@GetMapping("/all-sensor") |
|
|
public Result<List<AllSensorDTO>> getAllSensor() throws HardwareException { |
|
|
public Result<List<AllSensorDTO>> getAllSensor() throws HardwareException { |
|
@ -57,7 +72,6 @@ public class TestController { |
|
|
return Result.success(); |
|
|
return Result.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "获取指令互斥状态") |
|
|
@Operation(summary = "获取指令互斥状态") |
|
|
@GetMapping("/mutex-state") |
|
|
@GetMapping("/mutex-state") |
|
|
public Result<CommandMutexState> getCommandMutexState() throws HardwareException { |
|
|
public Result<CommandMutexState> getCommandMutexState() throws HardwareException { |
|
@ -71,7 +85,6 @@ public class TestController { |
|
|
return Result.success(); |
|
|
return Result.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "触发急停") |
|
|
@Operation(summary = "触发急停") |
|
|
@PostMapping("/press-emergency-stop") |
|
|
@PostMapping("/press-emergency-stop") |
|
|
public Result<?> pressEmergencyStop() throws Exception { |
|
|
public Result<?> pressEmergencyStop() throws Exception { |
|
|