/home/tai/chorist/xian-1.2/src/include/usei-functions.h File Reference

Go to the source code of this file.

Data Structures

struct  qos_metric_measurement

Defines

#define LINK_RSSI_ADD   101
#define LINK_AVG_DELTA_OCCUPANCY_ADD   102
#define LINK_AVG_DELTA_OCCUPANCY_MAX   103
#define LINK_FAILURE_RATE_MAX   104
#define LINK_FAILURE_RATE_MUL   105
#define LINK_AVG_RSSI   106

Functions

void print_error (unsigned int error_type)
 This function allows to print an error message matching a code error.
struct
qos_metric_measurement 
get_qos_metric (unsigned int type, char *macaddr, char *dev_name, unsigned int *code_err)
 This function allows to get a QOS Link Metric.
unsigned int metrics_operation (struct qos_metric_measurement qos_metric_1, struct qos_metric_measurement qos_metric_2, struct qos_metric_measurement *qos_metric_result)
 This function allows to do an operation between 2 QOS Link Metrics of the same type.
unsigned int is_relevant_metric (struct qos_metric_measurement qos_metric_new, struct qos_metric_measurement qos_metric_old)
 This function allows to identify if a new QOS Metric Link is revelant or not.


Define Documentation

#define LINK_RSSI_ADD   101

Definition at line 43 of file usei-functions.h.

Referenced by get_qos_metric(), is_relevant_metric(), and metrics_operation().

#define LINK_AVG_DELTA_OCCUPANCY_ADD   102

Definition at line 44 of file usei-functions.h.

Referenced by get_qos_metric(), is_relevant_metric(), and metrics_operation().

#define LINK_AVG_DELTA_OCCUPANCY_MAX   103

Definition at line 45 of file usei-functions.h.

Referenced by get_qos_metric(), is_relevant_metric(), and metrics_operation().

#define LINK_FAILURE_RATE_MAX   104

Definition at line 46 of file usei-functions.h.

Referenced by get_qos_metric(), is_relevant_metric(), and metrics_operation().

#define LINK_FAILURE_RATE_MUL   105

Definition at line 47 of file usei-functions.h.

Referenced by get_qos_metric(), is_relevant_metric(), and metrics_operation().

#define LINK_AVG_RSSI   106

Definition at line 48 of file usei-functions.h.

Referenced by get_qos_metric(), is_relevant_metric(), and metrics_operation().


Function Documentation

void print_error ( unsigned int  error_type  ) 

This function allows to print an error message matching a code error.

Parameters:
error_type code error
Returns:
-

Definition at line 42 of file usei-functions.c.

struct qos_metric_measurement get_qos_metric ( unsigned int  type,
char *  macaddr,
char *  dev_name,
unsigned int *  code_err 
) [read]

This function allows to get a QOS Link Metric.

Parameters:
type (a number) of the metric
macaddr MAC Address of a specified node formatted as follow XX:XX:XX:XX:XX:XX
dev_name name of the network interface
code_err output a code error if an error occurs.
Returns:
qos_metric_measurement the metric formated in qos_metric_measurement structure

Definition at line 97 of file usei-functions.c.

unsigned int metrics_operation ( struct qos_metric_measurement  qos_metric_1,
struct qos_metric_measurement  qos_metric_2,
struct qos_metric_measurement qos_metric_result 
)

This function allows to do an operation between 2 QOS Link Metrics of the same type.

Parameters:
qos_metric_1 
qos_metric_2 
qos_metric_result result of the operation
Returns:
int 0 if an error occured (metrics aren't in same type), 1 otherwise

Definition at line 175 of file usei-functions.c.

unsigned int is_relevant_metric ( struct qos_metric_measurement  qos_metric_new,
struct qos_metric_measurement  qos_metric_old 
)

This function allows to identify if a new QOS Metric Link is revelant or not.

Parameters:
qos_metric_new new QOS Metric Link
qos_metric_old old QOS Metric Link
Returns:
-

int 1 if the new QOS Metric Link is revelant, 0 otherwise

Definition at line 253 of file usei-functions.c.


Generated on Mon Jan 21 12:31:47 2008 for XIAN by  doxygen 1.5.3