LO53 PROJECT - AP DOCUMENTATION
Project based on Indoor Positionning System
|
This file contain the diffeerent functions necessay for the management of the linked-lists used by the program. More...
#include "rssi_list.h"
Functions | |
void | add_value (Deque *list, double value) |
add_value adds a new RSSI value at the end of the deque. More... | |
Element * | add_element (Element **list, u_char *mac_value) |
add_element adds an element (a new device node) to the list. Elements shall be ordered. More... | |
unsigned int | mac_maching (u_char *mac1, u_char *mac2) |
This function makes the comparison of two mac addresses to check if they are equals. More... | |
Element * | find_mac (Element *list, u_char *mac_value) |
find_mac looks up for a MAC address in the list. More... | |
Element * | find_deque (Element *list, Deque *deq) |
This function find a specific Deque in the Element List. More... | |
void | calculate_avg (Element **list, u_char *mac_value, u_char *nb_samples, u_char *avg_value) |
Calculate avg ss values from a given string mac address. More... | |
void | clear_outdated_values (Deque *list) |
clear_outdated_values removes all outdated RSSI in a RSSI deque. More... | |
void | clear_outdated_Elements (Element **list) |
clear_outdated_Elements removes all outdated Elements in the linked-list. More... | |
void | decrement_all_deadlines (Element *list) |
This function decrement every second the deadline value of all the samples included in an element list. More... | |
This file contain the diffeerent functions necessay for the management of the linked-lists used by the program.
This header file belongs to the rssi_list.c file.
This file contain the diffeerent functions necessay for the management of the linked-lists used by the program It contain many important functions such as add_deque, add_element, find_mac, calculate_avg, and some others..
It describes the prototypes of the functions used in rssi_list.c
add_element adds an element (a new device node) to the list. Elements shall be ordered.
list | a pointer to the list head pointer. |
mac_value | the MAC address of the new node to be added. |
void add_value | ( | Deque * | list, |
double | value | ||
) |
add_value adds a new RSSI value at the end of the deque.
the | deque to append the element to. |
value | the RSSI value (dBm, do not forget to convert when inserting!) |
void calculate_avg | ( | Element ** | list, |
u_char * | mac_value, | ||
u_char * | nb_samples, | ||
u_char * | avg_value | ||
) |
Calculate avg ss values from a given string mac address.
mac_value | the string MAC address necessary to identify the device to which calculation is needed. |
list | a pointer to the list head pointer. |
nb_samples | is a pointer that will contain the number of sample we need to know. |
avg_value | is a pointer that will contain the average rssi_value based on the captured samples. |
void clear_outdated_Elements | ( | Element ** | list | ) |
clear_outdated_Elements removes all outdated Elements in the linked-list.
list | the Element (devices) list in which the outdated devices need to be removed |
void clear_outdated_values | ( | Deque * | list | ) |
clear_outdated_values removes all outdated RSSI in a RSSI deque.
list | the deque from which to filter the outdated values. |
void decrement_all_deadlines | ( | Element * | list | ) |
This function decrement every second the deadline value of all the samples included in an element list.
list | The Element list head pointer |
find_mac looks up for a MAC address in the list.
list | the list head pointer. |
mac_value | the MAC address to search. |
unsigned int mac_maching | ( | u_char * | mac1, |
u_char * | mac2 | ||
) |
This function makes the comparison of two mac addresses to check if they are equals.
mac1 | the first string mac address |
mac2 | the second string mac address |