![]() |
PEARL
Parallel Event Access and Replay Library
|
Representation of a system node definition. More...
#include <pearl/SystemNode.h>
Public Types | |
typedef uint32_t | IdType |
System node definition identifier type. More... | |
Public Member Functions | |
Constructors & destructor | |
SystemNode (IdType id, const String &name, const String &className, SystemNode *parent) | |
Constructor. More... | |
Access definition data | |
IdType | getId () const |
Get global identifier. More... | |
const String & | getName () const |
Get node name. More... | |
const String & | getClassName () const |
Get class name. More... | |
SystemNode * | getParent () const |
Get parent node. More... | |
uint32_t | numChildren () const |
Get number of child nodes. More... | |
const SystemNode & | getChild (uint32_t index) const |
Get child node. More... | |
uint32_t | numLocationGroups () const |
Get number of location groups. More... | |
const LocationGroup & | getLocationGroup (uint32_t index) const |
Get location group. More... | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined system node definitions. More... | |
static const SystemNode | UNDEFINED |
Static instance of class SystemNode representing undefined system node entries in other definitions. More... | |
Friends | |
class | LocationGroup |
Related Functions | |
(Note that these are not member functions.) | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const SystemNode &item) |
Stream output operator. More... | |
Comparison operators | |
bool | operator== (const SystemNode &lhs, const SystemNode &rhs) |
Equality operator. More... | |
bool | operator!= (const SystemNode &lhs, const SystemNode &rhs) |
Inequality operator. More... | |
Instances of the SystemNode class provide information about nodes in the system (i.e., hardware) hierarchy of the computing platform. That is, system nodes represent entire machines, racks, midplanes, or individual cluster nodes or node boards and can be arbitrarily nested to reflect the hardware architecture of the computing system. System nodes are characterized by a name, a free-form description ("class name"), and a parent node in the system hierarchy. In addition, one or more LocationGroup objects can be attached to a system node. The numerical identifiers of the individual nodes are globally defined and continuously enumerated, i.e., the ID is element of [0,#system_nodes-1].
typedef uint32_t pearl::SystemNode::IdType |
pearl::SystemNode::SystemNode | ( | IdType | id, |
const String & | name, | ||
const String & | className, | ||
SystemNode * | parent | ||
) |
Creates a new system node definition instance and initializes it with the given values.
id | Global system node identifier |
name | Node name |
className | Free-form class name (e.g., "machine") |
parent | Parent node in system tree (NULL for root nodes) |
const SystemNode& pearl::SystemNode::getChild | ( | uint32_t | index | ) | const |
Returns the child node stored at the given index in the range of [0,#children-1].
index | Child index |
const String& pearl::SystemNode::getClassName | ( | ) | const |
Returns the string definition storing the free-form class name of this system node. This is typically a brief description of the node type, e.g., "machine", "rack", or "node". If this information is not available, String::UNDEFINED is returned.
IdType pearl::SystemNode::getId | ( | ) | const |
Returns the global identifier of the system node definition.
const LocationGroup& pearl::SystemNode::getLocationGroup | ( | uint32_t | index | ) | const |
Returns the associated location group stored at the given index in the range [0,#stored_groups-1].
index | Location group index |
const String& pearl::SystemNode::getName | ( | ) | const |
Returns the string definition storing the name of this system node. This is typically the name of the machine, rack, or cluster node. If this information is not available, String::UNDEFINED is returned.
SystemNode* pearl::SystemNode::getParent | ( | ) | const |
Returns a pointer to the parent node in the system tree if applicable. Returns NULL for root nodes.
uint32_t pearl::SystemNode::numChildren | ( | ) | const |
Returns the number of child nodes in the system tree.
uint32_t pearl::SystemNode::numLocationGroups | ( | ) | const |
Returns the number of associated location groups.
|
friend |
|
related |
Compares two system node definition objects lhs and rhs for inequality. Two nodes are considered unequal if either their IDs, their names, class names, or their parents differ. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
related |
Prints the contents of the given system node definition object item to an output stream in a human-readable form.
stream | Output stream |
item | System node definition object |
|
related |
Compares two system node definition objects lhs and rhs for equality. Two nodes are considered equal if their identifiers, names, class names, as well as their parents are identical. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
static |
![]() |
Copyright © 1998–2019 Forschungszentrum Jülich GmbH,
Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming |