|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <cool_serial_uart.hpp>
Public Types | |
| using | DataHandlerRef = std::reference_wrapper< coolSerial::IDataHandler > |
| using | HandlerMap = std::unordered_map< coolSerial::Byte, DataHandlerRef > |
Public Member Functions | |
| CoolSerialUart (tap::Drivers &drivers) | |
| CoolSerialUart (tap::Drivers &drivers, const HandlerMap &handlerMap) | |
| void | initialize () |
| void | update () |
| void | addHandler (coolSerial::Byte dataType, DataHandlerRef handler) |
TODO: Create a better UART interface than taproot that adapts to modm's UART For testing reasons, we are using the hardcoded modm.
Or at least decouple the uart from taproots UartTerminalDevice to allow custom ports and baudrates.
| using fang::communication::CoolSerialUart::DataHandlerRef = std::reference_wrapper<coolSerial::IDataHandler> |
| using fang::communication::CoolSerialUart::HandlerMap = std::unordered_map<coolSerial::Byte, DataHandlerRef> |
| fang::communication::CoolSerialUart::CoolSerialUart | ( | tap::Drivers & | drivers | ) |
| fang::communication::CoolSerialUart::CoolSerialUart | ( | tap::Drivers & | drivers, |
| const HandlerMap & | handlerMap | ||
| ) |
| void fang::communication::CoolSerialUart::addHandler | ( | coolSerial::Byte | dataType, |
| DataHandlerRef | handler | ||
| ) |
HINT: DataHandlerRef{handler} where handler inherits and implements IDataHandler's functions
| void fang::communication::CoolSerialUart::initialize | ( | ) |
| void fang::communication::CoolSerialUart::update | ( | ) |