Code Search for Developers
 
 
  

send_dump.h from EmStar at Krugle


Show send_dump.h syntax highlighted

#include "msr_misc.h"

#ifndef _CTRL_I_H_
#define _CTRL_I_H_

#ifndef MAX_NUM_NODES
#define MAX_NUM_NODES   20
#endif


typedef struct _ctrl_state ctrl_state_t;

// struct for each node
typedef struct _node_element {
    ctrl_state_t *ctrl_ref;         // backwards reference
    int id;
    lu_context_t *link;
    pd_client_context_t *errors;
    char *link_name;
    int good_pkts_rcvd;
    int bad_pkts_rcvd;
    // the following are sender-specific and perhaps should have their own
    // sub-struct
    link_pkt_t *outbound_pkt;       // pointer to pending packet
    g_event_t *receipt_timer_ev;    // receipt timer reference. One per sender 
    int pkt_len;                    // this is the length WITHOUT the link
                                    // header
    uint32_t seqno;
    uint16_t crc;
} node_element_t;



// global container struct
struct _ctrl_state {
    int num_nodes;
    node_element_t *node_element[MAX_NUM_NODES];
    g_event_t *send_timer_ev;   // ONE timer for ALL senders
};


// packet format
typedef struct _pkt_payload {
    char data[MAX_DATA_LEN];
} pkt_payload_t;



#endif




See more files for this project here

EmStar

EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.

Project homepage: http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other

  msr_misc.h
  send_dump.c
  send_dump.h