eq::Config Class Reference

#include <config.h>

Inheritance diagram for eq::Config:

Inheritance graph
[legend]
Collaboration diagram for eq::Config:

Collaboration graph
[legend]

List of all members.


Detailed Description

The configuration groups all processes of the application in a single net::Session.

Definition at line 28 of file lib/client/config.h.


Error Information.

net::IDHash< BaseView_baseViews
 Unmodified, baseline view data.
class Server
class Distributor
class Node
const std::string & getErrorMessage () const
void freezeLoadBalancing (const bool onOff)
 Undocumented.
void setWindowSystem (const WindowSystem windowSystem)
 Set the window system for the config's message pump, used by non-threaded pipes.
virtual ~Config ()

Public Member Functions

 Config (base::RefPtr< Server > parent)
 Constructs a new config.
Data Access
ClientPtr getClient ()
ServerPtr getServer ()
const NodeVector & getNodes () const
CommandQueuegetNodeThreadQueue ()
uint32_t getCurrentFrame () const
uint32_t getFinishedFrame () const
ConfigVisitor::Result accept (ConfigVisitor *visitor)
 Traverse this config and all children using a config visitor.
void getStatistics (std::vector< FrameStatistics > &statistics)
 Get all received statistics.
bool isRunning () const
void stopRunning ()
 Stop running the config.
int64_t getTime () const
const ViewVector & getViews ()
virtual bool init (const uint32_t initID)
 Initializes this configuration.
virtual bool exit ()
 Exits this configuration.
Frame Control
virtual uint32_t startFrame (const uint32_t frameID)
 Requests a new frame of rendering.
virtual uint32_t finishFrame ()
 Finish the rendering of a frame.
virtual uint32_t finishAllFrames ()
 Finish rendering all pending frames.
void releaseFrameLocal (const uint32_t frameNumber)
 Release the local synchronization of the config for a frame.
void waitFrameFinished (const uint32_t frameNumber) const
 Wait for a frame to be finished.
Event handling.
void sendEvent (ConfigEvent &event)
 Send an event to the application node.
const ConfigEventnextEvent ()
 Get the next received event on the application node.
const ConfigEventtryNextEvent ()
 Try to get an event on the application node.
bool checkEvent () const
virtual void handleEvents ()
 Handle all config events.
virtual bool handleEvent (const ConfigEvent *event)
 Handle one config event.
virtual void handleViewResize (const uint32_t viewID, const vmml::Vector2i &newSize)
 Updates a view, retaining its aspect ratio.
void setHeadMatrix (const vmml::Matrix4f &matrix)
 Sets the head matrix according to the specified matrix.
const vmml::Matrix4f & getHeadMatrix () const

Classes

struct  BaseView
 Used for resizing views, see handleViewResize. More...
class  Distributor
 Helper class to distribute the config, which is a net::Session.

Member Function Documentation

ServerPtr eq::Config::getServer (  ) 

Returns:
the server hosting this session.

Reimplemented from eq::net::Session.

Definition at line 124 of file lib/client/config.cpp.

References eq::base::RefPtr< T >::get(), and eq::net::Session::getServer().

Referenced by eq::releaseConfig(), and eq::Node::releaseFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

ConfigVisitor::Result eq::Config::accept ( ConfigVisitor visitor  ) 

Traverse this config and all children using a config visitor.

Parameters:
visitor the visitor.
Returns:
the result of the visitor traversal.

Definition at line 82 of file lib/client/config.cpp.

References eq::Node::accept(), eq::ChannelVisitor::TRAVERSE_CONTINUE, eq::ChannelVisitor::TRAVERSE_PRUNE, eq::ChannelVisitor::TRAVERSE_TERMINATE, eq::ConfigVisitor::visitPost(), and eq::ConfigVisitor::visitPre().

Here is the call graph for this function:

void eq::Config::getStatistics ( std::vector< FrameStatistics > &  statistics  ) 

Get all received statistics.

Definition at line 526 of file lib/client/config.cpp.

References eq::base::Monitor< T >::get(), eq::base::SpinLock::set(), and eq::base::SpinLock::unset().

Referenced by eq::Channel::drawStatistics().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::Config::isRunning (  )  const [inline]

Returns:
true while the config is initialized and no exit event happened.

Definition at line 61 of file lib/client/config.h.

void eq::Config::stopRunning (  )  [inline]

Stop running the config.

Definition at line 64 of file lib/client/config.h.

int64_t eq::Config::getTime (  )  const [inline]

Returns:
the global time in ms.

Definition at line 67 of file lib/client/config.h.

Referenced by finishFrame(), and eq::Pipe::getFrameTime().

Here is the caller graph for this function:

const ViewVector& eq::Config::getViews (  )  [inline]

Returns:
the View list of this config.

Definition at line 70 of file lib/client/config.h.

virtual bool eq::Config::init ( const uint32_t  initID  )  [inline, virtual]

Initializes this configuration.

Parameters:
initID an identifier to be passed to all init methods.
Returns:
true if the initialization was successful, false if not.

Definition at line 79 of file lib/client/config.h.

bool eq::Config::exit (  )  [virtual]

Exits this configuration.

A config which could not be exited properly may not be re-initialized. The exit function does not provide the possibility to pass an exit identifier to the exit methods, because individual entities may stopped dynamically by the server when running a config, i.e., before exit() is called.

Returns:
true if the exit was successful, false if not.

Definition at line 207 of file lib/client/config.cpp.

