Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
System.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../Utils/Updateable.h"
Include dependency graph for System.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  System
 

Enumerations

enum  SystemType { COMMS , EXTERNAL , MONITOR , CONTROLLER }
 

Functions

void initSystem (System *system, const char *name, int hz, SystemType type)
 Initializes a System object. More...
 

Enumeration Type Documentation

◆ SystemType

enum SystemType
Enumerator
COMMS 
EXTERNAL 
MONITOR 
CONTROLLER 

Definition at line 10 of file System.h.

10 {
11 COMMS, // CAN, Ethernet, etc
12 EXTERNAL, // ESC, BMS, etc
13 MONITOR, // Torque Police, Traction Control, etc
14 CONTROLLER // Torque Control, etc
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

Function Documentation

◆ initSystem()

void initSystem ( System system,
const char *  name,
int  hz,
SystemType  type 
)

Initializes a System object.

Parameters
systemPointer to the System to initialize.
nameName of the system.
hzFrequency in Hertz.
typeType of the system.

Definition at line 3 of file System.c.

3 {
4 initUpdateable(&system->updateable, name, hz);
5 system->type = type;
6}
type
Definition: Updateable.h:17
void initUpdateable(Updateable *updateable, const char *name, int hz)
Definition: Updateable.c:6
Updateable updateable
Definition: System.h:18
SystemType type
Definition: System.h:19
Here is the call graph for this function:
Here is the caller graph for this function: