Add bridge management CLI

This commit is contained in:
João Brázio 2025-09-24 16:30:00 +01:00
parent ea13fa899e
commit 1d45c7ec66
No known key found for this signature in database
GPG key ID: 56A1490716A324DD
11 changed files with 340 additions and 137 deletions

View file

@ -11,6 +11,18 @@ public:
*/
virtual void begin() = 0;
/**
* @brief Stops the bridge.
*/
virtual void end() = 0;
/**
* @brief Gets the current state of the bridge.
*
* @return true if the bridge is initialized and running, false otherwise.
*/
virtual bool getState() const = 0;
/**
* @brief A method to be called on every main loop iteration.
* Used for tasks like checking for incoming data.
@ -20,14 +32,14 @@ public:
/**
* @brief A callback that is triggered when the mesh transmits a packet.
* The bridge can use this to forward the packet.
*
*
* @param packet The packet that was transmitted.
*/
virtual void onPacketTransmitted(mesh::Packet* packet) = 0;
/**
* @brief Processes a received packet from the bridge's medium.
*
*
* @param packet The packet that was received.
*/
virtual void onPacketReceived(mesh::Packet* packet) = 0;