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: %%%%%%%%%%%%%%%%%%%%%%%
  %% Publication
  %%%%%%%%%%%%%%%%%%%%%%%
  -record('PUBLISH', {dup,qos,retain,topic,packet_id,content}).
  
  -record('PUBACK', {packet_id}).
  
  -record('PUBREC', {packet_id}).
  
  -record('PUBREL', {packet_id}).
  
  -record('PUBCOMP', {packet_id}).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%
  %% Subscriptions
  %%%%%%%%%%%%%%%%%%%%%%%
  -record('SUBSCRIBE', {packet_id,subscriptions}).
  -record(subscription, {topic_filter,qos}).
  
  -record('SUBACK', {packet_id,return_codes=[]}).
  -define(SUBSCRIPTION_FAILURE,16#80).
  
  -record('UNSUBSCRIBE', {packet_id,topic_filters}).
  -record('UNSUBACK', {packet_id}).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%
  
negative.code: 
  -type packet_id() :: 0..16#ffff.
  -type client_id() :: binary().
  -type qos()       ::0..2.
  -type topic()     ::binary().
  
  
  %%%%%%%%%%%%%%%%%%%%%%%
  %% Special Values
  %%%%%%%%%%%%%%%%%%%%%%%
  -define(SUBSCRIPTION_FAILURE,16#80).
  -define(QOS_AT_MOST_ONCE, 0).
  -define(QOS_AT_LEAST_ONCE, 1).
  -define(QOS_EXACTLY_ONCE, 3).
  -define(QOS_RESERVED, 4).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%
  %% Connections
  %%%%%%%%%%%%%%%%%%%%%%%
  
  -record(will_details,{
    topic           ::topic(),
    message         ::binary(),
    qos             ::qos(),
    retain          ::boolean()
  }).
  
  