sensor_matrix.h

Go to the documentation of this file.
00001 
00035 #ifndef SENSOR_MATRIX_H
00036 #define SENSOR_MATRIX_H
00037 
00038 
00049 #define MAXIMUM_XBEE_ID         0x10
00050 #define READING_UNKNOWN         0xFF
00051 
00057 //TODO: the order of member variables in this struct should be changed in case the compile packs the struct
00058 // In order to achieve the best packing, the variables should be listed in order of decreasing memory size.
00059 // Thus, pointers should be first, followed by int, followed by char.
00060 typedef struct
00061 {
00065         int numJoined;
00070         unsigned char matrix[MAXIMUM_XBEE_ID][MAXIMUM_XBEE_ID];
00075         unsigned char joined[MAXIMUM_XBEE_ID];
00076 } SensorMatrix;
00077 
00079 void sensor_matrix_create(void);
00081 void sensor_matrix_set_reading(int observer, int robot, int reading);
00083 int sensor_matrix_get_reading(int observer, int robot);
00085 void sensor_matrix_set_in_ring(int robot, int in);
00087 int sensor_matrix_get_in_ring(int robot);
00089 int sensor_matrix_get_joined(void);
00091 int sensor_matrix_get_size(void);
00092  //end defgroup
00094 
00095 
00096 #endif
00097 

Generated on Mon Apr 28 17:49:53 2008 for libwireless by  doxygen 1.5.3