Code Search for Developers
 
 
  

resquery.h from EmStar at Krugle


Show resquery.h syntax highlighted

#ifndef _RESQUERY_H_
#define _RESQUERY_H_


#define RESDISC_QUERY     2


#define RESQ_REQUEST    1
#define RESQ_REPLY      2


#define EXISTS  1
#define SENSOR  2
#define AREA    3


#define RESQ_SUCCESS        0 

#define ERESQ_INVALID_QUERY  -1
#define ERESQ_NOT_FOUND      -2 

#define ALL 0

#define R_EQ  1
#define R_LT  2
#define R_LE  3
#define R_GT  4
#define R_GE  5



typedef struct _rq_pkt_hdr {
    int64_t tid;           // set by the CLIENT
    int type;
    char data[0];
} rq_pkt_hdr_t;

// the attribute-value-op struct used in the requests
typedef struct _rq_av {
    int32_t attribute;
    int32_t value;
    int32_t op;
} rq_av_t;


typedef struct _rq_req_pkt {
    rq_av_t request;
} rq_req_pkt_t;

typedef struct _rd_node {
    node_id_t node_id;
    node_id_t authoritative;
} rd_node_t;


typedef struct _rq_rply_pkt {
    rq_av_t request;
    int retcode;                // return code for the query
    node_id_t authoritative;    // non-zero indicates NOT AUTHORITATIVE
                                // also indicates id of auth microserver
    int32_t num_nodes;          // number of nodes matching request
    rd_node_t nodelist[0];      // 0-length list to be populated by the
                                // reply pkt
} rq_rply_pkt_t;


typedef struct _resdisc_status_output {
    node_id_t node_id;
    uint16_t mote_id;
    int auth;
    node_id_t auth_id;
    int seq;
    loc_t location;
    int64_t last_reg_time;
    int64_t reg_proto_latency;
    int64_t ssync_latency;      // if not authoritative
} rd_status_output_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

  camctrl.h
  centroute.h
  dsr.h
  resquery.h