示例#1
0
        /// <summary>
        /// 通知
        /// </summary>
        /// <param name="publishData"></param>
        /// <returns></returns>

        public async Task Send(Dictionary<string, List<byte[]>> publishData)
        {
            try
            {
                await MQTTContext.getInstance().Publish(publishData);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
 public async Task<MqttClientPublishResult> Send(string topic, string payload)
 {
     try
     {
         return await MQTTContext.getInstance().Publish(topic, payload);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public DeviceDataController(MQTTContext context)
 {
     _context = context;
 }