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

Class to manage the topology of frontend devices. More...

#include <Topology.h>

Public Member Functions

 Topology ()
 Constructor for the Topology class.
 
const TopologyList & getAllEntries () const
 Retrieve all entries in the topology.
 
void addEntry (const FrontEndEntry &entry)
 Adds a front-end entry to the topology map.
 
const NodesList getNodesForRing (int ring)
 Retrieves all nodes associated with a specific ring.
 
const uint8_t getNumberOfNodesInRing (int ring)
 Retrieves the number of nodes in a specific ring.
 
const FENRegMap & getAddrMap (int ring, int node)
 Returns the register map for a given ring-node pair.
 
const FrontEndBasegetFEN (int ring, int node)
 gets the FrontEnd in given ring and node. Returns NULL if not found.
 
const std::vector< int > getActiveRings ()
 Returns which rings have populated nodes.
 
void fillNodesArray (uint8_t *rings, size_t size=NUMBER_RINGS)
 Fills the number of nodes per ring in an array.
 

Detailed Description

Class to manage the topology of frontend devices.

The Topology class keeps track of registered frontend devices in a structured manner, allowing efficient retrieval and management of frontend instances.

Member Function Documentation

◆ addEntry()

void Topology::addEntry ( const FrontEndEntry & entry)

Adds a front-end entry to the topology map.

Parameters
entryThe front-end entry to be added to the topology.

◆ fillNodesArray()

void Topology::fillNodesArray ( uint8_t * rings,
size_t size = NUMBER_RINGS )

Fills the number of nodes per ring in an array.

Parameters
ringsArray to fill with number of rings. Each index represents a node.
sizeSize to fill array with. Should usually be NUMBER_RINGS

◆ getAddrMap()

const FENRegMap & Topology::getAddrMap ( int ring,
int node )

Returns the register map for a given ring-node pair.

Parameters
ringThe ring identifier.
nodeThe node identifier.
Returns
The register map for the node.

◆ getAllEntries()

const TopologyList & Topology::getAllEntries ( ) const
inline

Retrieve all entries in the topology.

Returns
A constant reference to the list of all topology entries.

◆ getNodesForRing()

const NodesList Topology::getNodesForRing ( int ring)

Retrieves all nodes associated with a specific ring.

Parameters
ringThe ring identifier.
Returns
A constant reference to a map of nodes in the specified ring, where each node is associated with a FrontEndEntry.
Exceptions
std::runtime_errorif the specified ring does not exist in the topology.

◆ getNumberOfNodesInRing()

const uint8_t Topology::getNumberOfNodesInRing ( int ring)

Retrieves the number of nodes in a specific ring.

Parameters
ringThe ring identifier.
Returns
The number of nodes within the specified ring. Returns 0 if the ring does not exist.

The documentation for this class was generated from the following files: