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.
25 lines
508 B
25 lines
508 B
package com.qyft.ms.device.service;
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
import com.qyft.ms.device.core.client.TcpClient;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
/**
|
|
* 设备tcp指令发送服务
|
|
*/
|
|
@Slf4j
|
|
@Service
|
|
@RequiredArgsConstructor
|
|
public class DeviceTcpCMDServiceV2 {
|
|
|
|
private final TcpClient tcpClient;
|
|
|
|
|
|
public boolean send(Object object) {
|
|
return tcpClient.send(JSONUtil.toJsonStr(object));
|
|
}
|
|
|
|
|
|
}
|