#include <stdint.h>
#include "../ExternalSystem.h"
#include "../Inc/Systems/Comms/Can/DBCParser.h"
Go to the source code of this file.
◆ BmsChargeStatus
Enumerator |
---|
DISCHARGING | |
CHARGING | |
IDLE | |
Definition at line 9 of file BMS.h.
◆ initBms()
void initBms |
( |
Bms * |
bms, |
|
|
int |
hz, |
|
|
const char * |
dbcFn |
|
) |
| |
Initializes the BMS with the given frequency.
- Parameters
-
bms | Pointer to the Bms structure to initialize. |
hz | The frequency in Hertz at which the BMS operates. |
dbcFn | The filename of the dbc file to use to interpret the can data. |
Definition at line 7 of file BMS.c.
7 {
8 if (bms == NULL) return;
9
11
24}
int updateBms(Updateable *updateable)
Transfers raw BMS data to a BmsData structure.
void initExternalSystem(ExternalSystem *external, const char *name, int hz, ExternalType type, int(*updateExternal)(ExternalSystem *external), int(*check_heartbeat)(void *self), void *child)
BmsChargeStatus chargeStatus
float remainingPackCapacity
int(* update)(struct Updateable *self)
◆ updateBms()
Transfers raw BMS data to a BmsData structure.
- Parameters
-
rawData | Pointer to the array of raw data. |
- Returns
- The converted BmsData structure.
Updates the BMS data.
- Parameters
-
updateable | Pointer to the Updateable structure to update. |
- Returns
- int _SUCCESS or _FAILURE.
Definition at line 83 of file BMS.c.
83 {
84
85 printf("BMS Update Not implemented\n");
86
87
88
89
90
91
92
94}
◆ updateBmsTest()
void updateBmsTest |
( |
void * |
bms, |
|
|
const char * |
canDataFn |
|
) |
| |
Updates the BMS data.
- Warning
- For testing and debugging use only
- Parameters
-
bms | Pointer to the Bms structure to update. |
canDataFn | Name of file containing can data. |
Definition at line 97 of file BMS.c.
97 {
98
99
100
101
102
103
104
105
106}