22 #include <eq/client/api.h>
23 #include <eq/client/types.h>
24 #include <eq/client/visitorResult.h>
25 #include <eq/fabric/node.h>
27 #include <co/commandQueue.h>
29 #include <lunchbox/monitor.h>
30 #include <lunchbox/mtQueue.h>
56 EQ_API
virtual ~Node();
64 EQ_API co::CommandQueue* getMainThreadQueue();
65 EQ_API co::CommandQueue* getCommandThreadQueue();
68 uint32_t getCurrentFrame()
const {
return _currentFrame.get(); }
77 co::Barrier* getBarrier(
const co::ObjectVersion barrier );
86 FrameDataPtr getFrameData(
const co::ObjectVersion& frameDataVersion );
92 EQ_API
void waitInitialized()
const;
119 uint32_t getFinishedFrame()
const {
return _finishedFrame; }
141 co::CommandQueue& getQueue() {
return _queue; }
147 co::CommandQueue _queue;
152 EQ_API
virtual void setDirty(
const uint64_t bits );
155 EQ_API
void dirtyClientExit();
159 EQ_API
virtual void attach(
const UUID&
id,
const uint32_t instanceID );
169 EQ_API
void startFrame(
const uint32_t frameNumber );
202 EQ_API
virtual bool configInit(
const uint128_t& initID );
220 EQ_API
virtual void frameStart(
const uint128_t& frameID,
221 const uint32_t frameNumber );
235 EQ_API
virtual void frameFinish(
const uint128_t& frameID,
236 const uint32_t frameNumber );
251 const uint32_t frameNumber );
269 const uint32_t frameNumber );
282 lunchbox::Monitor< State > _state;
285 lunchbox::Monitor< uint32_t > _currentFrame;
288 uint32_t _finishedFrame;
291 uint32_t _unlockedFrame;
293 typedef stde::hash_map< uint128_t, co::Barrier* > BarrierHash;
295 lunchbox::Lockable< BarrierHash > _barriers;
297 typedef stde::hash_map< uint128_t, FrameDataPtr > FrameDataHash;
298 typedef FrameDataHash::const_iterator FrameDataHashCIter;
299 typedef FrameDataHash::iterator FrameDataHashIter;
301 lunchbox::Lockable< FrameDataHash > _frameDatas;
308 void _finishFrame(
const uint32_t frameNumber )
const;
309 void _frameFinish(
const uint128_t& frameID,
310 const uint32_t frameNumber );
312 void _flushObjects();
315 bool _cmdCreatePipe( co::ICommand& command );
316 bool _cmdDestroyPipe( co::ICommand& command );
317 bool _cmdConfigInit( co::ICommand& command );
318 bool _cmdConfigExit( co::ICommand& command );
319 bool _cmdFrameStart( co::ICommand& command );
320 bool _cmdFrameFinish( co::ICommand& command );
321 bool _cmdFrameDrawFinish( co::ICommand& command );
322 bool _cmdFrameTasksFinish( co::ICommand& command );
323 bool _cmdFrameDataTransmit( co::ICommand& command );
324 bool _cmdFrameDataReady( co::ICommand& command );
325 bool _cmdSetAffinity( co::ICommand& command );
327 LB_TS_VAR( _nodeThread );
328 LB_TS_VAR( _commandThread );
virtual bool processEvent(const Event &event)
Process a received event.
A configuration is a visualization session driven by an application.
Event structure to report window system and other events.
virtual void setDirty(const uint64_t bits)
virtual void frameDrawFinish(const uint128_t &frameID, const uint32_t frameNumber)
Finish drawing.
void waitFrameStarted(const uint32_t frameNumber) const
Wait for a frame to be started.
void releaseFrameLocal(const uint32_t frameNumber)
Release the local synchronization of the parent for a frame.
virtual ~Node()
Destruct the node.
A Node represents a single computer in the cluster.
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
void startFrame(const uint32_t frameNumber)
Start a frame by unlocking all child resources.
virtual bool configInit(const uint128_t &initID)
Initialize this node.
lunchbox::RefPtr< Client > ClientPtr
A reference-counted pointer to an eq::Client.
virtual void frameFinish(const uint128_t &frameID, const uint32_t frameNumber)
Finish rendering a frame.
virtual bool configExit()
Exit this node.
void releaseFrame(const uint32_t frameNumber)
Signal the completion of a frame to the parent.
lunchbox::RefPtr< FrameData > FrameDataPtr
A reference-counted pointer to an eq::FrameData.
virtual void frameTasksFinish(const uint128_t &frameID, const uint32_t frameNumber)
Finish all rendering tasks.
virtual void frameStart(const uint128_t &frameID, const uint32_t frameNumber)
Start rendering a frame.
Base data transport class for nodes.
Node(Config *parent)
Construct a new node.