该类使用MQTT协议订阅数据进行发短信
using AlarmToMsg.ROOT;
using AlarmToMsg.Tools;
using HslCommunication;
using HslCommunication.MQTT;
using logcxx;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Text;
using WindowsFormsApp1;
namespace WindowsFormsApp
{
public class MQTTClientClass
{
public string MqClientId {
get; set; }
public string MqIpAddress {
get; set; }
public int MqPort {
get; set; }
public string MqUser {
get; set; }
public string MqPassword {
get; set; }
public string MqTopicName {
get; set; }
public MQTTClientClass(string clientid, string ip, int port, string user, string password,string topicname)
{
MqClientId