MODBUS laajempi esimerkki
median.h File Reference

Header file for median.c. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Sensor_data
 

Macros

#define NRO_OF_MEASUREMENTS   11
 
#define PLACE_OF_MEDIAN   5
 

Functions

void calculate_median (Sensor_data *sensor_data)
 This function calculates the medians of 11 values in an structure. More...
 
void shift_arrays (int array[], int array2[])
 This function shifts 2 arrays to the right by 1 and writes 0 to the first element. More...
 
void swap (int *a, int *b)
 This function swaps values between variables. More...
 

Variables

Sensor_data sensor_array [NRO_OF_SENSORS]
 

Detailed Description

Header file for median.c.


Date
2010-01-05 15:24:34 +0200 (ti, 05 tammi 2010)

A more elaborated file description. Versions:

Revision
160

Original: eka

Macro Definition Documentation

#define NRO_OF_MEASUREMENTS   11
#define PLACE_OF_MEDIAN   5

Function Documentation

void calculate_median ( Sensor_data sensor_data)

This function calculates the medians of 11 values in an structure.


Parameters
sensor_dataPointer to the structure that contains the measured data and the median variable.

Here is the call graph for this function:

Here is the caller graph for this function:

void shift_arrays ( int  array[],
int  array2[] 
)

This function shifts 2 arrays to the right by 1 and writes 0 to the first element.


Parameters
arrayArray to be shifted.
array2Array to be shifted.

Here is the caller graph for this function:

void swap ( int *  a,
int *  b 
)

This function swaps values between variables.


Parameters
aPointer to the value witch will be swapped with b.
bPointer to the value witch will be swapped with a.

Here is the caller graph for this function:

Variable Documentation

Sensor_data sensor_array[NRO_OF_SENSORS]