sqefqsdf
Dependencies: C12832 EthernetInterface LM75B mbed-rtos mbed
Fork of app-board-LM75B by
Diff: IOController.h
- Revision:
- 6:77a4c45f6416
diff -r 608f2bf4d3f7 -r 77a4c45f6416 IOController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IOController.h Thu Mar 23 12:51:27 2017 +0000 @@ -0,0 +1,114 @@ +#ifndef IOController_H +#define IOController_H +#include <mbed.h> +#include "TemperatureSensor.h" +#include "Potentiometer.h" +#include "Joystick.h" +#include "Speaker.h" +#include "RGB.h" +#include "LCD.h" +#include "Communication.h" +#include "Packet.h" + +/** IOController class + * Controls both the input(TemperatureSensor, Potentiometer, Joystick) and + * output(Speaker, RGB, LCD) devices. And uses the Communication class to send + * the read input data to an other client. + * @ref Joystick + * @ref TemperatureSensor + * @ref Potentiometer + * @ref Speaker + * @ref RGB + * @ref Potentiometer + */ + +class IOController +{ +public: + + /** + * Makes an instance of the IOController class, this will initialize + * all the IO devices + */ + IOController(); + + /** + * Deletes the IOController and calls the destructor from + * all the IO devices + */ + ~IOController(); + + /** + * The main run method used in a loop for controlling the IO Devices + */ + int run(); + +private: + + /** + * Pointer to an object of the class TemperatureSensor + * + * @ref TemperatureSensor + */ + TemperatureSensor * temperatureSensor; + + /** + * Pointer to an object of the class Potentiometer + * + * @ref Potentiometer + */ + Potentiometer * potentiometer; + + /** + * Pointer to an object of the class Joystick + * + * @ref Joystick + */ + Joystick * joystick; + + /** + * Pointer to an object of the class Speaker + * + * @ref Speaker + */ + Speaker * speaker; + + /** + * Pointer to an object of the class RGB + * + * @ref RGB + */ + RGB * rgbLed; + + /** + * Pointer to an object of the class LCD + * + * @ref LDC + */ + LCD * lcd; + + /** + * Pointer to an object of the class Communication + * @ref Communication + */ + Communication * communication; + + /** + * Pointer to an object of the class Packet + * + * @ref Packet + */ + Packet * receivePacket; + + /** + * An integer resembling the ID of the destination + */ + int destinationID; + + /** + * A boolean which is toggled on when the receiving is started. + */ + bool startReceiving; +}; + +#endif \ No newline at end of file