台湾展会用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
683 B

package com.galaxis.rcs;
import com.galaxis.rcs.communication.amrCommunication.MqttService;
import org.eclipse.paho.mqttv5.common.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class RcsRootController {
@Autowired
private MqttService mqttService;
@GetMapping("/ok")
public String ok() throws MqttException {
mqttService.subscribe("/agv_robot/status");
mqttService.publish("status", "OK");
// mqttService.publish("rcs/root/ok", "OK");
return "OK";
}
}