Classe to manage the setup, configuration, and teardown of RMM ring.
More...
#include <RMMRing.h>
|
| | RMMRing (uint32_t ringId, RMMRegisterAccess ®s, std::mutex *beMutex=nullptr) |
| | Constructor for the RMMRing object.
|
| |
| uint32_t | getNumberOfFENs () const |
| | Retrieves the total number of Front-End Nodes registered in this ring.
|
| |
| void | addEntry (std::shared_ptr< FrontEndBase > fen) |
| | Adds a Front-End Node (FEN) entry to the ring's topology.
|
| |
| void | setLogMask (int mask) |
| | Set the log mask for this ring.
|
| |
| ringStatus | check () |
| | Check whether the ring is correctly locked.
|
| |
| rmmStatus | tearDown (bool waitTime=true) |
| | Teardown a specific ring.
|
| |
|
rmmStatus | bringup () |
| | Brings up a ring.
|
| |
| int | getPollTimeout () |
| | Gets the timeout for polling in seconds.
|
| |
| void | setPollTimeout (int value) |
| | Sets the timeout for polling in seconds. Timeout starts counting after the polling exceeds initial estimated, not at start of polling.
|
| |
| RingState | getStatus () const |
| | Retrieves the current state of the ring.
|
| |
| bool | isOperational () const |
| | Check the ring's operational status.
|
| |
| rmmStatus | setEnabled (bool enable) |
| | Sets the software-level enabled status of the ring.
|
| |
| FrontEndBase * | getFEN (int node) |
| | Retrieves a pointer to a specific Front-End Node by its index.
|
| |
|
rmmStatus | startSendingBulkData () |
| | Inform all FEs in the ring that they can start sending bulk data.
|
| |
Classe to manage the setup, configuration, and teardown of RMM ring.
◆ RMMRing()
| RMMRing::RMMRing |
( |
uint32_t | ringId, |
|
|
RMMRegisterAccess & | regs, |
|
|
std::mutex * | beMutex = nullptr ) |
Constructor for the RMMRing object.
Initializes the ring with its ID, register access, and an optional back-end mutex.
- Parameters
-
| [in] | ringId | The unique identifier for this ring. |
| [in] | regs | Reference to the register access controller. |
| [in] | beMutex | Pointer to an external mutex for back-end synchronization (optional). |
◆ addEntry()
| void RMMRing::addEntry |
( |
std::shared_ptr< FrontEndBase > | fen | ) |
|
Adds a Front-End Node (FEN) entry to the ring's topology.
This method is thread-safe and stores the FEN in the internal collection.
- Parameters
-
| [in] | fen | A shared pointer to the FrontEndBase object to be registered. |
◆ check()
| ringStatus RMMRing::check |
( |
| ) |
|
Check whether the ring is correctly locked.
Verifies that all nodes belonging to this ring are locked by reading the NDID_SLV register of each node and comparing it with the expected node identifier.
- Returns
- ringSuccess if all nodes are locked, ringError otherwise.
◆ getFEN()
Retrieves a pointer to a specific Front-End Node by its index.
- Parameters
-
| [in] | node | The index of the node to retrieve. |
- Returns
- FrontEndBase* Pointer to the requested FEN, or nullptr if the index is out of range.
◆ getNumberOfFENs()
| uint32_t RMMRing::getNumberOfFENs |
( |
| ) |
const |
Retrieves the total number of Front-End Nodes registered in this ring.
- Returns
- uint32_t The count of FENs.
◆ getPollTimeout()
| int RMMRing::getPollTimeout |
( |
| ) |
|
Gets the timeout for polling in seconds.
- Returns
- timeout for polling in seconds after estimated time.
◆ getStatus()
Retrieves the current state of the ring.
- Returns
- RingState The current operational status of the ring.
◆ isOperational()
| bool RMMRing::isOperational |
( |
| ) |
const |
|
inline |
Check the ring's operational status.
- Returns
- true if the ring is operational.
◆ setEnabled()
| rmmStatus RMMRing::setEnabled |
( |
bool | enable | ) |
|
Sets the software-level enabled status of the ring.
- Parameters
-
| [in] | enable | Set to true to enable the ring, false to disable. |
- Returns
- rmmStatus rmmSuccess if the status was updated, rmmError if the ring is not in the topology.
◆ setLogMask()
| void RMMRing::setLogMask |
( |
int | mask | ) |
|
Set the log mask for this ring.
- Parameters
-
| mask | Bitmask of enabled log levels. |
◆ setPollTimeout()
| void RMMRing::setPollTimeout |
( |
int | value | ) |
|
Sets the timeout for polling in seconds. Timeout starts counting after the polling exceeds initial estimated, not at start of polling.
- Parameters
-
| [in] | value | value in seconds to set timeout. |
◆ tearDown()
| rmmStatus RMMRing::tearDown |
( |
bool | waitTime = true | ) |
|
Teardown a specific ring.
- Parameters
-
| waitTime | If true, the function waits for the full teardown timeout. |
- Returns
- - rmmSuccess if the teardown completed successfully or was already in progress.
- mmError if the ring index is out of range or an error occurred while writing registers.
The documentation for this class was generated from the following files: