Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Systems
ExternalSystem.h
Go to the documentation of this file.
1
#ifndef RENSSELAERMOTORSPORT_EXTERNAL_SYSTEM_H
2
#define RENSSELAERMOTORSPORT_EXTERNAL_SYSTEM_H
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <string.h>
7
8
#include "
System.h
"
9
#include "
CommsSystem.h
"
10
11
typedef
enum
{
12
BMS
,
13
ESC
,
14
IMD
15
}
ExternalType
;
16
17
typedef
struct
{
18
System
system
;
19
ExternalType
type
;
20
CommsSystem
*
comms
;
//What comms are we using to communicate with the external system? CAN, Ethernet, etc.
21
int (*check_heartbeat)(
void
* self);
// Check if the controller is still alive
22
}
ExternalSystem
;
23
32
void
initExternalSystem
(
ExternalSystem
* external,
const
char
* name,
int
hz,
33
ExternalType
type
);
34
35
#endif
// RENSSELAERMOTORSPORT_EXTERNAL_SYSTEM_H
CommsSystem.h
initExternalSystem
void initExternalSystem(ExternalSystem *external, const char *name, int hz, ExternalType type)
Definition:
ExternalSystem.c:3
ExternalType
ExternalType
Definition:
ExternalSystem.h:11
IMD
@ IMD
Definition:
ExternalSystem.h:14
BMS
@ BMS
Definition:
ExternalSystem.h:12
ESC
@ ESC
Definition:
ExternalSystem.h:13
System.h
type
type
Definition:
Updateable.h:17
CommsSystem
Definition:
CommsSystem.h:15
ExternalSystem
Definition:
ExternalSystem.h:17
ExternalSystem::system
System system
Definition:
ExternalSystem.h:18
ExternalSystem::type
ExternalType type
Definition:
ExternalSystem.h:19
ExternalSystem::comms
CommsSystem * comms
Definition:
ExternalSystem.h:20
System
Definition:
System.h:17
Generated by
1.9.5