26 #include <eq/fabric/config.h>
27 #include <co/objectHandler.h>
31 namespace detail {
class Config; }
56 Node, ConfigVisitor >,
57 public co::ObjectHandler
83 EQ_API co::CommandQueue* getMainThreadQueue();
84 EQ_API co::CommandQueue* getCommandThreadQueue();
93 EQ_API GLStats::Data getStatistics()
const;
115 EQ_API int64_t
getTime()
const;
121 const Channel* findChannel(
const std::string& name )
const
122 {
return find< Channel >( name ); }
150 EQ_API
virtual bool init(
const uint128_t& initID );
166 EQ_API
virtual bool exit();
190 EQ_API
void setLatency(
const uint32_t latency )
override;
222 EQ_API
virtual bool mapObject( co::Object*
object,
const uint128_t&
id,
223 const uint128_t& version = co::VERSION_OLDEST );
227 EQ_API
virtual uint32_t
mapObjectNB( co::Object*
object,
const uint128_t&
id,
228 const uint128_t& version = co::VERSION_OLDEST );
233 const uint128_t& version,
234 co::NodePtr master )
override;
237 EQ_API
bool mapObjectSync(
const uint32_t requestID )
override;
246 EQ_API
void unmapObject( co::Object*
object )
override;
254 EQ_API f_bool_t
syncObject( co::Object*
object, co::NodePtr master,
256 const uint32_t instanceID = CO_INSTANCE_ALL)
override;
277 EQ_API
virtual uint32_t
startFrame(
const uint128_t& frameID );
399 EQ_API EventOCommand
sendEvent(
const uint32_t type );
408 EQ_API EventOCommand
sendError(
const uint32_t type,
const Error& error );
429 LB_TIMEOUT_INDEFINITE )
const;
461 void addStatistic(
const uint32_t originator,
const Statistic& stat );
469 void setupMessagePump(
Pipe* pipe );
472 void setupServerConnections(
const std::string& connectionData );
476 EQ_API
void attach(
const uint128_t&
id,
477 const uint32_t instanceID )
override;
479 EQ_API
void notifyAttached()
override;
480 EQ_API
void notifyDetach()
override;
482 EQ_API
void changeLatency(
const uint32_t latency )
override;
483 EQ_API
bool mapViewObjects()
const override;
486 detail::Config*
const _impl;
491 bool _needsLocalSync()
const;
494 bool _handleEvent(
const Event& event );
495 const ConfigEvent* _convertEvent( co::ObjectICommand command );
498 void _updateStatistics();
502 void _releaseObjects();
505 void _exitMessagePump();
508 bool _cmdSyncClock( co::ICommand& command );
509 bool _cmdCreateNode( co::ICommand& command );
510 bool _cmdDestroyNode( co::ICommand& command );
511 bool _cmdInitReply( co::ICommand& command );
512 bool _cmdExitReply( co::ICommand& command );
513 bool _cmdUpdateVersion( co::ICommand& command );
514 bool _cmdUpdateReply( co::ICommand& command );
515 bool _cmdReleaseFrameLocal( co::ICommand& command );
516 bool _cmdFrameFinish( co::ICommand& command );
517 bool _cmdSwapObject( co::ICommand& command );
521 #endif // EQ_CONFIG_H
EQ_API EventOCommand sendError(const uint32_t type, const Error &error)
Send an error event to the application node.
virtual EQ_API bool init(const uint128_t &initID)
Initialize this configuration.
A visitor to traverse configs and all children.
A channel represents a two-dimensional viewport within a Window.
EQ_API bool isRunning() const
void addStatistic(const uint32_t originator, const Statistic &stat)
Add an statistic event to the statistics overlay.
A configuration is a visualization session driven by an application.
Proxy object for the connection to an Equalizer server.
A canvas represents a logical 2D projection surface.
EQ_API EventICommand getNextEvent(const uint32_t timeout=LB_TIMEOUT_INDEFINITE) const
Get the next event.
virtual EQ_API uint32_t finishFrame()
Finish the rendering of a frame.
EQ_API uint32_t getCurrentFrame() const
EQ_API uint32_t getFinishedFrame() const
virtual EQ_API bool exit()
Exit this configuration.
EQ_API const ConfigEvent * nextEvent()
Get the next event.
A Pipe represents a graphics card (GPU) on a Node.
EQ_API bool registerObject(co::Object *object) override
Register a distributed object.
EQ_API bool update()
Update the configuration.
A Node represents a single computer in the cluster.
EQ_API void stopFrames()
Asynchronously signal all channels to interrupt their rendering.
virtual EQ_API uint32_t startFrame(const uint128_t &frameID)
Request a new frame of rendering.
virtual EQ_API uint32_t mapObjectNB(co::Object *object, const uint128_t &id, const uint128_t &version=co::VERSION_OLDEST)
Start mapping a distributed object.
virtual EQ_API uint32_t finishAllFrames()
Finish rendering all pending frames.
EQ_API int64_t getTime() const
Get the current time in milliseconds.
EQ_API void releaseFrameLocal(const uint32_t frameNumber)
Release the local synchronization of the config for a frame.
EQ_API void sendEvent(ConfigEvent &event)
Send an (old) event to the application node.
EQ_API void unmapObject(co::Object *object) override
Unmap a mapped object.
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
A command specialization for config events.
An interface to process system messages or events.
EQ_API bool mapObjectSync(const uint32_t requestID) override
Finalize the mapping of a distributed object.
EQ_API void setLatency(const uint32_t latency) override
EQ_API MessagePump * getMessagePump()
EQ_API bool checkEvent() const
virtual EQ_API ~Config()
Destruct a config.
virtual EQ_API bool mapObject(co::Object *object, const uint128_t &id, const uint128_t &version=co::VERSION_OLDEST)
Map a distributed object.
lunchbox::RefPtr< Client > ClientPtr
A reference-counted pointer to an eq::Client.
EQ_API Config(ServerPtr parent)
Construct a new config.
The Equalizer client library.
A layout groups one or more View, logically belonging together.
EQ_API ClientPtr getClient()
EQ_API f_bool_t syncObject(co::Object *object, co::NodePtr master, const uint128_t &id, const uint32_t instanceID=CO_INSTANCE_ALL) override
Synchronize the local object with a remote object.
EQ_API co::NodePtr getApplicationNode()
An Observer looks at one or more views from a certain position (head matrix) with a given eye separat...
EQ_API Errors getErrors()
Base data class for a configuration.
EQ_API void deregisterObject(co::Object *object) override
Deregister a distributed object.
EQ_API void stopRunning()
Stop the config.
fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor > Super
base class
virtual EQ_API bool handleEvent(const ConfigEvent *event)
Handle one (old) config event.
lunchbox::RefPtr< const Client > ConstClientPtr
A reference-counted pointer to a const eq::Client.
EQ_API const ConfigEvent * tryNextEvent()
Try to get the next event.
virtual EQ_API void handleEvents()
Handle all config events.