anchor.diff:  %--- API -----------------------------------------------------------------------
   
   % @private
  -start_link(Slot) ->
  +start_link(Slot, _Opts) ->
       gen_server:start_link({local, ?MODULE}, ?MODULE, Slot, []).
   
   get() ->
  
positive.code: -behavior(gen_server).
  
  % API
  -export([start_link/1, get/0]).
  
  % Callbacks
  -export([init/1]).
  
negative.code:     {ok, #state{port = Port}}.
  
  % @private
  handle_call(get_value, _From, #state{last_val = Val} = State) ->
      {reply, Val, State}.
  
  % @private
  handle_cast(Request, _State) -> error({unknown_cast, Request}).
  
  % @private
  handle_info({Port, {data, Data}}, #state{port = Port} = State) ->
      case Data of
          <<_, _, D1, D2, D3, 10>> when $0 =< D1, D1 =< $9,
                                        $0 =< D2, D2 =< $9,
                                        $0 =< D3, D3 =< $9 ->
              Val = (D1 - $0) * 100 + (D2 - $0) * 10 + (D3 - $0),
              {noreply, State#state{last_val = Val}};
          _ ->
              {noreply, State}
      end.
  
  
  
  % @private
  code_change(_OldVsn, State, _Extra) -> {ok, State}.
  
  % @private
  terminate(_Reason, _State) -> ok.
  