anchor.diff:      case lorawan_handler:handle_rx(Link#link.devaddr, Link#link.app, Link#link.appid, Link#link.appargs,
               #rxdata{fcnt=FCnt, port=FPort, data=RxData, last_lost=LastLost, shall_reply=ShallReply}, RxQ) of
           retransmit ->
  +            lager:debug("~w retransmitting", [Link#link.devaddr]),
               {send, Link#link.devaddr, choose_tx(Link, RxQ), LostFrame};
           {send, TxData} ->
               send_unicast(choose_tx(Link, RxQ), Link#link.devaddr, Confirm, FOptsOut, TxData);
  
positive.code:             [D] = mnesia:read(links, DevAddr, write),
              FCnt = (D#link.fcntdown + 1) band 16#FFFFFFFF,
              NewD = D#link{fcntdown=FCnt},
              mnesia:write(links, NewD, write),
              NewD
          end),
      encode_frame(MType, DevAddr, L#link.nwkskey, L#link.appskey,
  
negative.code:         [] ->
              {error, {{gateway, MAC}, unknown_mac}};
          [G] ->
              ok = mnesia:dirty_write(gateways,
                  store_status(G#gateway{last_rx=calendar:universal_time()}, S)),
              ok
      end.
  