Beispiel #1
0
/*---------------------------------------------------------------------------*/
void
polite_open(struct polite_conn *c, uint16_t channel,
	  const struct polite_callbacks *cb)
{
  abc_open(&c->c, channel, &abc);
  c->cb = cb;
}
Beispiel #2
0
/*---------------------------------------------------------------------------*/
void
broadcast_open(struct broadcast_conn *c, uint16_t channel,
	  const struct broadcast_callbacks *u)
{
  abc_open(&c->c, channel, &broadcast);
  c->u = u;
  channel_set_attributes(channel, attributes);
}
/*---------------------------------------------------------------------------*/
void p_broadcast_open(struct p_broadcast_conn *c, uint16_t channel)
{
	if (c == NULL)
	{
		PRINTF("[pbroadcast.c] Error: Broadcast Connection is NULL\n");
		return;
	}

	abc_open(&(c->abc), channel, &callbacks);
	channel_set_attributes(channel, attributes);
}
   PROCESS_THREAD( contiki_ext_radio_process, ev, data )
   {
      PROCESS_EXITHANDLER( abc_close(&wiselib::contiki::contiki_extdata_radio_conn) );

      PROCESS_BEGIN();

      abc_open( &wiselib::contiki::contiki_extdata_radio_conn, 128, &wiselib::contiki::abc_call );

      while(1)
      {
         static struct etimer et;
         etimer_set( &et, CLOCK_SECOND );

         PROCESS_WAIT_EVENT_UNTIL( etimer_expired(&et) );
      }

      PROCESS_END();
   }