Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Systems
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
10
typedef
enum
{
11
COMMS
,
// CAN, Ethernet, etc
12
EXTERNAL
,
// ESC, BMS, etc
13
MONITOR
,
// Torque Police, Traction Control, etc
14
CONTROLLER
// Torque Control, etc
15
}
SystemType
;
16
17
typedef
struct
{
18
Updateable
updateable
;
19
SystemType
type
;
20
void
*
child
;
21
}
System
;
22
31
void
initSystem
(
System
* system,
const
char
* name,
int
hz,
SystemType
type,
void
* child);
32
33
#endif
// RENSSELAERMOTORSPORT_SYSTEM_H
SystemType
SystemType
Definition:
System.h:10
CONTROLLER
@ CONTROLLER
Definition:
System.h:14
COMMS
@ COMMS
Definition:
System.h:11
EXTERNAL
@ EXTERNAL
Definition:
System.h:12
MONITOR
@ MONITOR
Definition:
System.h:13
initSystem
void initSystem(System *system, const char *name, int hz, SystemType type, void *child)
Initializes a System object.
Definition:
System.c:3
System
Definition:
System.h:17
System::updateable
Updateable updateable
Definition:
System.h:18
System::child
void * child
Definition:
System.h:20
System::type
SystemType type
Definition:
System.h:19
Updateable
Definition:
Updateable.h:23
Generated by
1.9.5