anchor.diff:        Cmd :: string().
   
   set_cmd(Cmd) ->
  -    heart ! {self(), set_cmd, Cmd},
  +    ?MODULE ! {self(), set_cmd, Cmd},
       wait().
   
   -spec get_cmd() -> {ok, Cmd} when
         Cmd :: string().
   
   get_cmd() ->
  -    heart ! {self(), get_cmd},
  +    ?MODULE ! {self(), get_cmd},
       wait().
   
   -spec clear_cmd() -> ok.
   
   clear_cmd() ->
  -    heart ! {self(), clear_cmd},
  +    ?MODULE ! {self(), clear_cmd},
  +    wait().
  +
  +-spec set_callback(Module,Function) -> 'ok' | {'error', {'bad_callback', {Module, Function}}} when
  +      Module :: module(),
  +      Function :: function().
  +
  +set_callback(Module, Function) ->
  +    ?MODULE ! {self(), set_callback, {Module,Function}},
  +    wait().
  +
  +-spec get_callback() -> {'ok', Callback} | 'none' when
  +      Callback :: {module(), function()}.
  +
  +get_callback() ->
  +    ?MODULE ! {self(), get_callback},
  +    wait().
  +
  +-spec clear_callback() -> ok.
  +
  +clear_callback() ->
  +    ?MODULE ! {self(), clear_callback},
       wait().
   
   
  
positive.code: 	    {ok, Cmd}
      end.
  
  %% Sends shutdown command to the port.
  send_shutdown(Port) -> Port ! {self(), {command, [?SHUT_DOWN]}}.
  
  
negative.code: 	{'EXIT', Port, badsig} ->  % we can ignore badsig-messages!
  	    loop(Parent, S);
  	{'EXIT', Port, _Reason} ->
  	    exit({port_terminated, {?MODULE, loop, [Parent, S]}});
  	_ -> 
  	    loop(Parent, S)
      after
  