[Tinyos-help] Help me plz!!

orana rayamas orana555 at hotmail.com
Mon Sep 12 09:09:10 PDT 2005


Dear all,

I try to use broadcasting by using InfToRfm and then when i'm wiring it with 
Main and compile it
so, it occured "SendingM.nc:61: IntOutput.outputComplete not connected"

someone help me plz!!

this is IntToRfm Code that i add main component

includes IntMsg;

module SendingM
{
  uses {
    interface StdControl as SubControl;
    interface SendMsg as Send;
  }
  provides {

    interface IntOutput;
    interface StdControl;
  }
}
implementation
{
  bool pending;
  TOS_Msg data;

  command result_t StdControl.init() {
    pending = FALSE;
    return call SubControl.init();
  }

  command result_t StdControl.start()
  {
    return call SubControl.start();
  }


    command result_t StdControl.stop()
  {
    return call SubControl.stop();
  }

  command result_t IntOutput.output(uint16_t value)
  {
    IntMsg *message = (IntMsg *)data.data;

    if (!pending)
      {
	pending = TRUE;

	message->val = value;
	atomic {
	  message->src = TOS_LOCAL_ADDRESS;
	}
	if (call Send.send(TOS_BCAST_ADDR, sizeof(IntMsg), &data))
	  return SUCCESS;

	pending = FALSE;
      }
    return FAIL;
  }

  event result_t Send.sendDone(TOS_MsgPtr msg, result_t success)
  {
    if (pending && msg == &data)
      {
	pending = FALSE;
	signal IntOutput.outputComplete(success);

      }
    return SUCCESS;
  }
}

a lot of thanx.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Tinyos-help mailing list