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

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

#include <RMMRings.h>

Collaboration diagram for RMMRings:

Public Member Functions

 RMMRings (RMMRegisterAccess &RMMRegs, Topology &topology)
 Constructor for the RMMRings instance.
 
rmmStatus teardownAllRings ()
 Teardown all possible rings.
 
rmmStatus tearDownRing (int ring, bool waitTime=true)
 Teardown a specific ring of the RMM.
 
void bringUpAllRings ()
 Initializes and configures all active rings.
 
void bringUpAllRingsInSequence ()
 Initializes and configures all active rings, one by one.
 
ringStatus checkRings ()
 Perform a slow control read from all FEs in the topology to confirm the ring is active.
 
void readyForBulkData ()
 Inform all FEs in the topology that they can start sending bulk data.
 
void resetPacketCounters ()
 Reset all packet counters back to 0. Useful if the counters start saturating at 0xFFFF_FFFF.
 
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.
 
rmmStatus getPacketCounters (PacketCountMap *packets)
 Return the updated packet counters.. There are 2 types of counters, one set that counts the per-fibre (odd and even) bulk data packets, and then one set that counts per-node in the output queues.
 
rmmStatus getSideChannelPacketCounter (uint8_t node, uint32_t *value)
 Retrieves the packet counter value for a specific side channel.
 

Public Attributes

RMMLog rmmLog
 Log handler for RMMRings messages.
 

Static Public Attributes

static constexpr int FE_DEFAULT_LOCK_TIME = 16
 

Friends

class FrontEndBase
 

Detailed Description

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

This class is responsible for configuring and managing RMM rings, handling packet counters, synchronizing nodes, and ensuring the correct operation of the transceivers. It interacts with the RMMRegisterAccess for hardware register manipulation and Topology for managing the system topology.

Constructor & Destructor Documentation

◆ RMMRings()

RMMRings::RMMRings ( RMMRegisterAccess & RMMRegs,
Topology & topology )

Constructor for the RMMRings instance.

Parameters
RMMRegsReference to an RMMRegisterAccess instance for hardware register control.
topologyReference to a Topology instance for managing the system topology.

Member Function Documentation

◆ bringUpAllRings()

void RMMRings::bringUpAllRings ( )

Initializes and configures all active rings.

This method performs the setup required to bring up all rings in the system. It first calls commonRingSetup() to apply common configurations, then iterates over all active rings retrieved from the topology and asynchronously executes ringSetup() for each ring.

The setup tasks are executed concurrently using std::async to improve performance, and the method waits for all tasks to complete before returning.

◆ bringUpAllRingsInSequence()

void RMMRings::bringUpAllRingsInSequence ( )

Initializes and configures all active rings, one by one.

same as RMMRings::bringUpAllRings, but with sequential execution. Intended to be used by developers who want to troubleshoot problematic ring so that error logs are not flooded by other rings that are working well.

◆ checkRings()

ringStatus RMMRings::checkRings ( )

Perform a slow control read from all FEs in the topology to confirm the ring is active.

Returns
ringStatus An enumeration indicating the status of the operation.
See also
ringStatus

◆ getPacketCounters()

rmmStatus RMMRings::getPacketCounters ( PacketCountMap * packets)

Return the updated packet counters.. There are 2 types of counters, one set that counts the per-fibre (odd and even) bulk data packets, and then one set that counts per-node in the output queues.

Parameters
packetspointer to packets counters map to be updated.
Returns
rmmStatus success

◆ getPollTimeout()

int RMMRings::getPollTimeout ( )

Gets the timeout for polling in seconds.

Returns
timeout for polling in seconds after estimated time.

◆ getSideChannelPacketCounter()

rmmStatus RMMRings::getSideChannelPacketCounter ( uint8_t sideChIdx,
uint32_t * value )

Retrieves the packet counter value for a specific side channel.

Parameters
[in]sideChIdxThe side channel index for which the packet counter is requested. Valid indices are 0 and 1.
[out]valuePointer to a uint32_t variable where the packet counter value will be stored.
Returns
rmmSuccess if the packet counter was successfully retrieved.
rmmError if the side channel index is invalid.

◆ setPollTimeout()

void RMMRings::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.
Returns
void

◆ teardownAllRings()

rmmStatus RMMRings::teardownAllRings ( )

Teardown all possible rings.

Returns
status

◆ tearDownRing()

rmmStatus RMMRings::tearDownRing ( int ring,
bool waitTime = true )

Teardown a specific ring of the RMM.

Parameters
ringThe index of the ring to tear down.
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: