Equalizer  1.6.1
Public Member Functions | Protected Member Functions | List of all members
eqPly::Config Class Reference

The configuration, run be the EqPly application. More...

#include <config.h>

+ Inheritance diagram for eqPly::Config:
+ Collaboration diagram for eqPly::Config:

Public Member Functions

 Config (eq::ServerPtr parent)
 
virtual bool init ()
 
virtual bool exit ()
 
virtual uint32_t startFrame ()
 
void setInitData (const LocalInitData &data)
 
const InitData & getInitData () const
 
bool loadData (const eq::uint128_t &initDataID)
 Map per-config data to the local node process.
 
const Model * getModel (const eq::uint128_t &id)
 
virtual bool handleEvent (const eq::ConfigEvent *event)
 
virtual bool handleEvent (eq::EventICommand command)
 Handle one config event. More...
 
bool isIdleAA ()
 
bool needRedraw ()
 
uint32_t getAnimationFrame ()
 
- Public Member Functions inherited from eq::Config
 Config (ServerPtr parent)
 Construct a new config. More...
 
void setupMessagePump (Pipe *pipe)
 
void setupServerConnections (const std::string &connectionData)
 
ClientPtr getClient ()
 
ConstClientPtr getClient () const
 
co::NodePtr getApplicationNode ()
 
co::CommandQueue * getMainThreadQueue ()
 
co::CommandQueue * getCommandThreadQueue ()
 
uint32_t getCurrentFrame () const
 
uint32_t getFinishedFrame () const
 
GLStats::Data getStatistics () const
 
bool isRunning () const
 
void stopRunning ()
 Stop the config. More...
 
int64_t getTime () const
 Get the current time in milliseconds. More...
 
MessagePump * getMessagePump ()
 
const Channel * findChannel (const std::string &name) const
 
virtual bool init (const uint128_t &initID)
 Initialize this configuration. More...
 
bool update ()
 Update the configuration. More...
 
virtual void setLatency (const uint32_t latency)
 
virtual bool registerObject (co::Object *object)
 Register a distributed object. More...
 
virtual void deregisterObject (co::Object *object)
 Deregister a distributed object. More...
 
virtual bool mapObject (co::Object *object, const UUID &id, const uint128_t &version=co::VERSION_OLDEST)
 Map a distributed object. More...
 
virtual uint32_t mapObjectNB (co::Object *object, const UUID &id, const uint128_t &version=co::VERSION_OLDEST)
 Start mapping a distributed object. More...
 
virtual uint32_t mapObjectNB (co::Object *object, const UUID &id, const uint128_t &version, co::NodePtr master)
 Start mapping a distributed object from a known master. More...
 
virtual bool mapObjectSync (const uint32_t requestID)
 Finalize the mapping of a distributed object. More...
 
virtual void unmapObject (co::Object *object)
 Unmap a mapped object. More...
 
void releaseObject (co::Object *object)
 Convenience method to deregister or unmap an object. More...
 
virtual uint32_t startFrame (const uint128_t &frameID)
 Request a new frame of rendering. More...
 
virtual uint32_t finishFrame ()
 Finish the rendering of a frame. More...
 
virtual uint32_t finishAllFrames ()
 Finish rendering all pending frames. More...
 
void releaseFrameLocal (const uint32_t frameNumber)
 Release the local synchronization of the config for a frame. More...
 
void stopFrames ()
 Asynchronously signal all channels to interrupt their rendering. More...
 
const ConfigEvent * nextEvent ()
 Get the next event. More...
 
const ConfigEvent * tryNextEvent ()
 Try to get the next event. More...
 
void sendEvent (ConfigEvent &event)
 Send an (old) event to the application node. More...
 
EventOCommand sendEvent (const uint32_t type)
 Send an event to the application node. More...
 
EventICommand getNextEvent (const uint32_t timeout=LB_TIMEOUT_INDEFINITE) const
 Get the next event. More...
 
bool checkEvent () const
 
virtual void handleEvents ()
 Handle all config events. More...
 
void addStatistic (const uint32_t originator, const Statistic &stat)
 Add an statistic event to the statistics overlay. More...
 
- Public Member Functions inherited from eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >
virtual void output (std::ostream &) const
 
void create (Observer **observer)
 
void create (Layout **layout)
 
void create (Canvas **canvas)
 
