📄 app.c
字号:
#line 227typedef struct __nesc_unnamed4278 { uint8_t cmd_type; uint16_t duration;} __attribute((packed)) LitPathCmd;# 34 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\types\\Messages.h"enum __nesc_unnamed4279 { AM_HEALTH = 3, AM_DEBUGPACKET = 3, AM_DATA2BASE = 11, AM_DATA2NODE = 12, AM_DATAACK2BASE = 13, AM_DATAACK2NODE = 14, AM_ANY2ANY = 15, AM_TIMESYNC = 239, AM_PREAMBLE = 240, AM_DOWNSTREAM_ACK = 246, AM_UPSTREAM_ACK = 247, AM_PATH_LIGHT_DOWN = 248, AM_PATH_LIGHT_UP = 249, AM_MULTIHOPMSG = 250, AM_ONE_HOP = 251, AM_HEARTBEAT = 253, AM_MGMT = 90, AM_BULKXFER = 91, AM_MGMTRESP = 92};# 23 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\types\\Health.h"#line 18typedef struct _health_node_quality { uint16_t node_id; uint8_t link_quality; uint8_t path_cost; uint8_t radio_link_indicator;} __attribute((packed)) hn_quality;#line 57#line 48typedef struct _health_hdr_ { uint8_t type_nodes; uint8_t version_num; uint8_t type;} __attribute((packed)) HealthHdr;#line 80#line 63typedef struct _health_msg_ { HealthHdr health_hdr; uint16_t seq_num; uint16_t num_node_pkts; uint16_t num_fwd_pkts; uint16_t num_drop_pkts; uint16_t num_rexmits; uint8_t battery_voltage; uint16_t power_sum; uint8_t rsvd_app_type; hn_quality nodeinfo[2];} __attribute((packed)) HealthMsg;#line 85typedef struct _health_neighbor_ { HealthHdr health_hdr; hn_quality nodeinfo[3];} __attribute((packed)) HealthNeighbor;# 13 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ADC.h"enum __nesc_unnamed4280 { TOS_ADCSample3750ns = 0, TOS_ADCSample7500ns = 1, TOS_ADCSample15us = 2, TOS_ADCSample30us = 3, TOS_ADCSample60us = 4, TOS_ADCSample120us = 5, TOS_ADCSample240us = 6, TOS_ADCSample480us = 7};# 57 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Pot.nc"static result_t PotM$Pot$init(uint8_t arg_0x1a543bb0);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\HPLPot.nc"static result_t HPLPotC$Pot$finalise(void);#line 38static result_t HPLPotC$Pot$decrease(void);static result_t HPLPotC$Pot$increase(void);# 32 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\HPLInit.nc"static result_t HPLInit$init(void);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static TOS_MsgPtr AMPromiscuous$ReceiveMsg$default$receive(# 36 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\AMPromiscuous.nc"uint8_t arg_0x1a5e5e08, # 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"TOS_MsgPtr arg_0x1a5d4500);# 51 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Timer.nc"static result_t AMPromiscuous$ActivityTimer$fired(void);# 45 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static result_t AMPromiscuous$UARTSend$sendDone(TOS_MsgPtr arg_0x1a5f5a80, result_t arg_0x1a5f5c10);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static TOS_MsgPtr AMPromiscuous$RadioReceive$receive(TOS_MsgPtr arg_0x1a5d4500);# 49 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\CommControl.nc"static bool AMPromiscuous$CommControl$getPromiscuous(void);#line 29static result_t AMPromiscuous$CommControl$setCRCCheck(bool arg_0x1a5a5dd8);static bool AMPromiscuous$CommControl$getCRCCheck(void);static result_t AMPromiscuous$CommControl$setPromiscuous(bool arg_0x1a5a3b18);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static result_t AMPromiscuous$Control$init(void);static result_t AMPromiscuous$Control$start(void);static result_t AMPromiscuous$Control$stop(void);# 46 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\AMPromiscuous.nc"static result_t AMPromiscuous$default$sendDone(void);# 45 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static result_t AMPromiscuous$RadioSend$sendDone(TOS_MsgPtr arg_0x1a5f5a80, result_t arg_0x1a5f5c10);# 26 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SendMsg.nc"static result_t AMPromiscuous$SendMsg$send(# 35 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\AMPromiscuous.nc"uint8_t arg_0x1a5e5770, # 26 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SendMsg.nc"uint16_t arg_0x1a5c0eb8, uint8_t arg_0x1a5b4068, TOS_MsgPtr arg_0x1a5b41f8);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static TOS_MsgPtr AMPromiscuous$UARTReceive$receive(TOS_MsgPtr arg_0x1a5d4500);# 42 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SplitControl.nc"static result_t RF230ControlM$SplitControl$init(void);#line 55static result_t RF230ControlM$SplitControl$start(void);#line 71static result_t RF230ControlM$SplitControl$stop(void);# 104 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230Control.nc"static void RF230ControlM$RF230Control$force_TRX_OFF(void);#line 116static void RF230ControlM$RF230Control$set_RX_ON(void);#line 74static void RF230ControlM$RF230Control$getRSSIandCRC(bool *arg_0x1a6a1e60, uint8_t *arg_0x1a6a0030);#line 56static result_t RF230ControlM$RF230Control$SetRFPower(uint8_t arg_0x1a6a1168);#line 98static void RF230ControlM$RF230Control$set_TRX_OFF(void);#line 17static void RF230ControlM$RF230Control$resetRadio(void);#line 110static void RF230ControlM$RF230Control$set_PLL_ON(void);#line 29static result_t RF230ControlM$RF230Control$TunePreset(uint8_t arg_0x1a6a4ba8);#line 90static bool RF230ControlM$RF230Control$CCA(void);# 51 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Timer.nc"static result_t RF230ControlM$initTimer$fired(void);# 29 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\WakeSequence.nc"static void RF230RadioM$WakeSequence$sendWakeDone(result_t arg_0x1a7637f8);#line 46static void RF230RadioM$WakeSequence$IncomingPacket(void);static void RF230RadioM$WakeSequence$sniffExpired(bool arg_0x1a762b90);# 63 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SplitControl.nc"static result_t RF230RadioM$RadioSplitControl$startDone(void);# 45 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static result_t RF230RadioM$PHYSend$sendDone(TOS_MsgPtr arg_0x1a5f5a80, result_t arg_0x1a5f5c10);#line 36static result_t RF230RadioM$Send$send(TOS_MsgPtr arg_0x1a5f5328);# 51 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Timer.nc"static result_t RF230RadioM$SleepTimer$fired(void);#line 51static result_t RF230RadioM$IntervalTimer$fired(void);# 56 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\RadioPower.nc"static result_t RF230RadioM$RadioPower$SetListeningMode(uint8_t arg_0x1a694198);static result_t RF230RadioM$RadioPower$SetTransmitMode(uint8_t arg_0x1a694630);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static TOS_MsgPtr RF230RadioM$PHYRecv$receive(TOS_MsgPtr arg_0x1a5d4500);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static result_t RF230RadioM$StdControl$init(void);static result_t RF230RadioM$StdControl$start(void);static result_t RF230RadioM$StdControl$stop(void);# 24 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\MacBackoff.nc"static int16_t RF230RadioM$MacBackoff$initialBackoff(TOS_MsgPtr arg_0x1a7767f8);static int16_t RF230RadioM$MacBackoff$congestionBackoff(TOS_MsgPtr arg_0x1a776cb8);# 16 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230Interrupts.nc"static void RF230RadioRawM$RF230Interrupts$INT_RX_Start(void);static void RF230RadioRawM$RF230Interrupts$INT_TRX_UnderRun(void);#line 18static void RF230RadioRawM$RF230Interrupts$INT_TRX_Done(void);# 42 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SplitControl.nc"static result_t RF230RadioRawM$RadioSplitControl$init(void);#line 55static result_t RF230RadioRawM$RadioSplitControl$start(void);#line 71static result_t RF230RadioRawM$RadioSplitControl$stop(void);# 15 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\RadioCoordinator.nc"static void RF230RadioRawM$sendCoordinator$default$startSymbol(uint8_t arg_0x1a7b1988, uint8_t arg_0x1a7b1b10, TOS_MsgPtr arg_0x1a7b1ca0);# 22 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerJiffyAsync.nc"static result_t RF230RadioRawM$TimerJiffyAsync$fired(void);# 15 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\RadioCoordinator.nc"static void RF230RadioRawM$recvCoordinator$default$startSymbol(uint8_t arg_0x1a7b1988, uint8_t arg_0x1a7b1b10, TOS_MsgPtr arg_0x1a7b1ca0);# 36 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static result_t RF230RadioRawM$Send$send(TOS_MsgPtr arg_0x1a5f5328);# 63 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SplitControl.nc"static result_t RF230RadioRawM$RF230ControlSplitControl$startDone(void);# 14 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230Interrupts.nc"static void RF230InterruptsM$RF230Interrupts$disable(void);#line 12static void RF230InterruptsM$RF230Interrupts$enable(void);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static result_t RF230InterruptsM$InterruptControl$init(void);static result_t RF230InterruptsM$InterruptControl$start(void);static result_t RF230InterruptsM$InterruptControl$stop(void);# 60 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerCapture.nc"static void RF230InterruptsM$TimerCapture$captured(uint16_t arg_0x1a8a2648);# 157 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\Clock16.nc"static result_t HPLTimer1M$Timer1$default$fire(void);# 19 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerCapture.nc"static uint16_t HPLTimer1M$CaptureT1$getEvent(void);#line 50static void HPLTimer1M$CaptureT1$enableEvents(void);static void HPLTimer1M$CaptureT1$disableEvents(void);#line 28static void HPLTimer1M$CaptureT1$setEdge(uint8_t arg_0x1a8a4010);# 34 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\HPLRF230.nc"static void HPLRF230M$HPLRF230$writeFrame(uint8_t arg_0x1a6e10f8, uint8_t *arg_0x1a6e12a0);#line 46static uint8_t HPLRF230M$HPLRF230$readFrameCRC(uint8_t *arg_0x1a6e0068);#line 14static void HPLRF230M$HPLRF230$writeReg(uint8_t arg_0x1a6e5bb0, uint8_t arg_0x1a6e5d38);#line 29static void HPLRF230M$HPLRF230$bitWrite(uint8_t arg_0x1a6e25c0, uint8_t arg_0x1a6e2748, uint8_t arg_0x1a6e28d0, uint8_t arg_0x1a6e2a58);static void HPLRF230M$HPLRF230$addCRC(uint8_t *arg_0x1a6e1938);#line 19static uint8_t HPLRF230M$HPLRF230$readReg(uint8_t arg_0x1a6e33d8);# 14 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\HPLRF230Init.nc"static void HPLRF230M$HPLRF230Init$init(void);# 159 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Clock.nc"static result_t TimerM$Clock$fire(void);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static result_t TimerM$StdControl$init(void);static result_t TimerM$StdControl$start(void);# 51 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Timer.nc"static result_t TimerM$Timer$default$fired(# 26 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\TimerM.nc"uint8_t arg_0x1a9e23a0);# 37 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Timer.nc"static result_t TimerM$Timer$start(# 26 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\TimerM.nc"uint8_t arg_0x1a9e23a0, # 37 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Timer.nc"char arg_0x1a6121f0, uint32_t arg_0x1a612388);static result_t TimerM$Timer$stop(# 26 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\TimerM.nc"uint8_t arg_0x1a9e23a0);# 84 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Clock.nc"static void HPLClock$Clock$setInterval(uint8_t arg_0x1a9f6da8);#line 127static result_t HPLClock$Clock$setIntervalAndScale(uint8_t arg_0x1a9f4d00, uint8_t arg_0x1a9f4e88);static uint8_t HPLClock$Clock$readCounter(void);#line 75static result_t HPLClock$Clock$setRate(char arg_0x1a9f6010, char arg_0x1a9f6190);#line 100static uint8_t HPLClock$Clock$getInterval(void);# 85 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Leds.nc"static result_t NoLeds$Leds$greenToggle(void);#line 60static result_t NoLeds$Leds$redToggle(void);# 19 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\PowerManagement.nc"static uint8_t HPLPowerManagementM$PowerManagement$adjustPower(void);# 16 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerJiffyAsync.nc"static result_t TimerJiffyAsyncM$TimerJiffyAsync$setOneShot(uint32_t arg_0x1a7d55f0);static result_t TimerJiffyAsyncM$TimerJiffyAsync$stop(void);# 159 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Clock.nc"static result_t TimerJiffyAsyncM$Timer$fire(void);#line 127static result_t HPLTimer0$Timer0$setIntervalAndScale(uint8_t arg_0x1a9f4d00, uint8_t arg_0x1a9f4e88);#line 147static void HPLTimer0$Timer0$intDisable(void);# 101 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Leds.nc"static result_t LedsC$Leds$yellowOff(void);#line 93static result_t LedsC$Leds$yellowOn(void);#line 35static result_t LedsC$Leds$init(void);#line 76static result_t LedsC$Leds$greenOff(void);#line 51static result_t LedsC$Leds$redOff(void);#line 85static result_t LedsC$Leds$greenToggle(void);#line 110static result_t LedsC$Leds$yellowToggle(void);#line 60static result_t LedsC$Leds$redToggle(void);#line 43static result_t LedsC$Leds$redOn(void);#line 68static result_t LedsC$Leds$greenOn(void);# 42 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Random.nc"static uint16_t RandomLFSR$Random$rand(void);#line 36static result_t RandomLFSR$Random$init(void);# 62 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ByteComm.nc"static result_t FramerM$ByteComm$txDone(void);#line 54static result_t FramerM$ByteComm$txByteReady(bool arg_0x1ab342e8);#line 45static result_t FramerM$ByteComm$rxByteReady(uint8_t arg_0x1ab357f0, bool arg_0x1ab35978, uint16_t arg_0x1ab35b10);# 36 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static result_t FramerM$BareSendMsg$send(TOS_MsgPtr arg_0x1a5f5328);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static result_t FramerM$StdControl$init(void);static result_t FramerM$StdControl$start(void);static result_t FramerM$StdControl$stop(void);# 59 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\TokenReceiveMsg.nc"static result_t FramerM$TokenReceiveMsg$ReflectToken(uint8_t arg_0x1ab3ab90);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static TOS_MsgPtr FramerAckM$ReceiveMsg$receive(TOS_MsgPtr arg_0x1a5d4500);# 46 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\TokenReceiveMsg.nc"static TOS_MsgPtr FramerAckM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0x1ab3a190, uint8_t arg_0x1ab3a318);# 66 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\HPLUART.nc"static result_t UARTM$HPLUART$get(uint8_t arg_0x1abb0068);static result_t UARTM$HPLUART$putDone(void);# 34 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ByteComm.nc"static result_t UARTM$ByteComm$txByte(uint8_t arg_0x1ab350f8);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static result_t UARTM$Control$init(void);static result_t UARTM$Control$start(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -