9#ifndef MAXOS_DRIVERS_ETHERNET_ETHERNET_H
10#define MAXOS_DRIVERS_ETHERNET_ETHERNET_H
18namespace MaxOS::drivers::ethernet {
80 virtual void before_send(uint8_t* buffer, uint32_t size);
81 virtual void data_sent(uint8_t* buffer, uint32_t size);
91 virtual void do_send(uint8_t* buffer, uint32_t size);
102 void send(uint8_t* buffer, uint32_t size);
Manages the m_handlers for a type of event, raises events and calls the m_handlers.
Used to store information about an event, has a type and a return value.
Stores the left, top, width and height of a rectangle.
base class for all drivers, handles the activation, deactivation, initialisation and reset of the dri...
Event that is triggered before data is sent, holds the buffer and size of the data.
uint32_t size
The size of the buffer to be sent.
uint8_t * buffer
The buffer to be sent.
Event that is triggered when data is received, holds the buffer and size of the data.
Event that is triggered when data is sent, holds the buffer and size of the data.
uint8_t * buffer
The buffer that was sent.
uint32_t size
The size of the buffer that was sent.
Handles the events that are triggered by the Ethernet Driver.
virtual void before_send(uint8_t *buffer, uint32_t size)
Handle before send event.
common::Event< EthernetDriverEvents > * on_event(common::Event< EthernetDriverEvents > *event) override
Handle an event.
EthernetDriverEventHandler()
__EVENT HANDLER___
virtual void data_sent(uint8_t *buffer, uint32_t size)
Handle data sent event.
virtual bool data_received(uint8_t *buffer, uint32_t size)
Handle data received event.
Driver for the Ethernet Controller, manages the sending and receiving of data, the mac address,...
static MediaAccessControlAddress create_media_access_control_address(uint8_t digit1, uint8_t digit2, uint8_t digit3, uint8_t digit4, uint8_t digit5, uint8_t digit6)
Create a Media Access Control Address.
virtual MediaAccessControlAddress get_media_access_control_address()
Get the MAC address.
void send(uint8_t *buffer, uint32_t size)
send data to the network via the driver backend
void fire_data_received(uint8_t *buffer, uint32_t size)
Handle the recieved data.
virtual void do_send(uint8_t *buffer, uint32_t size)
(Device Side) send the data
void fire_data_sent(uint8_t *buffer, uint32_t size)
send data
Defines a base Driver class and DriverManager for managing drivers.
EthernetDriverEvents
Events that can be triggered by the Ethernet Driver.
uint64_t MediaAccessControlAddress
Used to make MAC addresses more readable.
Defines classes for handling events and event managers.
Defines a Vector class for dynamically storing an array of elements.