|
MODBUS laajempi esimerkki
|
Header file for median.c. More...

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] |
Header file for median.c.
A more elaborated file description. Versions:
Original: eka
| #define NRO_OF_MEASUREMENTS 11 |
| #define PLACE_OF_MEDIAN 5 |
| void calculate_median | ( | Sensor_data * | sensor_data | ) |
This function calculates the medians of 11 values in an structure.
| sensor_data | Pointer to the structure that contains the measured data and the median variable. |


| void shift_arrays | ( | int | array[], |
| int | array2[] | ||
| ) |
This function shifts 2 arrays to the right by 1 and writes 0 to the first element.
| array | Array to be shifted. |
| array2 | Array to be shifted. |

| void swap | ( | int * | a, |
| int * | b | ||
| ) |
This function swaps values between variables.
| a | Pointer to the value witch will be swapped with b. |
| b | Pointer to the value witch will be swapped with a. |

| Sensor_data sensor_array[NRO_OF_SENSORS] |