Infiniband::Node Class Reference
[Fountain serverInfiniband discovery and monitoring]

Object representing a single node in an Infiniband network. More...

#include <InfinibandNode.h>

List of all members.

Public Types

typedef std::map< int, Port,
std::less< uint64_t > > 
HashTable
 Shorthand implementation of the std::map used to keep track of this node's ports.
enum  NodeType
 The type of an infiniband node, either a host channel adapter (HCA) or switch.

Public Member Functions

 Node (ib_portid_t defaultPath)
 Constructor with a predefined path.
 Node (const Node &rhs)
 Copy constructor.
Nodeoperator= (const Node &rhs)
 Assignment operator.
bool operator== (const Node &rhs)
 Equality operator.
bool operator!= (const Node &rhs)
 Inequality operator.
 ~Node ()
 Default destructor.
uint64_t getGuid () const
 Get this node's GUID.
const ib_portid_t * getPath () const
 get this node's path
uint32_t getLid () const
int getInfo ()
 Query this node for relevant information.
Node handlePort (uint32_t portnum)
 Check the specified port for a remote node.
NodeType getType ()
 Get this Node's type.
int extendDirectedRoutePath (int nextport)
 Extend this node's directed route path to the specified port.
uint32_t getNumPorts ()
 Get the number of ports available for this node.
int getLocalPort ()
 Get this node's local port.
void query ()
 Update all the port counters for this node's ports.
void addInfo (BambooLib::XMLElement *myDevice)
 Append this node's information.
void setHostname (const std::string &hostname)
 Set this node's hostname.
const std::string & getHostname ()
 Get the hostname for this Node.

Static Public Member Functions

static const char * fountain_convert (const NodeType &t)
 Convert a NodeType into a c-string.
static std::string getNodeName (uint64_t nodeguid)
 Converts a guid into a hexadecimal string 16 characters long padded with zeros.
static std::string getNodeName (const Node &node)
 Converts a Node objects guid into a hexadecimal string 16 characters long padded with zeros.

Private Attributes

HashTable ports
 A hash table of the Infiniband nodes connected to this node. The key is the port number, and the value is the guid of the remote node.
ib_portid_t path
NodeType type
uint32_t numports
uint64_t nodeguid
uint32_t lid
int localport
uint64_t portguid
std::string nodeDescription
std::string hostname_


Detailed Description

Object representing a single node in an Infiniband network.


Member Function Documentation

void Infiniband::Node::addInfo BambooLib::XMLElement myDevice  ) 
 

Append this node's information.

Parameters:
[in] myDevice A pointer to the XMLElement to add the information

int Infiniband::Node::extendDirectedRoutePath int  nextport  ) 
 

Extend this node's directed route path to the specified port.

Return values:
int -1 if the path could not be increased
int The count of the directed path otherwise

const char * Infiniband::Node::fountain_convert const NodeType t  )  [static]
 

Convert a NodeType into a c-string.

Return values:
char* The NodeType enum as a c-string or NULL if the conversion failed

uint64_t Infiniband::Node::getGuid  )  const [inline]
 

Get this node's GUID.

Return values:
uint64_t The GUID for this node

const std::string& Infiniband::Node::getHostname  )  [inline]
 

Get the hostname for this Node.

Return values:
std::string Reference to a string object containing this node's hostname

int Infiniband::Node::getInfo  ) 
 

Query this node for relevant information.

Return values:
int SUCCESS if the query succeeded
int FAILURE if the query was not successful

uint32_t Infiniband::Node::getLid  )  const [inline]
 

Get this node's lid

Return values:
uint32_t The lid for this node

int Infiniband::Node::getLocalPort  )  [inline]
 

Get this node's local port.

Return values:
int The port number of this node's local port

static std::string Infiniband::Node::getNodeName const Node node  )  [inline, static]
 

Converts a Node objects guid into a hexadecimal string 16 characters long padded with zeros.

Parameters:
[in] node The Node object
Return values:
std::string The GUID of the node

string Infiniband::Node::getNodeName uint64_t  nodeguid  )  [static]
 

Converts a guid into a hexadecimal string 16 characters long padded with zeros.

Parameters:
[in] nodeguid The GUID of the node
Return values:
std::string The GUID

uint32_t Infiniband::Node::getNumPorts  )  [inline]
 

Get the number of ports available for this node.

Return values:
uint32_t The number of ports available for this node

const ib_portid_t* Infiniband::Node::getPath  )  const [inline]
 

get this node's path

Return values:
ib_portid_t* A pointer to this node's ib_portid_t object

NodeType Infiniband::Node::getType  )  [inline]
 

Get this Node's type.

Return values:
NodeType The Node's type

Infiniband::Node Infiniband::Node::handlePort uint32_t  portnum  ) 
 

Check the specified port for a remote node.

Exceptions:
FountainException if the port is not active or if we encountered an error when querying the remote node

bool Infiniband::Node::operator!= const Node rhs  )  [inline]
 

Inequality operator.

Return values:
bool true if The two Node's GUIDs do not match
bool false otherwise

bool Infiniband::Node::operator== const Node rhs  )  [inline]
 

Equality operator.

Return values:
bool true if The two Node's GUIDs match, false otherwise

void Infiniband::Node::setHostname const std::string &  hostname  )  [inline]
 

Set this node's hostname.

Parameters:
[in] hostname The hostname to set


Member Data Documentation

std::string Infiniband::Node::hostname_ [private]
 

The hostname of this node, this is how we connect this Infiniband network information to the nodes in the Fountain server nodeMonitorDatabase

uint32_t Infiniband::Node::lid [private]
 

This node's local address (LID) which is assigned by the Infiniband fabric manager

int Infiniband::Node::localport [private]
 

The node's local port

Todo:
what is this localport? sjm 1-20-2006

std::string Infiniband::Node::nodeDescription [private]
 

Textual description of what this node is, usually generated by the manufacturer of the Infiniband adapter

uint64_t Infiniband::Node::nodeguid [private]
 

This node's global unique identifier

uint32_t Infiniband::Node::numports [private]
 

Number of available ports

ib_portid_t Infiniband::Node::path [private]
 

This is the central data structure for an Infiniband node, it maintains the routing path for this particular node

uint64_t Infiniband::Node::portguid [private]
 

This node's port guid

Todo:
what is this portguid? sjm 1-20-2006

NodeType Infiniband::Node::type [private]
 

Either HCA or Switch


The documentation for this class was generated from the following files:
Generated on Wed Mar 8 14:43:34 2006 for Fountain by  doxygen 1.4.6