|
Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include <stdint.h>#include <stdbool.h>

Go to the source code of this file.
Classes | |
| struct | UnitDefinition |
Enumerations | |
| enum | UnitDataType { UNIT_TYPE_FLOAT , UNIT_TYPE_INT16 , UNIT_TYPE_INT32 , UNIT_TYPE_UINT16 , UNIT_TYPE_UINT32 , UNIT_TYPE_BOOL , UNIT_TYPE_ENUM } |
| enum | UnitCategory { UNIT_CATEGORY_VOLTAGE , UNIT_CATEGORY_CURRENT , UNIT_CATEGORY_PRESSURE , UNIT_CATEGORY_TEMPERATURE , UNIT_CATEGORY_POSITION , UNIT_CATEGORY_SPEED , UNIT_CATEGORY_TIME , UNIT_CATEGORY_FREQUENCY , UNIT_CATEGORY_DIMENSIONLESS , UNIT_CATEGORY_STATUS } |
| enum | UnitId { UNIT_VOLTS = 0 , UNIT_MILLIVOLTS , UNIT_AMPERES , UNIT_MILLIAMPERES , UNIT_PSI , UNIT_BAR , UNIT_PASCAL , UNIT_CELSIUS , UNIT_FAHRENHEIT , UNIT_KELVIN , UNIT_PERCENT , UNIT_DEGREES , UNIT_RADIANS , UNIT_RPM , UNIT_HZ , UNIT_KMH , UNIT_MPH , UNIT_MS , UNIT_SECONDS , UNIT_MILLISECONDS , UNIT_MICROSECONDS , UNIT_BOOLEAN , UNIT_ENUM , UNIT_PERCENTAGE , UNIT_DIMENSIONLESS , UNIT_COUNT } |
Functions | |
| const UnitDefinition * | getUnitDefinition (UnitId unit_id) |
| UnitId | getUnitIdBySymbol (const char *symbol) |
| bool | validateUnitValue (UnitId unit_id, float value) |
| float | convertUnits (float value, UnitId from_unit, UnitId to_unit) |
| void | initUnits (void) |
| enum UnitCategory |
Definition at line 17 of file Units.h.
| enum UnitDataType |
| Enumerator | |
|---|---|
| UNIT_TYPE_FLOAT | |
| UNIT_TYPE_INT16 | |
| UNIT_TYPE_INT32 | |
| UNIT_TYPE_UINT16 | |
| UNIT_TYPE_UINT32 | |
| UNIT_TYPE_BOOL | |
| UNIT_TYPE_ENUM | |
Definition at line 7 of file Units.h.
| enum UnitId |
Definition at line 44 of file Units.h.
Definition at line 99 of file Units.c.

| const UnitDefinition * getUnitDefinition | ( | UnitId | unit_id | ) |
| UnitId getUnitIdBySymbol | ( | const char * | symbol | ) |
| void initUnits | ( | void | ) |
Definition at line 74 of file Units.c.