void create (Node **node)
 
void release (Observer *observer)
 
void release (Layout *layout)
 
void release (Canvas *canvas)
 
void release (Node *node)
 
EQFABRIC_INL lunchbox::RefPtr
< Server > 
getServer ()
 
EQFABRIC_INL lunchbox::RefPtr
< const Server > 
getServer () const
 
const Observers & getObservers () const
 
const Layouts & getLayouts () const
 
const Canvases & getCanvases () const
 
EQFABRIC_INL uint32_t getTimeout () const
 
const Nodes & getNodes () const
 
EQFABRIC_INL Node * findAppNode ()
 
EQFABRIC_INL const Node * findAppNode () const
 
EQFABRIC_INL VisitorResult accept (ConfigVisitor &visitor)
 Perform a depth-first traversal of this config. More...
 
EQFABRIC_INL VisitorResult accept (ConfigVisitor &visitor) const
 Const-version of accept(). More...
 
EQFABRIC_INL T * find (const uint128_t &id)
 
EQFABRIC_INL const T * find (const uint128_t &id) const
 
EQFABRIC_INL T * find (const std::string &name)
 
EQFABRIC_INL const T * find (const std::string &name) const
 
void find (const uint128_t &id, T **result)
 
void find (const std::string &name, const T **result) const
 
Observer * getObserver (const ObserverPath &path)
 
Layout * getLayout (const LayoutPath &path)
 
Canvas * getCanvas (const CanvasPath &path)
 
virtual void updateCanvas (Canvas *)
 
virtual void exitCanvas (Canvas *)
 
uint32_t getLatency () const
 
virtual EQFABRIC_INL void restore ()
 
void setFAttribute (const FAttribute attr, const float value)
 
void setIAttribute (const IAttribute attr, const int32_t value)
 
float getFAttribute (const FAttribute attr) const
 
int32_t getIAttribute (const IAttribute attr) const
 
- Public Member Functions inherited from eq::fabric::Object
virtual bool isDirty () const
 
virtual void backup ()
 
void setName (const std::string &name)
 Set the name of the object. More...
 
const std::string & getName () const
 
void setUserData (co::Object *userData)
 Set user-specific data. More...
 
co::Object * getUserData ()
 
const co::Object * getUserData () const
 
void setError (const int32_t error)
 Set an error code why the last operation failed. More...
 
eq::fabric::Error getError () const
 
uint32_t getTasks () const
 Return the set of tasks this channel might execute in the worst case. More...
 
uint32_t getSerial () const
 

Protected Member Functions

virtual ~Config ()
 Destruct a config. More...
 
virtual co::uint128_t sync (const co::uint128_t &version=co::VERSION_HEAD)
 Synchronize config and admin copy. More...
 
- Protected Member Functions inherited from eq::Config
virtual void attach (const UUID &id, const uint32_t instanceID)
 
virtual void notifyAttached ()
 
virtual void notifyDetach ()
 
virtual void changeLatency (const uint32_t latency)
 
virtual bool mapViewObjects () const
 
- Protected Member Functions inherited from eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >
EQFABRIC_INL Config (lunchbox::RefPtr< Server > parent)
 
virtual EQFABRIC_INL void serialize (co::DataOStream &os, const uint64_t dirtyBits)
 
virtual EQFABRIC_INL void deserialize (co::DataIStream &is, const uint64_t dirtyBits)
 
virtual void _removeChild (const UUID &)
 
void setAppNodeID (const co::NodeID &nodeID)
 
const co::NodeID & getAppNodeID () const
 
virtual bool mapNodeObjects () const
 
virtual VisitorResult _acceptCompounds (ConfigVisitor &)
 
virtual VisitorResult _acceptCompounds (ConfigVisitor &) const
 
Node * _findNode (const uint128_t &id)
 
virtual EQFABRIC_INL uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT)
 
- Protected Member Functions inherited from eq::fabric::Object
 Object ()
 Construct a new Object. More...
 
virtual ~Object ()
 Destruct the object. More...
 
virtual bool hasMasterUserData ()
 
virtual uint32_t getUserDataLatency () const
 
void setTasks (const uint32_t tasks)
 
void postRemove (Object *child)
 
virtual void removeChild (const UUID &)
 
