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

Go to the source code of this file.

Classes

struct  CommsSystem
 

Enumerations

enum  CommsType { CAN , ETHERNET }
 

Functions

void initCommsSystem (CommsSystem *comms, const char *name, int hz, CommsType type)
 Initializes the Comms System with initial settings. More...
 

Enumeration Type Documentation

◆ CommsType

enum CommsType
Enumerator
CAN 
ETHERNET 

Definition at line 10 of file CommsSystem.h.

10 {
11 CAN,
13} CommsType;
CommsType
Definition: CommsSystem.h:10
@ CAN
Definition: CommsSystem.h:11
@ ETHERNET
Definition: CommsSystem.h:12

Function Documentation

◆ initCommsSystem()

void initCommsSystem ( CommsSystem comms,
const char *  name,
int  hz,
CommsType  type 
)

Initializes the Comms System with initial settings.

Parameters
commsA pointer to the CommsSystem structure.
nameThe name of the comms system.
hzRate at which the comms system is called (in hz).
typeThe type of comms system (per CommsType).

Definition at line 3 of file CommsSystem.c.

3 {
4 initSystem(&comms->system, name, hz, COMMS);
5 comms->type = type;
6 comms->check_heartbeat = NULL;
7}
void initSystem(System *system, const char *name, int hz, SystemType type)
Initializes a System object.
Definition: System.c:3
@ COMMS
Definition: System.h:11
type
Definition: Updateable.h:17
CommsType type
Definition: CommsSystem.h:17
int(* check_heartbeat)(void *self)
Definition: CommsSystem.h:18
System system
Definition: CommsSystem.h:16
Here is the call graph for this function: