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

📄 app.c

📁 一种基于nesC的无线传感器网络应用程序,并提供了编译说明书,此文件就是编译后生成的二进制文件
💻 C
📖 第 1 页 / 共 5 页
字号:
void initializeSockets(void);static #line 152int acceptConnection(int servfd);static #line 168int createServerSocket(short port);static inline #line 225void waitForGuiConnection(void);static #line 245int printOtherTime(char *buf, int len, long long int ftime);static inline #line 262int printTime(char *buf, int len);static inline char *currentTime(void);static void addClient(int *clientSockets, int clifd);static inline #line 286void sendInitEvent(int clifd);static inline #line 305void *eventAcceptThreadFunc(void *arg);#line 339typedef struct __nesc_unnamed4285 {  GuiMsg *msg;  char *payLoad;} incoming_command_data_t;void nido_start_mote(uint16_t moteID);void nido_stop_mote(uint16_t moteID);TOS_MsgPtr NIDO_received_radio(TOS_MsgPtr packet);TOS_MsgPtr NIDO_received_uart(TOS_MsgPtr packet);static inline void set_link_prob_value(uint16_t moteID1, uint16_t moteID2, double prob);static inline void event_command_cleanup(event_t *event);static inline void event_command_in_handle(event_t *event, struct TOS_state *state);static inline void event_command_in_create(event_t *event, GuiMsg *msg, char *payLoad);static inline #line 382int processCommand(int clifd, int clidx, GuiMsg *msg, char *payLoad, unsigned char **replyMsg, int *replyLen);static inline #line 512void event_command_in_handle(event_t *event, struct TOS_state *state);static inline #line 583int readTossimCommand(int clifd, int clidx);static inline #line 679void *commandReadThreadFunc(void *arg);static #line 754int writeTossimEvent(void *data, int datalen, int clifd);static #line 785void buildTossimEvent(uint16_t moteID, uint16_t type, long long ftime, void *data, unsigned char **msgp, int *lenp);static #line 845void sendTossimEvent(uint16_t moteID, uint16_t type, long long ftime, void *data);# 32 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/tos.c"int signaled = 0;long long rate_checkpoint_time;double rate_value;struct timeval startTime;struct timeval thisTime;static inline void handle_signal(int sig);static inline #line 52void init_signals(void );static inline #line 72double get_rate_value(void);static inline void set_rate_value(double rate);static inline void rate_checkpoint(void);static inline void rate_based_wait(void);static inline # 48 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/adc_model.c"void random_adc_init(void);static inline uint16_t random_adc_read(int moteID, uint8_t port, long long ftime);static inline adc_model *create_random_adc_model(void);enum __nesc_unnamed4286 {  ADC_NUM_PORTS_PER_NODE = 256};uint16_t adcValues[TOSNODES][ADC_NUM_PORTS_PER_NODE];pthread_mutex_t adcValuesLock;static inline void generic_adc_init(void);static inline uint16_t generic_adc_read(int moteID, uint8_t port, long long ftime);static inline #line 99adc_model *create_generic_adc_model(void);static inline void set_adc_value(int moteID, uint8_t port, uint16_t value);# 49 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/spatial_model.c"point3D *points;static inline void simple_spatial_init(void);static inline #line 63void simple_spatial_get_position(int moteID, long long ftime, point3D *point);static inline spatial_model *create_simple_spatial_model(void);# 62 "/usr/include/cygwin/stat.h" 3struct stat {  dev_t st_dev;  ino_t st_ino;  mode_t st_mode;  nlink_t st_nlink;  uid_t st_uid;  gid_t st_gid;  dev_t st_rdev;  off_t st_size;  timestruc_t st_atim;  timestruc_t st_mtim;  timestruc_t st_ctim;  blksize_t st_blksize;  blkcnt_t st_blocks;  long st_spare4[2];};# 139 "/usr/include/sys/fcntl.h"struct flock {  short l_type;  short l_whence;  long l_start;  long l_len;  short l_pid;  short l_xxx;};struct eflock {  short l_type;  short l_whence;  long l_start;  long l_len;  short l_pid;  short l_xxx;  long l_rpid;  long l_rsys;};extern int open(const char *, int , ...);# 52 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/eeprom.c"static char *local_filename;static int numMotes = 0;static int moteSize = 0;static int initialized = 0;static int local_fd = -1;static int createEEPROM(char *file, int motes, int eempromBytes);static inline #line 91int anonymousEEPROM(int fnumMotes, int eepromSize);static inline #line 104int namedEEPROM(char *name, int fnumMotes, int eepromSize);# 59 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/sched.c"typedef struct __nesc_unnamed4287 {  void (*tp)(void);} TOSH_sched_entry_T;enum __nesc_unnamed4288 {  TOSH_MAX_TASKS = 8,   TOSH_TASK_BITMASK = TOSH_MAX_TASKS - 1};volatile TOSH_sched_entry_T TOSH_queue[TOSH_MAX_TASKS];uint8_t TOSH_sched_full;volatile uint8_t TOSH_sched_free;#line 102bool  TOS_post(void (*tp)(void));static #line 134bool TOSH_run_next_task(void);static inline # 149 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/tos.h"void *nmemcpy(void *to, const void *from, size_t n);# 28 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/Ident.h"enum __nesc_unnamed4289 {  IDENT_MAX_PROGRAM_NAME_LENGTH = 10};typedef struct __nesc_unnamed4290 {  uint32_t unix_time;  uint32_t user_hash;  char program_name[IDENT_MAX_PROGRAM_NAME_LENGTH];} Ident_t;# 33 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/PCRadio.h"typedef struct __nesc_unnamed4291 {  TOS_MsgPtr msg;  int success;} uart_send_done_data_t;enum __nesc_unnamed4292 {  UART_SEND_DELAY = 1600};static # 47 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/adjacency_list.c"link_t *allocate_link(int mote);static #line 78int adjacency_list_init(void);# 61 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/rfm_model.c"char transmitting[TOSNODES];int radio_active[TOSNODES];link_t *radio_connectivity[TOSNODES];pthread_mutex_t radioConnectivityLock;short radio_heard[TOSNODES];bool radio_idle_state[TOSNODES];double noise_prob = 0;short IDLE_STATE_MASK = 0xffff;char *lossyFileName = "lossy.nss";static inline bool simple_connected(int moteID1, int moteID2);static inline void simple_init(void);static inline void simple_transmit(int moteID, char bit);static inline void simple_stops_transmit(int moteID);static inline char simple_hears(int moteID);static inline #line 124link_t *simple_neighbors(int moteID);static inline rfm_model *create_simple_model(void);static #line 194void static_one_cell_init(void);static inline #line 313bool lossy_connected(int moteID1, int moteID2);static inline #line 336void lossy_transmit(int moteID, char bit);static inline #line 357void lossy_stop_transmit(int moteID);static inline #line 371char lossy_hears(int moteID);static inline #line 392int read_lossy_entry(FILE *file, int *mote_one, int *mote_two, double *loss);static inline #line 471void lossy_init(void);static inline #line 512link_t *lossy_neighbors(int moteID);static inline rfm_model *create_lossy_model(char *file);static inline #line 550void set_link_prob_value(uint16_t moteID1, uint16_t moteID2, double prob);# 57 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/packet_sim.c"int byteTransmitTime = 8 * 104 * 2;int backoffLow = 10 * (8 * 104);int backoffHigh = 20 * (8 * 104);int txChangeLatency = 30 * (8 * 104);int preambleLength = 20;int headerLength = 7;struct IncomingMsg;typedef struct IncomingMsg {  TOS_Msg msg;  struct IncomingMsg *next;} IncomingMsg;TOS_MsgPtr packet_transmitting[TOSNODES];IncomingMsg *incoming[TOSNODES];link_t *cc1000_connectivity[TOSNODES];static void event_backoff_create(event_t *event, int node, long long eventTime);void   event_backoff_handle(event_t *event, struct TOS_state *state);void   event_start_transmit_handle(event_t *event, struct TOS_state *state);static inline void event_start_transmit_create(event_t *event, int node, long long eventTime);void   event_receive_packet_create(event_t *event, int node, long long eventTime, IncomingMsg *msg);void   event_receive_packet_handle(event_t *event, struct TOS_state *state);void   event_send_packet_done_create(event_t *event, int node, long long eventTime);void   event_send_packet_done_handle(event_t *event, struct TOS_state *state);static inline void packet_sim_init(void);static #line 130void event_backoff_create(event_t *event, int node, long long eventTime);void   event_backoff_handle(event_t *event, struct TOS_state *state);static inline #line 155void event_start_transmit_create(event_t *event, int node, long long eventTime);static void corruptPacket(IncomingMsg *msg, int src, int dest);void   event_start_transmit_handle(event_t *event, struct TOS_state *state);#line 228void   event_receive_packet_create(event_t *event, int node, long long eventTime, IncomingMsg *msg);void   event_receive_packet_handle(event_t *event, struct TOS_state *state);#line 266void   event_send_packet_done_create(event_t *event, int node, long long eventTime);void   event_send_packet_done_handle(event_t *event, struct TOS_state *state);# 45 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/sensorboards/micasb/sensorboard.h"enum __nesc_unnamed4293 {  TOSH_ACTUAL_PHOTO_PORT = 1,   TOSH_ACTUAL_TEMP_PORT = 1,   TOSH_ACTUAL_MIC_PORT = 2,   TOSH_ACTUAL_ACCEL_X_PORT = 3,   TOSH_ACTUAL_ACCEL_Y_PORT = 4,   TOSH_ACTUAL_MAG_X_PORT = 6,   TOSH_ACTUAL_MAG_Y_PORT = 5};enum __nesc_unnamed4294 {  TOS_ADC_PHOTO_PORT = 1,   TOS_ADC_TEMP_PORT = 2,   TOS_ADC_MIC_PORT = 3,   TOS_ADC_ACCEL_X_PORT = 4,   TOS_ADC_ACCEL_Y_PORT = 5,   TOS_ADC_MAG_X_PORT = 6,   TOS_ADC_MAG_Y_PORT = 8};enum __nesc_unnamed4295 {  TOS_MAG_POT_ADDR = 0,   TOS_MIC_POT_ADDR = 1};# 39 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.h"enum __nesc_unnamed4296 {  TIMER_REPEAT = 0,   TIMER_ONE_SHOT = 1,   NUM_TIMERS = 1};# 34 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Clock.h"enum __nesc_unnamed4297 {  TOS_I1024PS = 0, TOS_S1024PS = 3,   TOS_I512PS = 1, TOS_S512PS = 3,   TOS_I256PS = 3, TOS_S256PS = 3,   TOS_I128PS = 7, TOS_S128PS = 3,   TOS_I64PS = 15, TOS_S64PS = 3,   TOS_I32PS = 31, TOS_S32PS = 3,   TOS_I16PS = 63, TOS_S16PS = 3,   TOS_I8PS = 127, TOS_S8PS = 3,   TOS_I4PS = 255, TOS_S4PS = 3,   TOS_I2PS = 15, TOS_S2PS = 7,   TOS_I1PS = 31, TOS_S1PS = 7,   TOS_I0PS = 0, TOS_S0PS = 0};enum __nesc_unnamed4298 {  DEFAULT_SCALE = 3, DEFAULT_INTERVAL = 255};static  TOS_MsgPtr Nido$UARTReceiveMsg$default$receive(TOS_MsgPtr arg_0xa61b910);static  result_t Nido$RadioSendMsg$default$sendDone(TOS_MsgPtr arg_0xa601420, result_t arg_0xa601570);static  TOS_MsgPtr Nido$RadioReceiveMsg$default$receive(TOS_MsgPtr arg_0xa61b910);static   void PowerStateM$PowerState$CPUCycleCheckpoint(void);static   result_t PowerStateM$PowerState$init(int arg_0xa6301b8, int arg_0xa630300);static   void PowerStateM$PowerState$redOff(void);static   void PowerStateM$PowerState$redOn(void);static   result_t PowerStateM$PowerState$stop(void);static   double PowerStateM$PowerState$get_mote_cycles(int arg_0xa613d88);static  result_t BlinkM$StdControl$init(void);static  result_t BlinkM$StdControl$start(void);static  result_t BlinkM$StdControl$stop(void);static  result_t BlinkM$Timer$fired(void);static   result_t TimerM$Clock$fire(void);static  result_t TimerM$StdControl$init(void);static  result_t TimerM$StdControl$start(void);static  result_t TimerM$StdControl$stop(void);static  result_t TimerM$Timer$default$fired(uint8_t arg_0xa6e8030);static  result_t TimerM$Timer$start(uint8_t arg_0xa6e8030, char arg_0xa6f7ed8, uint32_t arg_0xa6d2060);static  result_t TimerM$Timer$stop(uint8_t arg_0xa6e8030);static   void HPLClock$Clock$setInterval(uint8_t arg_0xa701910);static   uint8_t HPLClock$Clock$readCounter(void);static   result_t HPLClock$Clock$setRate(char arg_0xa700e10, char arg_0xa700f50);static   uint8_t HPLClock$Clock$getInterval(void);static   uint8_t HPLPowerManagementM$PowerManagement$adjustPower(void);static   result_t LedsM$Leds$init(void);static   result_t LedsM$Leds$redOff(void);static   result_t LedsM$Leds$redToggle(void);static   result_t LedsM$Leds$redOn(void);static  # 75 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"TOS_MsgPtr Nido$UARTReceiveMsg$receive(TOS_MsgPtr arg_0xa61b910);static   # 22 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/PowerState.nc"void Nido$PowerState$CPUCycleCheckpoint(void);static   #line 14result_t Nido$PowerState$init(int arg_0xa6301b8, int arg_0xa630300);static   result_t Nido$PowerState$stop(void);static  # 67 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc"result_t Nido$RadioSendMsg$sendDone(TOS_MsgPtr arg_0xa601420, result_t arg_0xa601570);static  # 75 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"TOS_MsgPtr Nido$RadioReceiveMsg$receive(TOS_MsgPtr arg_0xa61b910);static  # 63 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"result_t Nido$StdControl$init(void);static  result_t Nido$StdControl$start(void);static  result_t Nido$StdControl$stop(void);static inline # 74 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/Nido.nc"void Nido$usage(char *progname);static void Nido$help(char *progname);#line 107void   event_boot_handle(event_t *fevent, struct TOS_state *fstate);#line 122int   main(int argc, char **argv);#line 387void   nido_start_mote(uint16_t moteID);#line 402void   nido_stop_mote(uint16_t moteID);#line 416TOS_MsgPtr   NIDO_received_radio(TOS_MsgPtr packet);static inline   TOS_MsgPtr Nido$RadioReceiveMsg$default$receive(TOS_MsgPtr msg);TOS_MsgPtr   NIDO_received_uart(TOS_MsgPtr packet);static inline   TOS_MsgPtr Nido$UARTReceiveMsg$default$receive(TOS_MsgPtr msg);static inline   result_t Nido$RadioSendMsg$default$sendDone(TOS_MsgPtr msg, result_t success);void   packet_sim_transmit_done(TOS_MsgPtr msg);void   packet_sim_receive_msg(TOS_MsgPtr msg);void   set_sim_rate(uint32_t rate);uint32_t   get_sim_rate(void);static inline # 20 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/pc/PowerStateM.nc"int PowerStateM$num_bbs(void);static inline void PowerStateM$dump_power_details(void);static inline   result_t PowerStateM$PowerState$init(int prof, int cpu_prof);static inline   #line 54result_t PowerStateM$PowerState$stop(void);static inline   #line 130void PowerStateM$PowerState$redOn(void);static inline   

⌨️ 快捷键说明

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