template<class C , class S >
void commitChild (C *child, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChild (C *child, const uint32_t incarnation)
 
template<class C , class S >
void commitChildren (const std::vector< C * > &children, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, const uint32_t incarnation)
 
template<class C >
void syncChildren (const std::vector< C * > &children)
 
template<class P , class C >
void releaseChildren (const std::vector< C * > &children)
 
bool _cmdSync (co::ICommand &command)
 

Additional Inherited Members

- Public Types inherited from eq::Config
typedef fabric::Config< Server,
Config, Observer, Layout,
Canvas, Node, ConfigVisitor > 
Super
 base class
 
- Public Types inherited from eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >
typedef std::vector< Observer * > Observers
 A vector of observers.
 
typedef std::vector< Layout * > Layouts
 A vector of layouts.
 
typedef std::vector< Canvas * > Canvases
 A vector of canvases.
 
typedef std::vector< Node * > Nodes
 A vector of nodes.
 
enum  FAttribute
 Floating-point attributes.
 
enum  IAttribute
 Integer attributes. More...
 
- Public Types inherited from eq::fabric::Object
enum  DirtyBits {
  DIRTY_NAME = Serializable::DIRTY_CUSTOM << 0, DIRTY_USERDATA = Serializable::DIRTY_CUSTOM << 1, DIRTY_ERROR = Serializable::DIRTY_CUSTOM << 2, DIRTY_TASKS = Serializable::DIRTY_CUSTOM << 3,
  DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 4, DIRTY_SERIAL = Serializable::DIRTY_CUSTOM << 5, DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 6, DIRTY_OBJECT_BITS = DIRTY_NAME | DIRTY_USERDATA | DIRTY_ERROR
}
 The changed parts of the object since the last pack(). More...
 
- Static Public Member Functions inherited from eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >
static const std::string & getFAttributeString (const FAttribute attr)
 
static const std::string & getIAttributeString (const IAttribute attr)
 

Detailed Description

The configuration, run be the EqPly application.

A configuration instance manages configuration-specific data: it distributes the initialization and model data, updates frame-specific data and manages frame generation based on event handling.

Definition at line 53 of file share/Equalizer/examples/eqPly/config.h.

Constructor & Destructor Documentation

eqPly::Config::~Config ( )
protectedvirtual

Destruct a config.

Version
1.0

Reimplemented from eq::Config.

Definition at line 55 of file eqPly/config.cpp.

Member Function Documentation

bool eqPly::Config::exit ( )
virtual
See Also
eq::Config::exit.

Reimplemented from eq::Config.

Definition at line 105 of file eqPly/config.cpp.

References eq::Config::exit().

Referenced by eqPly::EqPly::run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t eqPly::Config::getAnimationFrame ( )
Returns
the current animation frame number.

Definition at line 326 of file eqPly/config.cpp.

Referenced by eqPly::EqPly::run().

+ Here is the caller graph for this function:

const Model * eqPly::Config::getModel ( const eq::uint128_t &  id)
bool eqPly::Config::handleEvent ( const eq::ConfigEvent *  event)
virtual
bool eqPly::Config::handleEvent ( eq::EventICommand  command)
virtual

Handle one config event.

Thread safe.

Parameters
commandthe event command.
Returns
true if the event requires a redraw, false if not.
Version
1.5.1

Reimplemented from eq::Config.

Definition at line 493 of file eqPly/config.cpp.

References eq::EventICommand::getEventType(), and eq::Config::handleEvent().

+ Here is the call graph for this function:

bool eqPly::Config::init ( )
virtual
bool eqPly::Config::isIdleAA ( )
Returns
true if the application is idling.

Definition at line 316 of file eqPly/config.cpp.

bool eqPly::Config::needRedraw ( )
Returns
true if an event required a redraw.

Definition at line 321 of file eqPly/config.cpp.

Referenced by eqPly::EqPly::run().

+ Here is the caller graph for this function:

uint32_t eqPly::Config::startFrame ( )
virtual
See Also
eq::Config::startFrame.

Definition at line 273 of file eqPly/config.cpp.

References eq::Config::startFrame().

Referenced by eqPly::EqPly::run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

co::uint128_t eqPly::Config::sync ( const co::uint128_t &  version = co::VERSION_HEAD)
protectedvirtual

Synchronize config and admin copy.

Definition at line 796 of file eqPly/config.cpp.


The documentation for this class was generated from the following files: