#include <node.h>
Each node is executed in a seperate process.
Definition at line 27 of file lib/client/node.h.
Attributes | |
| enum | IAttribute { IATTR_THREAD_MODEL, IATTR_HINT_STATISTICS, IATTR_ALL } |
| Node attributes. More... | |
| class | Config |
| void | setIAttribute (const IAttribute attr, const int32_t value) |
| int32_t | getIAttribute (const IAttribute attr) const |
| static const std::string & | getIAttributeString (const IAttribute attr) |
| virtual | ~Node () |
| Destructs the node. | |
Error information. | |
| class | Pipe |
| void | setErrorMessage (const std::string &message) |
| Set a message why the last operation failed. | |
Public Member Functions | |
| Node (Config *parent) | |
| Constructs a new node. | |
| Config * | getConfig () const |
| Returns the config of this node. | |
| base::RefPtr< Client > | getClient () const |
| base::RefPtr< Server > | getServer () const |
| const PipeVector & | getPipes () const |
| const std::string & | getName () const |
| CommandQueue * | getNodeThreadQueue () |
| NodeVisitor::Result | accept (NodeVisitor *visitor) |
| Traverse this node and all children using a node visitor. | |
| net::Barrier * | getBarrier (const uint32_t id, const uint32_t version) |
| Get a network barrier. | |
| FrameData * | getFrameData (const net::ObjectVersion &dataVersion) |
| Get a frame data instance. | |
| void | waitInitialized () const |
| Wait for the node to be initialized. | |
| void | waitFrameStarted (const uint32_t frameNumber) const |
| Wait for a frame to be started. | |
Protected Member Functions | |
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 uint32_t initID) |
| Initialises this node. | |
| virtual bool | configExit () |
| Exit this node. | |
| virtual void | frameStart (const uint32_t frameID, const uint32_t frameNumber) |
| Start rendering a frame. | |
| virtual void | frameFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish rendering a frame. | |
| virtual void | frameDrawFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish drawing. | |
| virtual void | frameTasksFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish all rendering tasks. | |
| enum eq::Node::IAttribute |
| Config* eq::Node::getConfig | ( | ) | const [inline] |
Returns the config of this node.
Definition at line 40 of file lib/client/node.h.
Referenced by releaseFrameLocal().
| NodeVisitor::Result eq::Node::accept | ( | NodeVisitor * | visitor | ) |
Traverse this node and all children using a node visitor.
| visitor | the visitor. |
Definition at line 80 of file lib/client/node.cpp.
References eq::Pipe::accept(), eq::ChannelVisitor::TRAVERSE_CONTINUE, eq::ChannelVisitor::TRAVERSE_PRUNE, eq::ChannelVisitor::TRAVERSE_TERMINATE, eq::NodeVisitor::visitPost(), and eq::NodeVisitor::visitPre().
Referenced by eq::Config::accept().
| net::Barrier * eq::Node::getBarrier | ( | const uint32_t | id, | |
| const uint32_t | version | |||
| ) |
Get a network barrier.
| id | the barrier identifier. | |
| version | the barrier version. |
Definition at line 148 of file lib/client/node.cpp.
References eq::net::Object::makeThreadSafe(), eq::net::Session::mapObject(), eq::base::Lock::set(), eq::net::Object::sync(), and eq::base::Lock::unset().
| FrameData * eq::Node::getFrameData | ( | const net::ObjectVersion & | dataVersion | ) |
Get a frame data instance.
| dataVersion | the frame data identifier and version. |
Definition at line 169 of file lib/client/node.cpp.
References eq::net::Object::getVersion(), eq::net::ObjectVersion::id, eq::net::Object::makeThreadSafe(), eq::net::Session::mapObject(), eq::base::Lock::set(), eq::net::Object::sync(), eq::base::Lock::unset(), eq::FrameData::update(), and eq::net::ObjectVersion::version.
Referenced by eq::Pipe::getFrame().
| void eq::Node::waitInitialized | ( | ) | const [inline] |
| void eq::Node::waitFrameStarted | ( | const uint32_t | frameNumber | ) | const [inline] |
Wait for a frame to be started.
| frameNumber | the frame number. |
Definition at line 85 of file lib/client/node.h.
Referenced by eq::Pipe::frameStart().
| void eq::Node::startFrame | ( | const uint32_t | frameNumber | ) | [inline, protected] |
Start a frame by unlocking all child resources.
| frameNumber | the frame to start. |
Definition at line 178 of file lib/client/node.h.
Referenced by frameStart().
| void eq::Node::releaseFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Signal the completion of a frame to the parent.
| frameNumber | the frame to end. |
Definition at line 228 of file lib/client/node.cpp.
References eq::Config::getServer().
| void eq::Node::releaseFrameLocal | ( | const uint32_t | frameNumber | ) | [protected] |
Release the local synchronization of the parent for a frame.
| frameNumber | the frame to release. |
Definition at line 245 of file lib/client/node.cpp.
References getConfig(), eq::Config::getNodes(), and eq::Config::releaseFrameLocal().
Referenced by frameDrawFinish(), frameStart(), and frameTasksFinish().
| virtual bool eq::Node::configInit | ( | const uint32_t | initID | ) | [inline, protected, virtual] |
Initialises this node.
| initID | the init identifier. |
Definition at line 209 of file lib/client/node.h.
| void eq::Node::frameStart | ( | const uint32_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.
| frameID | the per-frame identifier. | |
| frameNumber | the frame to start. |
Definition at line 258 of file lib/client/node.cpp.
References IATTR_THREAD_MODEL, releaseFrameLocal(), and startFrame().
| virtual void eq::Node::frameFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [inline, 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().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finish. |
Definition at line 242 of file lib/client/node.h.
| void eq::Node::frameDrawFinish | ( | const uint32_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).
| frameID | the per-frame identifier. | |
| frameNumber | the frame finished with draw. |
Definition at line 278 of file lib/client/node.cpp.
References IATTR_THREAD_MODEL, releaseFrameLocal(), and eq::Pipe::waitFrameLocal().
| void eq::Node::frameTasksFinish | ( | const uint32_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.
| frameID | the per-frame identifier. | |
| frameNumber | the frame finished with draw. |
Definition at line 302 of file lib/client/node.cpp.
References IATTR_THREAD_MODEL, releaseFrameLocal(), and eq::Pipe::waitFrameLocal().
| void eq::Node::setErrorMessage | ( | const std::string & | message | ) | [inline, protected] |
Set a message why the last operation failed.
The message will be transmitted to the originator of the request, for example to Config::init when set from within the init method.
| message | the error message. |
Definition at line 288 of file lib/client/node.h.
0.6 by
1.5.5