|
RMM API 2.0.0
|
Class to manage UDP core functionality including ARP configuration and data handling. More...
#include <RMMUDPCore.h>

Public Member Functions | |
| RMMUDPCore (RMMRegisterAccess &RMMRegs) | |
| Constructor for the RMMUDPCore class. | |
| void | configUDPCore () |
| Configure the UDP Core with the configuration storaged into udpCore struct. | |
| rmmStatus | arpStatus (const int index, std::unordered_map< std::string, int > *status) |
| Get the ARP status. | |
| rmmStatus | getUdpCoreData (UDPCoreData *result) |
| Retrieve the UDP core configuration data. | |
| void | processMap () |
| Initializes mutexes for each known UDP Core register. | |
| bool | fillUDPMutexes (uint8_t index) |
| Initializes mutexes for each UDP core register related to LUT. | |
| void | fillUdpCoreFromJson (json &udpCoreCfg) |
| Fills the UDP core data from a JSON configuration. | |
Public Attributes | |
| RMMLog | rmmLog |
| Log handler for RMMUDPCore messages. | |
Class to manage UDP core functionality including ARP configuration and data handling.
This class provides methods to configure and interact with the UDP core, manage ARP entries, and retrieve core data. It includes functions for reading and writing UDP core registers, as well as setting ARP timeouts and managing the ARP lookup table (LUT).
| RMMUDPCore::RMMUDPCore | ( | RMMRegisterAccess & | RMMRegs | ) |
Constructor for the RMMUDPCore class.
| [in] | RMMRegs | Reference to an RMMRegisterAccess object for register access. |
| rmmStatus RMMUDPCore::arpStatus | ( | const int | index, |
| std::unordered_map< std::string, int > * | status ) |
Get the ARP status.
| index | The index of the ARP status entry. |
| status | Pointer to std::unordered_map<std::string, int> to be populated with status info. |
| void RMMUDPCore::fillUdpCoreFromJson | ( | json & | udpCoreCfg | ) |
Fills the UDP core data from a JSON configuration.
This method parses the provided JSON configuration (udpCoreCfg) and populates the RMMUDPCore's udpCore member with values for source MAC, source IP, source port, ARP refresh timeout, and ARP reply timeout. It also fills the destination lookup table (LUT) for ARP entries if the "lut" section is present in the configuration.
| udpCoreCfg | A JSON object containing the UDP core configuration. |
The expected structure of udpCoreCfg includes:
src_mac: Source MAC address (string).src_ip: Source IP address (string).src_port: Source port (integer).arp_refresh_timeout: ARP refresh timeout value (float).arp_reply_timeout: ARP reply timeout value (float).lut: Object representing the lookup table (LUT) for ARP entries. Each entry in lut should include:dst_ip: Destination IP address (string).dst_port: Destination port (integer).mac_str: Optional; if missing, ARP will be used to obtain the destination MAC address. | bool RMMUDPCore::fillUDPMutexes | ( | uint8_t | index | ) |
Initializes mutexes for each UDP core register related to LUT.
| rmmStatus RMMUDPCore::getUdpCoreData | ( | UDPCoreData * | result | ) |
Retrieve the UDP core configuration data.
This function reads the hardware registers to populate a UDPCoreData structure with the current configuration of the UDP core.
| [out] | result | Pointer to a UDPCoreData structure to store the retrieved data. |
rmmStatus.