anchor.diff:  	#asp_state{user_fun = Fun, user_args = Args} = LoopDat,
   	Fun(Prim, Args).
   
  +state2aspas(asp_down) -> 'ASP_DOWN';
  +state2aspas(asp_inactive) -> 'ASP_INACTIVE';
  +state2aspas(asp_active) -> 'ASP_ACTIVE'.
  +
  +% propagate an ASP state transition as ASPAS primitive to AS
  +next_state(State, LoopDat = #asp_state{as_pid = AsPid}) ->
  +	Prim = osmo_util:make_prim('ASPAS', state2aspas(State), indication),
  +	gen_fsm:send_event(AsPid, Prim),
  +	{next_state, State, LoopDat}.
   
   % Helper function to send data to the SCTP peer
   send_sctp_to_peer(LoopDat, Msg) ->
  
positive.code: 	timer:cancel(LoopDat#asp_state.t_ack),
  	{ok, Tack} = timer:apply_after(?T_ACK_TIMEOUT, gen_fsm, send_event,
  				 [self(), {timer_expired, t_ack, {MsgClass, MsgType, Params}}]),
  	{next_state, State, LoopDat#asp_state{t_ack = Tack}}.
  
  
  send_prim_to_user(LoopDat, Prim) when is_record(LoopDat, asp_state),
  
negative.code: 	timer:cancel(LoopDat#asp_state.t_ack),
  	% transition into ASP_INACTIVE
  	send_prim_to_user(LoopDat, osmo_util:make_prim('M','ASP_UP',confirm)),
  	next_state(asp_inactive, LoopDat);
  
  asp_down(WhateverElse, LoopDat = #asp_state{module = Module, ext_state = ExtState}) ->
  	{State, LDnew} = Module:asp_down(WhateverElse, ExtState, LoopDat),
  	next_state(State, LDnew).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  