#include <rsu.h>
◆ Address
◆ Communicator
◆ Message
◆ Protocol
◆ Unit
◆ RSU()
Construct a new RSU object.
- Parameters
-
rsu_id | Unique identifier for this RSU (used for MAC address generation) |
unit | The unit type that this RSU will broadcast |
period | The broadcasting period in milliseconds |
data | Optional data payload for the RESPONSE message |
data_size | Size of the data payload |
◆ ~RSU()
◆ address()
Get the RSU's network address.
- Returns
- const Address& RSU's address
◆ adjust_period()
void RSU::adjust_period |
( |
std::chrono::milliseconds |
new_period | ) |
|
|
inline |
Adjust the broadcasting period.
- Parameters
-
new_period | New period in milliseconds |
◆ broadcast()
Send a single broadcast message (called by periodic thread)
◆ initialize_neighbor_rsus()
void RSU::initialize_neighbor_rsus |
( |
| ) |
|
|
inline |
Initialize neighbor RSUs directly in Protocol structure In a real system, this would be loaded from configuration.
◆ period()
std::chrono::milliseconds RSU::period |
( |
| ) |
const |
|
inline |
Get the broadcasting period.
- Returns
- std::chrono::milliseconds The current period
◆ running()
bool RSU::running |
( |
| ) |
const |
|
inline |
Check if the RSU is running.
- Returns
- bool True if running, false otherwise
◆ start()
Start the RSU broadcasting.
◆ stop()
Stop the RSU broadcasting.
◆ unit()
Get the unit type being broadcast.
- Returns
- Unit The unit type
The documentation for this class was generated from the following file:
- include/api/framework/rsu.h