Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
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
10typedef enum {
16 m_RTD
18
19typedef enum {
20 NONE, // If a fault is detected, do nothing
21 SYSTEM_ADJUST, // If a fault is detected, adjust the system
22 SYSTEM_DISABLE, // If a fault is detected, disable the system, and adjust the vehicle
23 VEHICLE_SHUTDOWN // If a fault is detected, shut down the vehicle
25
26typedef struct {
30 int (*runMonitor)(void* self);
32
42void initMonitorSystem(MonitorSystem* monitor, const char* name, int hz,
43 MonitorType type, FaultType fault, int (*runMonitor)(void* self));
44
45#endif // RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
void initMonitorSystem(MonitorSystem *monitor, const char *name, int hz, MonitorType type, FaultType fault, int(*runMonitor)(void *self))
Initializes the Monitor System with initial settings.
Definition: MonitorSystem.c:3
MonitorType
Definition: MonitorSystem.h:10
@ m_RTD
Definition: MonitorSystem.h:16
@ m_APPS
Definition: MonitorSystem.h:12
@ m_ACCUMULATOR
Definition: MonitorSystem.h:15
@ m_BRAKES
Definition: MonitorSystem.h:13
@ m_TRACTION
Definition: MonitorSystem.h:14
@ m_TORQUE
Definition: MonitorSystem.h:11
FaultType
Definition: MonitorSystem.h:19
@ VEHICLE_SHUTDOWN
Definition: MonitorSystem.h:23
@ SYSTEM_ADJUST
Definition: MonitorSystem.h:21
@ SYSTEM_DISABLE
Definition: MonitorSystem.h:22
@ NONE
Definition: MonitorSystem.h:20
MonitorType type
Definition: MonitorSystem.h:28
FaultType fault
Definition: MonitorSystem.h:29
Definition: System.h:17