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.
 
 
 
 

21 line
714 B

  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using MQTTnet.Core.Protocol;
  4. namespace MQTTnet.Core.Packets
  5. {
  6. public sealed class MqttSubAckPacket : MqttBasePacket, IPacketWithIdentifier
  7. {
  8. public ushort PacketIdentifier { get; set; }
  9. public IList<MqttSubscribeReturnCode> SubscribeReturnCodes { get; set; } = new List<MqttSubscribeReturnCode>();
  10. public override string ToString()
  11. {
  12. var subscribeReturnCodesText = string.Join(",", SubscribeReturnCodes.Select(f => f.ToString()));
  13. return
  14. $"{nameof(MqttSubAckPacket)} [PacketIdentifier={PacketIdentifier}] [SubscribeReturnCodes={subscribeReturnCodesText}]";
  15. }
  16. }
  17. }