Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang::communication::CoolSerialUart Class Reference

#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)
 

Detailed Description

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.

Member Typedef Documentation

◆ DataHandlerRef

using fang::communication::CoolSerialUart::DataHandlerRef = std::reference_wrapper<coolSerial::IDataHandler>

◆ HandlerMap

using fang::communication::CoolSerialUart::HandlerMap = std::unordered_map<coolSerial::Byte, DataHandlerRef>

Constructor & Destructor Documentation

◆ CoolSerialUart() [1/2]

fang::communication::CoolSerialUart::CoolSerialUart ( tap::Drivers drivers)

◆ CoolSerialUart() [2/2]

fang::communication::CoolSerialUart::CoolSerialUart ( tap::Drivers drivers,
const HandlerMap handlerMap 
)

Member Function Documentation

◆ addHandler()

void fang::communication::CoolSerialUart::addHandler ( coolSerial::Byte  dataType,
DataHandlerRef  handler 
)

HINT: DataHandlerRef{handler} where handler inherits and implements IDataHandler's functions

◆ initialize()

void fang::communication::CoolSerialUart::initialize ( )

◆ update()

void fang::communication::CoolSerialUart::update ( )

The documentation for this class was generated from the following files: