@ -110,26 +110,30 @@ typedef struct _owl_timestamp owl_timestamp ;
/**
* Message sent by the Listener to the Aggregator for each captured
* request .
*
* TODO : This structure ' s size could be reduced from 60 to 52 byte by reordering
* the fields by size .
*/
struct _owl_captured_request
{
uint8_t type ; ///< Type of the captured request
// 1 byte alignment
unsigned char __pad0 ; // 1 byte alignment
uint16_t nb_packets ; ///< Number of packets for this request
uint16_t packet_id ; ///< Number of the current packet
uint8_t cp_mac_addr_bytes [ ETHER_ADDR_LEN ] ; ///< MAC of the listener
uint8_t mobile_mac_addr_bytes [ ETHER_ADDR_LEN ] ; ///< MAC of the mobile
uint8_t mobile_ip_addr_bytes [ 4 ] ; ///< IP of the mobile
// 2 bytes alignment
unsigned char __pad1 [ 2 ] ; // 2 bytes alignment
owl_timestamp request_time ; ///< Timestamp on the mobile
owl_timestamp capture_time ; ///< Timestamp of arrival on the listener
int8_t ss_dbm ; ///< Signal strength measured by the listener (dBm)
// 3 bytes alignment
unsigned char __pad2 [ 3 ] ; // 3 bytes alignment
/* Calibration data */
float x_position ; ///< X coordinate
float y_position ; ///< Y coordinate
float z_position ; ///< Z coordinate
owl_direction direction ; ///< Orientation of the mobile
unsigned char __pad3 [ 3 ] ; // 3 bytes alignment
} ;
/// Captured request type
typedef struct _owl_captured_request owl_captured_request ;
@ -139,20 +143,27 @@ typedef struct _owl_captured_request owl_captured_request ;
/**
* Message sent by the Aggregator to the Positioner containing
* the main data of a request .
*
* TODO : This structure ' s size could be reduced from 44 to 36 bytes by
* reordering the fields by size .
*/
struct _owl_request
{
uint8_t type ; ///< Type of the request
unsigned char __pad0 ; // 1 byte alignment
uint16_t nb_packets ; ///< Number of packets sent for this request
uint8_t mobile_mac_addr_bytes [ ETHER_ADDR_LEN ] ; ///< MAC of the mobile
uint8_t mobile_ip_addr_bytes [ 4 ] ; ///< IP of the mobile
unsigned char __pad1 [ 2 ] ; // 2 bytes alignment
owl_timestamp request_time ; ///< Timestamp on the mobile
uint16_t nb_info ; ///< Number of owl_request_info
unsigned char __pad2 [ 2 ] ; // 2 bytes alignment
/* Calibration data */
float x_position ; ///< X coordinate
float y_position ; ///< Y coordinate
float z_position ; ///< Z coordinate
owl_direction direction ; ///< Orientation of the mobile
unsigned char __pad3 [ 3 ] ; // 3 bytes alignment
} ;
/// Aggregated request type
typedef struct _owl_request owl_request ;
@ -170,6 +181,7 @@ struct _owl_request_info
uint8_t cp_mac_addr_bytes [ ETHER_ADDR_LEN ] ; ///< MAC of the listener
owl_timestamp capture_time ; ///< Timestamp of arrival on the listener
int8_t ss_dbm ; ///< Signal strength measured by the listener (dBm)
unsigned char __pad0 [ 3 ] ; // 3 bytes alignment
} ;
/// Aggregated request information type
typedef struct _owl_request_info owl_request_info ;