/**
 * Copyright (C), 2022-05-25
 * FileName: ModbusTest
 * Author:   wanglongda
 * Date:     2022/5/25 10:27
 * Description: modbus测试
 */
package me.zhengjie.modules.thirdparty.v1.modbus;/**
 * Created Name: wanglongda
 * Created Time: 2022/5/25 10:27
 * Description: iot-hjjc
 */

import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.rest.AnonymousGetMapping;
import me.zhengjie.annotation.rest.AnonymousPostMapping;
import me.zhengjie.base.BaseResponse;
import me.zhengjie.modules.quartz.task.ModbusTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <功能简要> <br>
 * <modbus测试>
 *
 * @Author wanglongda
 * @createTime 2022/5/25 10:27
 * @Version 1.0.0
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@Api(tags = "modbus接口")
@RequestMapping("/modbus")
public class ModbusController {

    @Autowired
    private ModbusTask modbusTask;

    @AnonymousGetMapping("get")
    public String getMessage() {
        modbusTask.gainModbusData();
//        modbusTask.gainModbusData1();
        return "消息发送完成";
    }

}
