PEARL
Parallel Event Access and Replay Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions
pearl::SystemNode Class Reference

Representation of a system node definition. More...

#include <pearl/SystemNode.h>

List of all members.

Public Types

typedef uint32_t IdType
 System node definition identifier type.

Public Member Functions

IdType getId () const
 Get global identifier.
const StringgetName () const
 Get node name.
const StringgetClassName () const
 Get class name.
SystemNodegetParent () const
 Get parent node.
uint32_t numChildren () const
 Get number of child nodes.
const SystemNodegetChild (uint32_t index) const
 Get child node.
uint32_t numLocationGroups () const
 Get number of location groups.
const LocationGroupgetLocationGroup (uint32_t index) const
 Get location group.
Constructors & destructor
 SystemNode (IdType id, const String &name, const String &className, SystemNode *parent)
 Constructor.

Static Public Attributes

static const IdType NO_ID = (~static_cast<IdType>(0))
 Numerical identifier used for undefined system node definitions.
static const SystemNode UNDEFINED

Friends

class LocationGroup
class SystemTree

Related Functions

(Note that these are not member functions.)

bool operator== (const SystemNode &lhs, const SystemNode &rhs)
 Equality operator.
bool operator!= (const SystemNode &lhs, const SystemNode &rhs)
 Inequality operator.
Stream I/O functions
std::ostream & operator<< (std::ostream &stream, const SystemNode &item)
 Stream output operator.

Detailed Description

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].


Member Typedef Documentation

typedef uint32_t pearl::SystemNode::IdType

Constructor & Destructor Documentation

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.

Parameters:
idGlobal system node identifier
nameNode name
classNameFree-form class name (e.g., "machine")
parentParent node in system tree (NULL for root nodes)

Member Function Documentation

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].

Parameters:
indexChild index
Returns:
Child node

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.

Returns:
Class name

Returns the global identifier of the system node definition.

Returns:
Global identifier
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].

Parameters:
indexLocation group index
Returns:
Location group

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.

Returns:
Node name

Returns a pointer to the parent node in the system tree if applicable. Returns NULL for root nodes.

Returns:
Parent node
uint32_t pearl::SystemNode::numChildren ( ) const

Returns the number of child nodes in the system tree.

Returns:
Number of child nodes

Returns the number of associated location groups.

Returns:
Number of location groups

Friends And Related Function Documentation

friend class LocationGroup [friend]
bool operator!= ( const SystemNode lhs,
const SystemNode rhs 
) [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.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the system node definitions differ, false otherwise.
std::ostream & operator<< ( std::ostream &  stream,
const SystemNode item 
) [related]

Prints the contents of the given system node definition object item to an output stream in a human-readable form.

Parameters:
streamOutput stream
itemSystem node definition object
Returns:
Output stream
bool operator== ( const SystemNode lhs,
const SystemNode rhs 
) [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.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the system node definitions are equal, false otherwise.
friend class SystemTree [friend]

Member Data Documentation

const IdType pearl::SystemNode::NO_ID = (~static_cast<IdType>(0)) [static]

Static instance of class SystemNode representing undefined system node entries in other definitions.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Scalasca    Copyright © 1998–2014 Forschungszentrum Jülich GmbH, Jülich Supercomputing Centre
Copyright © 2009–2014 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming