天一电厂UPS动环数据对接,SNMP协议
whycxzp
2024-02-29 ac476c867af05823e33c7746eb2ec37dd26abe7a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.service.SNMPConnectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.io.IOException;
 
@RequestMapping("test")
@RestController
public class SNMPTestController {
 
    @Resource
    private SNMPConnectService service;
 
    @GetMapping("getData")
    public Response getData(){
        return service.getData();
    }
 
    @GetMapping("getSignal")
    public Response getSignal(){
        return service.getSignal();
    }
 
    @GetMapping("getAlarm")
    public Response getAlarm(){
        return service.getAlarm();
    }
 
}