RMM API 2.0.0
Loading...
Searching...
No Matches
RMMRing Class Reference

Classe to manage the setup, configuration, and teardown of RMM ring. More...

#include <RMMRing.h>

Collaboration diagram for RMMRing:

Public Member Functions

 RMMRing (uint32_t ringId, RMMRegisterAccess &regs, 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.
 
FrontEndBasegetFEN (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.
 

Public Attributes

RMMLog log_
 Log handler for RMMRing messages.
 

Friends

class FrontEndBase
 

Detailed Description

Classe to manage the setup, configuration, and teardown of RMM ring.

Constructor & Destructor Documentation

◆ 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]ringIdThe unique identifier for this ring.
[in]regsReference to the register access controller.
[in]beMutexPointer to an external mutex for back-end synchronization (optional).

Member Function Documentation

◆ 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]fenA 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()

FrontEndBase * RMMRing::getFEN ( int node)

Retrieves a pointer to a specific Front-End Node by its index.

Parameters
[in]nodeThe 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()

RingState RMMRing::getStatus ( ) const

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]enableSet 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
maskBitmask 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]valuevalue in seconds to set timeout.

◆ tearDown()

rmmStatus RMMRing::tearDown ( bool waitTime = true)

Teardown a specific ring.

Parameters
waitTimeIf 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: