anchor.diff:  -record('PINGREQ', {}).
   -record('PINGRESP', {}).
   
  -%%%%%%%%%%%%%%%%%%%%%%%
  -%% QoS
  -%%%%%%%%%%%%%%%%%%%%%%%
  --define(QOS_AT_MOST_ONCE, 0).
  --define(QOS_AT_LEAST_ONCE, 1).
  --define(QOS_EXACTLY_ONCE, 3).
  --define(QOS_RESERVED, 4).
positive.code: 
  -type packet_id() :: 0..16#ffff.
  -type client_id() :: binary().
  
  %%%%%%%%%%%%%%%%%%%%%%%
  %% Connections
  %%%%%%%%%%%%%%%%%%%%%%%
  
  -record(will_details,{
    topic           ::binary(),
    message         ::binary(),
    qos             ::byte(),
    retain          ::boolean()
  }).
  
  
negative.code: %%%%%%%%%%%%%%%%%%%%%%%
  %% Publication
  %%%%%%%%%%%%%%%%%%%%%%%
  -record('PUBLISH', {
      dup         ::boolean(),
      qos         ::qos(),
      retain      ::boolean(),
      topic       ::topic(),
      packet_id   ::packet_id(),
      content     ::binary()
  }).
  
  -record('PUBACK', {packet_id::packet_id()}).
  
  -record('PUBREC', {packet_id::packet_id()}).
  
  -record('PUBREL', {packet_id::packet_id()}).
  
  -record('PUBCOMP', {packet_id::packet_id()}).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%
  %% Subscriptions
  %%%%%%%%%%%%%%%%%%%%%%%
  -record('SUBSCRIBE', {
      packet_id       ::packet_id(),
      subscriptions   ::[{TopicFilter::binary(),QoS::qos()}]
  }).
  %%-record(subscription, {topic_filter,qos}).
  
  -record('SUBACK', {
      packet_id           ::packet_id(),
      return_codes=[]     ::[qos | ?SUBSCRIPTION_FAILURE]
  }).
  
  -record('UNSUBSCRIBE', {
      packet_id           ::packet_id(),
      topic_filters       ::[binary()]
  }).
  -record('UNSUBACK', {packet_id::packet_id()}).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%
  