Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
System.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_SYSTEM_H
2#define RENSSELAERMOTORSPORT_SYSTEM_H
3
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7
8#include "../Utils/Updateable.h"
9
10typedef enum {
11 COMMS, // CAN, Ethernet, etc
12 EXTERNAL, // ESC, BMS, etc
13 MONITOR, // Torque Police, Traction Control, etc
14 CONTROLLER // Torque Control, etc
16
17typedef struct {
20 void* child;
21} System;
22
31void initSystem(System* system, const char* name, int hz, SystemType type, void* child);
32
33#endif // RENSSELAERMOTORSPORT_SYSTEM_H
SystemType
Definition: System.h:10
@ CONTROLLER
Definition: System.h:14
@ COMMS
Definition: System.h:11
@ EXTERNAL
Definition: System.h:12
@ MONITOR
Definition: System.h:13
void initSystem(System *system, const char *name, int hz, SystemType type, void *child)
Initializes a System object.
Definition: System.c:3
Definition: System.h:17
Updateable updateable
Definition: System.h:18
void * child
Definition: System.h:20
SystemType type
Definition: System.h:19