|
|
|
@ -236,6 +236,8 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Publish<T>(T data) where T : ICmd
|
|
|
|
|
{
|
|
|
|
|
if (MqttClient.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
Model<T> model = new Model<T>
|
|
|
|
|
{
|
|
|
|
@ -271,6 +273,8 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
|
|
|
|
|
MqttClient.PublishAsync(appMsg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string SignData<T>(Model<T> model) where T : ICmd
|
|
|
|
|
{
|
|
|
|
|
var settings = new JsonSerializerSettings()
|
|
|
|
|