Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Systems
MonitorSystem.h
Go to the documentation of this file.
1
#ifndef RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
2
#define RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <string.h>
7
8
#include "
System.h
"
9
10
typedef
enum
{
11
m_TORQUE
,
12
m_APPS
,
13
m_TRACTION
,
14
m_ACCUMULATOR
15
}
MonitorType
;
16
17
typedef
enum
{
18
NONE
,
// If a fault is detected, do nothing
19
SYSTEM_ADJUST
,
// If a fault is detected, adjust the system
20
SYSTEM_DISABLE
,
// If a fault is detected, disable the system, and adjust the vehicle
21
VEHICLE_SHUTDOWN
// If a fault is detected, shut down the vehicle
22
}
FaultType
;
23
24
typedef
struct
{
25
System
system
;
26
MonitorType
type
;
27
FaultType
fault
;
28
}
MonitorSystem
;
29
39
void
initMonitorSystem
(
MonitorSystem
* monitor,
const
char
* name,
int
hz,
40
MonitorType
type
,
FaultType
fault);
41
42
#endif
// RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
initMonitorSystem
void initMonitorSystem(MonitorSystem *monitor, const char *name, int hz, MonitorType type, FaultType fault)
Initializes the Monitor System with initial settings.
Definition:
MonitorSystem.c:3
MonitorType
MonitorType
Definition:
MonitorSystem.h:10
m_APPS
@ m_APPS
Definition:
MonitorSystem.h:12
m_ACCUMULATOR
@ m_ACCUMULATOR
Definition:
MonitorSystem.h:14
m_TRACTION
@ m_TRACTION
Definition:
MonitorSystem.h:13
m_TORQUE
@ m_TORQUE
Definition:
MonitorSystem.h:11
FaultType
FaultType
Definition:
MonitorSystem.h:17
VEHICLE_SHUTDOWN
@ VEHICLE_SHUTDOWN
Definition:
MonitorSystem.h:21
SYSTEM_ADJUST
@ SYSTEM_ADJUST
Definition:
MonitorSystem.h:19
SYSTEM_DISABLE
@ SYSTEM_DISABLE
Definition:
MonitorSystem.h:20
NONE
@ NONE
Definition:
MonitorSystem.h:18
System.h
type
type
Definition:
Updateable.h:17
MonitorSystem
Definition:
MonitorSystem.h:24
MonitorSystem::type
MonitorType type
Definition:
MonitorSystem.h:26
MonitorSystem::fault
FaultType fault
Definition:
MonitorSystem.h:27
MonitorSystem::system
System system
Definition:
MonitorSystem.h:25
System
Definition:
System.h:17
Generated by
1.9.5