⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 app.c

📁 一种基于nesC的无线传感器网络应用程序,并提供了编译说明书,此文件就是编译后生成的二进制文件
💻 C
📖 第 1 页 / 共 5 页
字号:
void PowerStateM$PowerState$redOff(void);static inline #line 311int PowerStateM$num_bbs(void);static inline int PowerStateM$bb_exec_count(int mote, int bb);static   double PowerStateM$PowerState$get_mote_cycles(int mote);static inline #line 339void PowerStateM$print_power_info(void);static inline #line 361void PowerStateM$dump_power_details(void);static inline   #line 389void PowerStateM$PowerState$CPUCycleCheckpoint(void);static   # 56 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Leds.nc"result_t BlinkM$Leds$init(void);static   #line 81result_t BlinkM$Leds$redToggle(void);static  # 59 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.nc"result_t BlinkM$Timer$start(char arg_0xa6f7ed8, uint32_t arg_0xa6d2060);static  result_t BlinkM$Timer$stop(void);static inline  # 52 "BlinkM.nc"result_t BlinkM$StdControl$init(void);static inline  result_t BlinkM$StdControl$start(void);static inline  result_t BlinkM$StdControl$stop(void);static inline  result_t BlinkM$Timer$fired(void);static   # 41 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/PowerManagement.nc"uint8_t TimerM$PowerManagement$adjustPower(void);static   # 105 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Clock.nc"void TimerM$Clock$setInterval(uint8_t arg_0xa701910);static   #line 153uint8_t TimerM$Clock$readCounter(void);static   #line 96result_t TimerM$Clock$setRate(char arg_0xa700e10, char arg_0xa700f50);static   #line 121uint8_t TimerM$Clock$getInterval(void);static  # 73 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.nc"result_t TimerM$Timer$fired(# 49 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/TimerM.nc"uint8_t arg_0xa6e8030);uint32_t TimerM$mState[1000];uint8_t TimerM$setIntervalFlag[1000];uint8_t TimerM$mScale[1000];#line 61uint8_t TimerM$mInterval[1000];int8_t TimerM$queue_head[1000];int8_t TimerM$queue_tail[1000];uint8_t TimerM$queue_size[1000];uint8_t TimerM$queue[1000][NUM_TIMERS];volatile uint16_t TimerM$interval_outstanding[1000];struct TimerM$timer_s {  uint8_t type;  int32_t ticks;  int32_t ticksLeft;} TimerM$mTimerList[1000][NUM_TIMERS];enum TimerM$__nesc_unnamed4299 {  TimerM$maxTimerInterval = 230};static inline  result_t TimerM$StdControl$init(void);static inline  result_t TimerM$StdControl$start(void);static inline  result_t TimerM$StdControl$stop(void);static inline  result_t TimerM$Timer$start(uint8_t id, char type, uint32_t interval);#line 129static void TimerM$adjustInterval(void);static inline  #line 168result_t TimerM$Timer$stop(uint8_t id);static inline   #line 182result_t TimerM$Timer$default$fired(uint8_t id);static inline void TimerM$enqueue(uint8_t value);static inline uint8_t TimerM$dequeue(void);static inline  void TimerM$signalOneTimer(void);static inline  void TimerM$HandleFire(void);static inline   #line 253result_t TimerM$Clock$fire(void);static   # 180 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Clock.nc"result_t HPLClock$Clock$fire(void);# 60 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/HPLClock.nc"char HPLClock$set_flag[1000]; unsigned char HPLClock$mscale[1000]; #line 61unsigned char HPLClock$nextScale[1000]; #line 61unsigned char HPLClock$minterval[1000];static inline   #line 82void HPLClock$Clock$setInterval(uint8_t value);static inline   uint8_t HPLClock$Clock$getInterval(void);static inline   #line 113uint8_t HPLClock$Clock$readCounter(void);static inline   #line 128result_t HPLClock$Clock$setRate(char interval, char scale);static inline void  SIG_OUTPUT_COMPARE2_interrupt(void);# 50 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/HPLPowerManagementM.nc"enum HPLPowerManagementM$__nesc_unnamed4300 {  HPLPowerManagementM$IDLE = 0};static inline   uint8_t HPLPowerManagementM$PowerManagement$adjustPower(void);static   # 37 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/PowerState.nc"void LedsM$PowerState$redOff(void);static   #line 36void LedsM$PowerState$redOn(void);# 51 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/LedsM.nc"uint8_t LedsM$ledsOn[1000];enum LedsM$__nesc_unnamed4301 {  LedsM$RED_BIT = 1,   LedsM$GREEN_BIT = 2,   LedsM$YELLOW_BIT = 4};static void LedsM$updateLeds(void);static inline   result_t LedsM$Leds$init(void);static inline   result_t LedsM$Leds$redOn(void);static inline   #line 90result_t LedsM$Leds$redOff(void);static inline   #line 102result_t LedsM$Leds$redToggle(void);# 88 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/hardware.h"__inline __nesc_atomic_t  __nesc_atomic_start(void ){  return 0;}__inline void  __nesc_atomic_end(__nesc_atomic_t oldSreg){}static inline # 56 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/events.c"void event_cleanup(event_t *fevent){  dbg(DBG_MEM, "event_cleanup: freeing event: 0x%x\n", (unsigned int )fevent);  fevent->cleanup(fevent);}static inline   # 442 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/Nido.nc"result_t Nido$RadioSendMsg$default$sendDone(TOS_MsgPtr msg, result_t success)#line 442{  return FAIL;}# 67 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc"inline static  result_t Nido$RadioSendMsg$sendDone(TOS_MsgPtr arg_0xa601420, result_t arg_0xa601570){#line 67  unsigned char result;#line 67#line 67  result = Nido$RadioSendMsg$default$sendDone(arg_0xa601420, arg_0xa601570);#line 67#line 67  return result;#line 67}#line 67# 446 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/Nido.nc"void   packet_sim_transmit_done(TOS_MsgPtr msg)#line 446{  dbg(DBG_PACKET, "TossimPacketMica2M: Send done.\n");  Nido$RadioSendMsg$sendDone(msg, SUCCESS);}static inline # 262 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/external_comm.c"int printTime(char *buf, int len)#line 262{  return printOtherTime(buf, len, tos_state.tos_time);}# 80 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/types/dbg.h"static bool dbg_active(TOS_dbg_mode mode){  return (dbg_modes & mode) != 0;}# 277 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/packet_sim.c"void   event_send_packet_done_handle(event_t *event, struct TOS_state *state)#line 277{  TOS_MsgPtr bufferPtr = packet_transmitting[tos_state.current_node];#line 279  if (dbg_active(DBG_PACKET)) {      char timeBuf[128];#line 281      printTime(timeBuf, 128);      dbg(DBG_PACKET, "SIM_PACKET: Send done @%s\n", timeBuf);    }  packet_transmitting[tos_state.current_node] = (void *)0;  packet_sim_transmit_done(bufferPtr);  event_cleanup(event);}#line 266void   event_send_packet_done_create(event_t *event, int node, long long eventTime)#line 266{  event->mote = node;  event->force = 0;  event->pause = 0;  event->time = eventTime;  event->handle = event_send_packet_done_handle;  event->cleanup = event_total_cleanup;  event->data = (void *)0;}static inline   # 422 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/Nido.nc"TOS_MsgPtr Nido$RadioReceiveMsg$default$receive(TOS_MsgPtr msg)#line 422{  return msg;}# 75 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"inline static  TOS_MsgPtr Nido$RadioReceiveMsg$receive(TOS_MsgPtr arg_0xa61b910){#line 75  struct TOS_Msg *result;#line 75#line 75  result = Nido$RadioReceiveMsg$default$receive(arg_0xa61b910);#line 75#line 75  return result;#line 75}#line 75# 451 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/Nido.nc"void   packet_sim_receive_msg(TOS_MsgPtr msg)#line 451{  msg = Nido$RadioReceiveMsg$receive(msg);}# 239 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/packet_sim.c"void   event_receive_packet_handle(event_t *event, struct TOS_state *state)#line 239{  IncomingMsg *receivedPacket;  IncomingMsg *prevPacket = (void *)0;  IncomingMsg *nextPacket = (void *)0;  receivedPacket = (IncomingMsg *)event->data;  prevPacket = incoming[tos_state.current_node];  if (prevPacket == receivedPacket) {      incoming[tos_state.current_node] = prevPacket->next;    }  else {      while (prevPacket->next != (void *)0) {          nextPacket = prevPacket->next;          if (nextPacket == receivedPacket) {              prevPacket->next = nextPacket->next;              break;            }          prevPacket = nextPacket;        }    }  dbg(DBG_PACKET, "SIM_PACKET: Receiving\n");  packet_sim_receive_msg(& receivedPacket->msg);  event_cleanup(event);}#line 228void   event_receive_packet_create(event_t *event, int node, long long eventTime, IncomingMsg *msg)#line 228{  event->mote = node;  event->force = 0;  event->pause = 0;  event->time = eventTime;  event->handle = event_receive_packet_handle;  event->cleanup = event_total_cleanup;  event->data = msg;}static inline # 149 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/tos.h"void *nmemcpy(void *to, const void *from, size_t n){  char *cto = to;  const char *cfrom = from;  while (n--) * cto++ = * cfrom++;  return to;}# 174 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/packet_sim.c"void   event_start_transmit_handle(event_t *event, struct TOS_state *state)#line 174{  link_t *connectLink;  TOS_MsgPtr msg = packet_transmitting[tos_state.current_node];  int transmitTime = preambleLength + msg->length + headerLength;#line 178  transmitTime *= byteTransmitTime;  connectLink = cc1000_connectivity[tos_state.current_node];  dbg(DBG_PACKET, "SIM_PACKET: Transmitting, transmit time is %i.\n", transmitTime);  while (connectLink != (void *)0) {      int mote = connectLink->mote;#line 185      if (mote >= tos_state.num_nodes ||       !tos_state.moteOn[mote]) {          connectLink = connectLink->next_link;          continue;        }      if (packet_transmitting[mote] == (void *)0) {          event_t *recvEvent = (event_t *)malloc(sizeof(event_t ));          IncomingMsg *msgEvent = (IncomingMsg *)malloc(sizeof(IncomingMsg ));#line 195          nmemcpy(& msgEvent->msg, msg, sizeof(TOS_Msg ));          dbg(DBG_PACKET, "SIM_PACKET: Mote %i sending to mote %i\n", (int )tos_state.current_node, (int )mote);          if (incoming[mote] != (void *)0) {              IncomingMsg *incomingMsg = incoming[mote];#line 201              corruptPacket(msgEvent, tos_state.current_node, mote);              while (incomingMsg != (void *)0) {                  corruptPacket(incomingMsg, tos_state.current_node, mote);                  incomingMsg = incomingMsg->next;                }            }          msgEvent->next = incoming[mote];          incoming[mote] = msgEvent;          event_receive_packet_create(recvEvent, mote, tos_state.tos_time + transmitTime, msgEvent);          queue_insert_event(& tos_state.queue, recvEvent);#line 213          ;        }      else {          dbg(DBG_PACKET, "SIM_PACKET: Mote %i would send to mote %i, but it is transmitting.\n", (int )tos_state.current_node, (int )mote);        }      connectLink = connectLink->next_link;    }  dbg(DBG_PACKET, "SIM_PACKET: Enqueueing send done.\n");  event_send_packet_done_create(event, tos_state.current_node, tos_state.tos_time + transmitTime);  queue_insert_event(& tos_state.queue, event);#line 223  ;}static inline #line 155void event_start_transmit_create(event_t *event, int node, long long eventTime)#line 155{  event->mote = node;  event->force = 0;  event->pause = 0;  event->data = (void *)0;  event->time = eventTime;  event->handle = event_start_transmit_handle;  event->cleanup = event_total_cleanup;}#line 141void   event_backoff_handle(event_t *event, struct TOS_state *state)#line 141{  if (incoming[tos_state.current_node] != (void *)0) {      int backoffAmount = backoffLow;#line 144      backoffAmount += rand() % (backoffHigh - backoffLow);      event_backoff_create(event, tos_state.current_node, tos_state.tos_time + backoffAmount);      dbg(DBG_PACKET, "SIM_PACKET: Backoff more: %i.\n", backoffAmount);      queue_insert_event(& tos_state.queue, event);#line 147      ;    }  else {      event_start_transmit_create(event, tos_state.current_node, tos_state.tos_time + txChangeLatency);      queue_insert_event(& tos_state.queue, event);#line 151      ;    }}static inline # 120 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/heap_array.c"void expand_heap(heap_t *heap)#line 120{  int new_size = heap->private_size * 2 + 1;  void *new_data = malloc(sizeof(node_t ) * new_size);  dbg(DBG_SIM, "Resized heap from %i to %i.\n", heap->private_size, new_size);  memcpy(new_data, heap->data, sizeof(node_t ) * heap->private_size);  free(heap->data);  heap->data = new_data;  heap->private_size = new_size;}static inline void heap_insert(heap_t *heap, void *data, long long key)#line 134{  int findex = heap->size;#line 136  if (findex == heap->private_size) {      expand_heap(heap);    }  findex = heap->size;  ((node_t *)heap->data)[findex].key = key;  ((node_t *)heap->data)[findex].data = data;  up_heap(heap, findex);  heap->size++;}# 107 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/Nido.nc"void   event_boot_handle(event_t *fevent, struct TOS_state *fstate)#line 108{  char timeVal[128];#line 110  printTime(timeVal, 128);  if (!tos_state.cancelBoot[tos_state.current_node]) {      dbg(DBG_BOOT, "BOOT: Mote booting at time %s.\n", timeVal);      nido_start_mote((uint16_t )tos_state.current_node);    }  else #line 116    {      dbg(DBG_BOOT, "BOOT: Boot cancelled at time %s since mote turned off.\n",       timeVal);    }}static inline # 120 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/tos.h"result_t rcombine(result_t r1, result_t r2){  return r1 == FAIL ? FAIL : r2;}static inline   # 68 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/LedsM.nc"result_t LedsM$Leds$init(void)#line 68{  { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 69    {      LedsM$ledsOn[tos_state.current_node] = 0;      dbg(DBG_BOOT, "LEDS: initialized.\n");      LedsM$updateLeds();    }#line 73    __nesc_atomic_end(__nesc_atomic); }  return SUCCESS;}# 56 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Leds.nc"inline static   result_t BlinkM$Leds$init(void){#line 56  unsigned char result;#line 56#line 56  result = LedsM$Leds$init();#line 56#line 56  return result;#line 56}#line 56static inline  # 52 "BlinkM.nc"result_t BlinkM$StdControl$init(void)#line 52{  BlinkM$Leds$init();  return SUCCESS;}static inline   # 128 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/HPLClock.nc"result_t HPLClock$Clock$setRate(char interval, char scale)#line 128{  HPLClock$mscale[tos_state.current_node] = scale;  HPLClock$minterval[tos_state.current_node] = interval;  TOSH_clock_set_rate(interval, scale);  return SUCCESS;}# 96 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Clock.nc"inline static   result_t TimerM$Clock$setRate(char arg_0xa700e10, char arg_0xa700f50){#line 96  unsigned char result;#line

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -