#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "System.h"
#include "MonitorSystem.h"
Go to the source code of this file.
◆ MAX_MONITORS
◆ ControllerType
◆ defaultAddMonitor()
Adds a monitor to the controller.
- Parameters
-
- Returns
- SUCCESS if the monitor was added, FAILURE otherwise.
Definition at line 12 of file ControllerSystem.c.
12 {
15 printf("Cannot add more monitors to the controller\n");
17 }
20}
MonitorSystem * monitors[MAX_MONITORS]
◆ defaultRemoveMonitor()
int defaultRemoveMonitor |
( |
void * |
self, |
|
|
MonitorSystem * |
monitor |
|
) |
| |
Removes a monitor from the controller.
- Parameters
-
- Returns
- SUCCESS if the monitor was removed, FAILURE otherwise.
Definition at line 22 of file ControllerSystem.c.
22 {
25 if (controller->
monitors[i] == monitor) {
28 }
31 }
32 }
33 printf("Monitor not found in the controller\n");
35}
◆ initControllerSystem()
Initializes the Controller System with initial settings.
- Parameters
-
controller | A pointer to the ControllerSystem structure. |
name | The name of the controller. |
hz | Rate at which the controller is called (in hz). |
type | The type of controller (per ControllerType). |
Definition at line 4 of file ControllerSystem.c.
5 {
10}
void initSystem(System *system, const char *name, int hz, SystemType type)
Initializes a System object.
int(* safety)(void *self)