References eq::net::Session::_requestHandler, eq::net::Session::deregisterObject(), finishAllFrames(), eq::CommandQueue::flush(), eq::base::RequestHandler::isServed(), eq::base::RequestHandler::registerRequest(), eq::net::CommandQueue::release(), eq::net::Session::send(), tryNextEvent(), and eq::base::RequestHandler::waitRequest().

Here is the call graph for this function:

uint32_t eq::Config::startFrame ( const uint32_t  frameID  )  [virtual]

Requests a new frame of rendering.

Parameters:
frameID a per-frame identifier passed to all rendering methods.
Returns:
the frame number of the new frame.

Definition at line 235 of file lib/client/config.cpp.

References eq::net::Session::_requestHandler, eq::net::Object::commit(), eq::ConfigEvent::data, eq::ConfigStatistics::event, eq::View::isDirty(), eq::base::RequestHandler::registerRequest(), eq::net::Session::send(), and eq::base::RequestHandler::waitRequest().

Here is the call graph for this function:

uint32_t eq::Config::finishFrame (  )  [virtual]

Finish the rendering of a frame.

Returns:
the frame number of the finished frame, or 0 if no frame has been finished.

Definition at line 263 of file lib/client/config.cpp.

References eq::ConfigEvent::data, eq::ConfigStatistics::event, eq::base::Monitor< T >::get(), getTime(), handleEvent(), handleEvents(), and eq::ConfigStatistics::ignore.

Here is the call graph for this function:

uint32_t eq::Config::finishAllFrames (  )  [virtual]

Finish rendering all pending frames.

Returns:
the frame number of the last finished frame.

Definition at line 305 of file lib/client/config.cpp.

References handleEvents(), and eq::net::Session::send().

Referenced by exit().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Config::releaseFrameLocal ( const uint32_t  frameNumber  )  [inline]

Release the local synchronization of the config for a frame.

This is used by the local node to release the local frame synchronization.

Parameters:
frameNumber the frame to release.

Definition at line 132 of file lib/client/config.h.

Referenced by eq::Node::releaseFrameLocal().

Here is the caller graph for this function:

void eq::Config::sendEvent ( ConfigEvent event  ) 

Send an event to the application node.

Parameters:
event the event.

Definition at line 323 of file lib/client/config.cpp.

References eq::net::Session::getID(), eq::net::Session::getLocalNode(), and eq::net::Session::getServer().

Referenced by eq::Window::processEvent(), and eq::Channel::processEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

const ConfigEvent * eq::Config::nextEvent (  ) 

Get the next received event on the application node.

The returned event is valid until the next call to this method.

Returns:
a config event.

Definition at line 340 of file lib/client/config.cpp.

References eq::net::Command::getPacket(), eq::CommandQueue::pop(), and eq::net::CommandQueue::release().

Here is the call graph for this function:

const ConfigEvent * eq::Config::tryNextEvent (  ) 

Try to get an event on the application node.

The returned event is valid until the next call to this method.

Returns:
a config event, or 0 if no events are pending.

Definition at line 347 of file lib/client/config.cpp.

References eq::net::Command::getPacket(), eq::net::CommandQueue::release(), and eq::CommandQueue::tryPop().

Referenced by exit(), and handleEvents().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::Config::checkEvent (  )  const [inline]

Returns:
true if events are pending.

Definition at line 168 of file lib/client/config.h.

void eq::Config::handleEvents (  )  [virtual]

Handle all config events.

Called at the end of each frame to handle pending config events. The default implementation calls handleEvent() on all pending events, without blocking.

Definition at line 358 of file lib/client/config.cpp.

References handleEvent(), and tryNextEvent().

Referenced by finishAllFrames(), and finishFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::Config::handleEvent ( const ConfigEvent event  )  [virtual]

Handle one config event.

Parameters:
event the event.
Returns:
true if the event was handled, false if not.

Definition at line 368 of file lib/client/config.cpp.

References eq::ConfigEvent::data, and handleViewResize().

Referenced by finishFrame(), and handleEvents().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Config::handleViewResize ( const uint32_t  viewID,
const vmml::Vector2i &  newSize 
) [virtual]

Updates a view, retaining its aspect ratio.

Parameters:
viewID the identifier of the view.
newSize the new size, in pixels, of the view.

Definition at line 444 of file lib/client/config.cpp.

References _baseViews, eq::Config::BaseView::base, eq::View::getCurrentType(), eq::net::Object::getID(), eq::View::getProjection(), eq::View::getWall(), eq::View::setProjection(), eq::View::setWall(), eq::Config::BaseView::size, eq::View::TYPE_NONE, eq::View::TYPE_PROJECTION, eq::View::TYPE_WALL, and eq::Config::BaseView::view.

Referenced by handleEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Config::setHeadMatrix ( const vmml::Matrix4f &  matrix  ) 

Sets the head matrix according to the specified matrix.

Parameters:
matrix the matrix

Definition at line 561 of file lib/client/config.cpp.

const vmml::Matrix4f& eq::Config::getHeadMatrix (  )  const [inline]

Returns:
the current head matrix.

Definition at line 205 of file lib/client/config.h.

const std::string& eq::Config::getErrorMessage (  )  const [inline]

Returns:
the error message from the last operation.

Definition at line 211 of file lib/client/config.h.


Member Data Documentation

net::IDHash< BaseView > eq::Config::_baseViews [protected]

Unmodified, baseline view data.

Definition at line 249 of file lib/client/config.h.

Referenced by handleViewResize().


The documentation for this class was generated from the following files:
Generated on Sat Dec 6 12:01:45 2008 for Equalizer 0.6 by  doxygen 1.5.5