MODBUS laajempi esimerkki
median.c File Reference

Median calculation from Sensor readings. More...

#include "kosteus.h"
Include dependency graph for median.c:

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...
 

Detailed Description

Median calculation from Sensor readings.


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

Versions:

Revision
160

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: