![]() |
Max OS 0.3
|
Driver for the Ethernet Controller, manages the sending and receiving of data, the mac address, and the events. More...
#include <ethernet.h>
Public Member Functions | |
| 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 | |
Public Member Functions inherited from MaxOS::drivers::Driver | |
| virtual void | activate () |
| Activate the driver. | |
| virtual void | deactivate () |
| Deactivate the driver. | |
| virtual void | initialise () |
| Initialise the driver. | |
| virtual uint32_t | reset () |
| Reset the driver. | |
| virtual string | vendor_name () |
| Get who created the device. | |
| virtual string | device_name () |
| Get the device name of the driver. | |
Public Member Functions inherited from MaxOS::common::EventManager< EthernetDriverEvents > | |
| void | connect_event_handler (EventHandler< EthernetDriverEvents > *handler) |
| connect an event handler to the event manager if it is not already connected | |
| void | disconnect_event_handler (EventHandler< EthernetDriverEvents > *handler) |
| disconnect an event handler from the event manager if it is connected | |
| Vector< Event< EthernetDriverEvents > * > | raise_event (Event< EthernetDriverEvents > *event) |
| Calls the on_event function of all the event m_handlers connected to the event manager and returns a list of the results. | |
Static Public Member Functions | |
| 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. | |
Protected Member Functions | |
| virtual void | do_send (uint8_t *buffer, uint32_t size) |
| (Device Side) send the data | |
| void | fire_data_received (uint8_t *buffer, uint32_t size) |
| Handle the recieved data. | |
| void | fire_data_sent (uint8_t *buffer, uint32_t size) |
| send data | |
Additional Inherited Members | |
Protected Attributes inherited from MaxOS::common::EventManager< EthernetDriverEvents > | |
| Vector< EventHandler< EthernetDriverEvents > * > | m_handlers |
Driver for the Ethernet Controller, manages the sending and receiving of data, the mac address, and the events.
Definition at line 89 of file ethernet.h.
|
static |
Create a Media Access Control Address.
| digit1 | The m_first_memory_chunk digit |
| digit2 | The second digit |
| digit3 | The third digit |
| digit4 | The fourth digit |
| digit5 | The fifth digit |
| digit6 | The last digit |
Definition at line 165 of file ethernet.cpp.
Referenced by MaxOS::drivers::ethernet::IntelI217::IntelI217().
(Device Side) send the data
| buffer | The buffer to handle |
| size | The size of the buffer |
Reimplemented in MaxOS::drivers::ethernet::AMD_AM79C973, and MaxOS::drivers::ethernet::IntelI217.
Definition at line 113 of file ethernet.cpp.
Referenced by send().
Handle the recieved data.
| buffer | The buffer to handle |
| size | The size of the buffer |
Definition at line 122 of file ethernet.cpp.
References MaxOS::common::EventManager< EthernetDriverEvents >::raise_event(), and send().
send data
| buffer | The buffer to send |
| size | The size of the buffer |
Definition at line 148 of file ethernet.cpp.
References MaxOS::common::EventManager< EthernetDriverEvents >::raise_event().
|
virtual |
Get the MAC address.
Reimplemented in MaxOS::drivers::ethernet::AMD_AM79C973, and MaxOS::drivers::ethernet::IntelI217.
Definition at line 89 of file ethernet.cpp.
Referenced by MaxOS::net::EthernetFrameHandler::data_received(), MaxOS::net::EthernetFrameHandler::get_mac(), and MaxOS::net::EthernetFrameHandler::send_ethernet_frame().
send data to the network via the driver backend
| buffer | The buffer to send |
| size | The size of the buffer |
Definition at line 99 of file ethernet.cpp.
References do_send(), and MaxOS::common::EventManager< EthernetDriverEvents >::raise_event().
Referenced by fire_data_received(), and MaxOS::net::EthernetFrameHandler::send_ethernet_frame().