Equalizer  1.4.1
Classes | Public Member Functions | Public Attributes | Protected Member Functions
eq::Node Class Reference

A Node represents a single computer in the cluster. More...

#include <node.h>

+ Inheritance diagram for eq::Node:
+ Collaboration diagram for eq::Node:

List of all members.

Classes

class  TransmitThread

Public Member Functions

 Node (Config *parent)
 Construct a new node.
virtual ~Node ()
 Destruct the node.
ClientPtr getClient ()
ServerPtr getServer ()
co::CommandQueuegetMainThreadQueue ()
co::CommandQueuegetCommandThreadQueue ()
uint32_t getCurrentFrame () const
co::BarriergetBarrier (const co::ObjectVersion barrier)
FrameDataPtr getFrameData (const co::ObjectVersion &frameDataVersion)
void releaseFrameData (FrameDataPtr data)
void waitInitialized () const
bool isRunning () const
bool isStopped () const
void waitFrameStarted (const uint32_t frameNumber) const
 Wait for a frame to be started.
uint32_t getFinishedFrame () const
virtual void setDirty (const uint64_t bits)
void dirtyClientExit ()

Public Attributes

eq::Node::TransmitThread transmitter

Protected Member Functions

virtual void attach (const UUID &id, const uint32_t instanceID)
Actions
void startFrame (const uint32_t frameNumber)
 Start a frame by unlocking all child resources.
void releaseFrame (const uint32_t frameNumber)
 Signal the completion of a frame to the parent.
void releaseFrameLocal (const uint32_t frameNumber)
 Release the local synchronization of the parent for a frame.
Callbacks

The callbacks are called by Equalizer during rendering to execute various actions.

virtual bool configInit (const uint128_t &initID)
 Initialize this node.
virtual bool configExit ()
 Exit this node.
virtual void frameStart (const uint128_t &frameID, const uint32_t frameNumber)
 Start rendering a frame.
virtual void frameFinish (const uint128_t &frameID, const uint32_t frameNumber)
 Finish rendering a frame.
virtual void frameDrawFinish (const uint128_t &frameID, const uint32_t frameNumber)
 Finish drawing.
virtual void frameTasksFinish (const uint128_t &frameID, const uint32_t frameNumber)
 Finish all rendering tasks.

Detailed Description

A Node represents a single computer in the cluster.

Each node is executed in a separate process. Each process has only its local node instantiated, that is, it has at most instance of a Node and does not see other node instances. The application process may not have a node, which is the case when it does not contribute to the rendering.

The eq::Node is not to be confused with the co::Node which represents the process in the underlying peer-to-peer network layer. The eq::Client and eq::Server are co::Nodes representing the local client and Equalizer server, respectively.

See also:
fabric::Node

Definition at line 49 of file include/eq/client/node.h.


Constructor & Destructor Documentation

eq::Node::Node ( Config parent)

Construct a new node.

Version:
1.0

Reimplemented in osgScaleViewer::Node, eqPly::Node, eVolve::Node, and eqNbody::Node.

virtual eq::Node::~Node ( ) [virtual]

Destruct the node.

Version:
1.0

Reimplemented from eq::fabric::Node< Config, Node, Pipe, NodeVisitor >.

Reimplemented in eqPly::Node, eVolve::Node, and eqNbody::Node.


Member Function Documentation

virtual bool eq::Node::configExit ( ) [protected, virtual]

Exit this node.

Version:
1.0

Reimplemented in osgScaleViewer::Node, and eqNbody::Node.

Referenced by eqNbody::Node::configExit().

+ Here is the caller graph for this function:

virtual bool eq::Node::configInit ( const uint128_t &  initID) [protected, virtual]

Initialize this node.

Parameters:
initIDthe init identifier.
Version:
1.0

Reimplemented in osgScaleViewer::Node, eqPly::Node, eVolve::Node, and eqNbody::Node.

Referenced by eqNbody::Node::configInit(), eVolve::Node::configInit(), eqPly::Node::configInit(), and osgScaleViewer::Node::configInit().

+ Here is the caller graph for this function:

virtual void eq::Node::frameDrawFinish ( const uint128_t &  frameID,
const uint32_t  frameNumber 
) [protected, virtual]

Finish drawing.

Called once per frame after the last draw operation. Waits for the pipes to release the local synchonization and releases the node's local synchronization if the thread model is draw_sync (the default).

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame finished with draw.
See also:
Pipe::waitFrameLocal(), releaseFrameLocal()
Version:
1.0
virtual void eq::Node::frameFinish ( const uint128_t &  frameID,
const uint32_t  frameNumber 
) [protected, virtual]

Finish rendering a frame.

Called once at the end of each frame, to end the frame and to do per-frame updates of node-specific data. This method has to call releaseFrame().

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame to finish.
See also:
endFrame(), Config::finishFrame()
Version:
1.0
virtual void eq::Node::frameStart ( const uint128_t &  frameID,
const uint32_t  frameNumber 
) [protected, virtual]

Start rendering a frame.

Called once at the beginning of each frame, to start the node's frame and to do per-frame updates of node-specific data. This method has to call startFrame(). Immediately releases local synchronization if the thread model is async.

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame to start.
See also:
startFrame(), Config::beginFrame()
Version:
1.0

Reimplemented in osgScaleViewer::Node.

virtual void eq::Node::frameTasksFinish ( const uint128_t &  frameID,
const uint32_t  frameNumber 
) [protected, virtual]

Finish all rendering tasks.

Called once per frame after all frame tasks. Waits for the pipes to release the local synchonization and releases the node's local synchronization if the thread model is local_sync.

Note that frameFinish is called after the latency is exhausted and synchronizes pipe thread execution.

Parameters:
frameIDthe per-frame identifier.
frameNumberthe frame finished with draw.
See also:
Pipe::waitFrameLocal(), releaseFrameLocal()
Version:
1.0
Returns:
the parent client node.
Version:
1.0
Returns:
the parent server node.
Version:
1.0
bool eq::Node::isRunning ( ) const
Returns:
true if this node is running, false otherwise.
Version:
1.0
bool eq::Node::isStopped ( ) const
Returns:
true if this node is stopped, false otherwise.
Version:
1.0
void eq::Node::releaseFrame ( const uint32_t  frameNumber) [protected]

Signal the completion of a frame to the parent.

Parameters:
frameNumberthe frame to end.
Version:
1.0
void eq::Node::releaseFrameLocal ( const uint32_t  frameNumber) [protected]

Release the local synchronization of the parent for a frame.

Parameters:
frameNumberthe frame to release.
Version:
1.0
virtual void eq::Node::setDirty ( const uint64_t  bits) [virtual]
See also:
Serializable::setDirty()

Reimplemented from eq::fabric::Node< Config, Node, Pipe, NodeVisitor >.

void eq::Node::startFrame ( const uint32_t  frameNumber) [protected]

Start a frame by unlocking all child resources.

Parameters:
frameNumberthe frame to start.
Version:
1.0
void eq::Node::waitFrameStarted ( const uint32_t  frameNumber) const

Wait for a frame to be started.

Used by the pipe task methods to implement the current thread synchronization model.

Parameters:
frameNumberthe frame number.
See also:
releaseFrame()
Version:
1.0

The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1