batterywatcher.h File Reference

This file contains definitions needed to use the battery watcher functions. More...

#include <pthread.h>
#include <ncurses.h>
#include "guardmodes.h"
#include "config.h"

Include dependency graph for batterywatcher.h:

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

Go to the source code of this file.

Data Structures

struct  batteryWatcherArgs
 Structure for thread's arguments. More...

Defines

#define BATT_MEASURE_INTERVAL   60
 Inverval between two subsequent status messages on normal power.
#define BATT_MEASURE_INTERVAL_LOW_POWER   20
 Interval between to subsequent status messages on low power (below BATT_LOW_CAPACITY_TRESH).
#define BATT_LOW_CAPACITY_TRESH   8.0
 If battery's capacity sinks below this value (with respect to the used unit), show an extra warning.
#define BATT_MEASURE_VOLTAGE   0
 Constant describing the kind of information we retrieve from the robot.
#define BATT_MEASURE_CURRENT   1
 Constant describing the kind of information we retrieve from the robot.
#define BATT_MEASURE_AVG_CURRENT   2
 Constant describing the kind of information we retrieve from the robot.
#define BATT_MEASURE_ABS_CAPACITY   3
 Constant describing the kind of information we retrieve from the robot.
#define BATT_MEASURE_TEMP   4
 Constant describing the kind of information we retrieve from the robot.
#define BATT_MEASURE_REL_CAPACITY   5
 Constant describing the kind of information we retrieve from the robot.

Functions

void * batteryWatcher (void *arg)
 This thread watches the battery status and shows its staus periodicaly.


Detailed Description

This file contains definitions needed to use the battery watcher functions.

Version:
Id
batterywatcher.h,v 1.10 2008/09/18 12:59:01 prokop Exp

Definition in file batterywatcher.h.


Define Documentation

#define BATT_LOW_CAPACITY_TRESH   8.0

If battery's capacity sinks below this value (with respect to the used unit), show an extra warning.

Definition at line 57 of file batterywatcher.h.

#define BATT_MEASURE_ABS_CAPACITY   3

Constant describing the kind of information we retrieve from the robot.

Definition at line 42 of file batterywatcher.h.

#define BATT_MEASURE_AVG_CURRENT   2

Constant describing the kind of information we retrieve from the robot.

Definition at line 41 of file batterywatcher.h.

#define BATT_MEASURE_CURRENT   1

Constant describing the kind of information we retrieve from the robot.

Definition at line 40 of file batterywatcher.h.

#define BATT_MEASURE_INTERVAL   60

Inverval between two subsequent status messages on normal power.

Definition at line 48 of file batterywatcher.h.

#define BATT_MEASURE_INTERVAL_LOW_POWER   20

Interval between to subsequent status messages on low power (below BATT_LOW_CAPACITY_TRESH).

Definition at line 52 of file batterywatcher.h.

#define BATT_MEASURE_REL_CAPACITY   5

Constant describing the kind of information we retrieve from the robot.

Definition at line 44 of file batterywatcher.h.

#define BATT_MEASURE_TEMP   4

Constant describing the kind of information we retrieve from the robot.

Definition at line 43 of file batterywatcher.h.

#define BATT_MEASURE_VOLTAGE   0

Constant describing the kind of information we retrieve from the robot.

Definition at line 39 of file batterywatcher.h.


Function Documentation

void* batteryWatcher ( void *  arg  ) 

This thread watches the battery status and shows its staus periodicaly.

Additionally it shows a warning if the battery's power goes below a predefined value.

Parameters:
arg Arguments for this thread, see batteryWatcherArgs.
Returns:
Nothing.

Definition at line 112 of file batterywatcher.c.


Generated on Sun Sep 28 21:20:01 2008 for Guard by  doxygen 1.5.6