Equalizer
1.4.1
|
Base data class for a configuration. More...
#include <config.h>
Classes | |
struct | BackupData |
Public Member Functions | |
virtual void | output (std::ostream &) const |
void | create (O **observer) |
void | release (O *observer) |
void | create (L **layout) |
void | release (L *layout) |
void | create (CV **canvas) |
void | release (CV *canvas) |
void | create (N **node) |
void | release (N *node) |
Data Access | |
EQFABRIC_INL lunchbox::RefPtr< S > | getServer () |
EQFABRIC_INL lunchbox::RefPtr < const S > | 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 N * | findAppNode () |
EQFABRIC_INL const N * | findAppNode () const |
EQFABRIC_INL VisitorResult | accept (V &visitor) |
Traverse this config and all children using a config visitor. | |
EQFABRIC_INL VisitorResult | accept (V &visitor) const |
Const-version of accept(). | |
template<typename T > | |
EQFABRIC_INL T * | find (const uint128_t &id) |
template<typename T > | |
EQFABRIC_INL const T * | find (const uint128_t &id) const |
template<typename T > | |
EQFABRIC_INL T * | find (const std::string &name) |
template<typename T > | |
EQFABRIC_INL const T * | find (const std::string &name) const |
O * | getObserver (const ObserverPath &path) |
L * | getLayout (const LayoutPath &path) |
CV * | getCanvas (const CanvasPath &path) |
template<typename T > | |
void | find (const uint128_t &id, T **result) |
template<typename T > | |
void | find (const std::string &name, const T **result) const |
virtual void | updateCanvas (CV *) |
virtual void | exitCanvas (CV *) |
Operations | |
virtual void | setLatency (const uint32_t latency) |
Set the maximum accepted latency for this config. | |
uint32_t | getLatency () const |
virtual EQFABRIC_INL void | restore () |
Public Types | |
typedef std::vector< O * > | Observers |
A vector of observers. | |
typedef std::vector< L * > | Layouts |
A vector of layouts. | |
typedef std::vector< CV * > | Canvases |
A vector of canvases. | |
typedef std::vector< N * > | Nodes |
A vector of nodes. | |
Protected Member Functions | |
EQFABRIC_INL | Config (lunchbox::RefPtr< S > parent) |
virtual EQFABRIC_INL void | attach (const UUID &id, const uint32_t instanceID) |
virtual EQFABRIC_INL void | serialize (co::DataOStream &os, const uint64_t dirtyBits) |
Worker for pack() and getInstanceData(). | |
virtual EQFABRIC_INL void | deserialize (co::DataIStream &is, const uint64_t dirtyBits) |
Worker for unpack() and applyInstanceData(). | |
virtual EQFABRIC_INL void | notifyDetach () |
Notify that this object will be deregistered or unmapped. | |
virtual void | _removeChild (const UUID &) |
void | setAppNodeID (const co::NodeID &nodeID) |
const co::NodeID & | getAppNodeID () const |
virtual void | changeLatency (const uint32_t) |
virtual bool | mapViewObjects () const |
virtual bool | mapNodeObjects () const |
virtual VisitorResult | _acceptCompounds (V &) |
virtual VisitorResult | _acceptCompounds (V &) const |
N * | _findNode (const uint128_t &id) |
virtual EQFABRIC_INL uint128_t | commit (const uint32_t incarnation=CO_COMMIT_NEXT) |
Commit a new version of this object. | |
Friends | |
class | Server |
class | Observer |
class | Layout |
class | Canvas |
class | Node |
template<class C2 , class V2 > | |
VisitorResult | _acceptImpl (C2 *, V2 &) |
Attributes | |
enum | FAttribute { FATTR_EYE_BASE, FATTR_VERSION, FATTR_LAST, FATTR_ALL = FATTR_LAST + 5 } |
Floating-point attributes. More... | |
enum | IAttribute { IATTR_ROBUSTNESS, IATTR_LAST, IATTR_ALL = IATTR_LAST + 5 } |
Integer attributes. More... | |
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 |
static const std::string & | getFAttributeString (const FAttribute attr) |
static const std::string & | getIAttributeString (const IAttribute attr) |
Base data class for a configuration.
Definition at line 33 of file include/eq/fabric/config.h.
enum eq::fabric::Config::FAttribute |
Floating-point attributes.
FATTR_EYE_BASE |
The default interocular distance in meters. |
FATTR_VERSION |
The version of the file loaded. |
Definition at line 128 of file include/eq/fabric/config.h.
enum eq::fabric::Config::IAttribute |
Integer attributes.
Definition at line 137 of file include/eq/fabric/config.h.
EQFABRIC_INL VisitorResult eq::fabric::Config< S, C, O, L, CV, N, V >::accept | ( | V & | visitor | ) |
Traverse this config and all children using a config visitor.
visitor | the visitor. |
EQFABRIC_INL VisitorResult eq::fabric::Config< S, C, O, L, CV, N, V >::accept | ( | V & | visitor | ) | const |
Const-version of accept().
virtual EQFABRIC_INL uint128_t eq::fabric::Config< S, C, O, L, CV, N, V >::commit | ( | const uint32_t | incarnation = CO_COMMIT_NEXT | ) | [protected, virtual] |
Commit a new version of this object.
Objects using the change type STATIC can not be committed.
Master instances will increment new versions continously, starting at VERSION_FIRST. If the object has not changed, no new version will be generated, that is, the current version is returned. The high value of the returned version will always be 0.
Slave objects can be commited, but have certain caveats for serialization. Please refer to the Programming Guide for more details. Slave object commits will return a random version on a successful commit, or VERSION_NONE if the object has not changed since the last commit. The high value of a successful commit will never be 0.
The incarnation count is meaningful for buffered master objects. The commit implementation will keep all instance data committed with an incarnation count newer than current_incarnation - getAutoObsolete()
. By default, each call to commit creates a new incarnation, retaining the data from last getAutoObsolete() commit calls. When the application wishes to auto obsolete by another metric than commit calls, it has to consistently provide an incarnation counter. Buffers with a higher incarnation count than the current are discarded. A typical use case is to tie the auto obsoletion to an application-specific frame loop. Decreasing the incarnation counter will lead to undefined results.
incarnation | the commit incarnation for auto obsoletion. |
Reimplemented from eq::fabric::Object.
virtual EQFABRIC_INL void eq::fabric::Config< S, C, O, L, CV, N, V >::deserialize | ( | co::DataIStream & | , |
const uint64_t | |||
) | [protected, virtual] |
Worker for unpack() and applyInstanceData().
This function is called with the dirty bits send by the master instance. The dirty bits are received beforehand, and do not need to be deserialized by the overriding method.
Reimplemented from eq::fabric::Object.
EQFABRIC_INL T* eq::fabric::Config< S, C, O, L, CV, N, V >::find | ( | const uint128_t & | id | ) |
EQFABRIC_INL const T* eq::fabric::Config< S, C, O, L, CV, N, V >::find | ( | const uint128_t & | id | ) | const |
EQFABRIC_INL T* eq::fabric::Config< S, C, O, L, CV, N, V >::find | ( | const std::string & | name | ) |
EQFABRIC_INL const T* eq::fabric::Config< S, C, O, L, CV, N, V >::find | ( | const std::string & | name | ) | const |
const Canvases& eq::fabric::Config< S, C, O, L, CV, N, V >::getCanvases | ( | ) | const [inline] |
Definition at line 56 of file include/eq/fabric/config.h.
float eq::fabric::Config< S, C, O, L, CV, N, V >::getFAttribute | ( | const FAttribute | attr | ) | const [inline] |
Definition at line 152 of file include/eq/fabric/config.h.
int32_t eq::fabric::Config< S, C, O, L, CV, N, V >::getIAttribute | ( | const IAttribute | attr | ) | const [inline] |
Definition at line 156 of file include/eq/fabric/config.h.
uint32_t eq::fabric::Config< S, C, O, L, CV, N, V >::getLatency | ( | ) | const [inline] |
Definition at line 182 of file include/eq/fabric/config.h.
const Layouts& eq::fabric::Config< S, C, O, L, CV, N, V >::getLayouts | ( | ) | const [inline] |
Definition at line 53 of file include/eq/fabric/config.h.
const Nodes& eq::fabric::Config< S, C, O, L, CV, N, V >::getNodes | ( | ) | const [inline] |
Definition at line 68 of file include/eq/fabric/config.h.
const Observers& eq::fabric::Config< S, C, O, L, CV, N, V >::getObservers | ( | ) | const [inline] |
Definition at line 50 of file include/eq/fabric/config.h.
EQFABRIC_INL lunchbox::RefPtr< S > eq::fabric::Config< S, C, O, L, CV, N, V >::getServer | ( | ) |
EQFABRIC_INL lunchbox::RefPtr< const S > eq::fabric::Config< S, C, O, L, CV, N, V >::getServer | ( | ) | const |
virtual EQFABRIC_INL void eq::fabric::Config< S, C, O, L, CV, N, V >::notifyDetach | ( | ) | [protected, virtual] |
Notify that this object will be deregistered or unmapped.
The method is called from the thread initiating the deregistration or unmapping, before the operation is executed.
Reimplemented from eq::fabric::Object.
Reimplemented in eq::Config.
virtual EQFABRIC_INL void eq::fabric::Config< S, C, O, L, CV, N, V >::serialize | ( | co::DataOStream & | , |
const uint64_t | |||
) | [protected, virtual] |
Worker for pack() and getInstanceData().
Override this and deserialize() if you want to distribute subclassed data.
This method is called with DIRTY_ALL from getInstanceData() and with the actual dirty bits from pack(), which also resets the dirty state afterwards. The dirty bits are transmitted beforehand, and do not need to be transmitted by the overriding method.
Reimplemented from eq::fabric::Object.
virtual void eq::fabric::Config< S, C, O, L, CV, N, V >::setLatency | ( | const uint32_t | latency | ) | [virtual] |
Set the maximum accepted latency for this config.
The latency is defined as the maximum number of frames between the start of a frame and the finish of the last rendering task for that frame. Setting the latency of a running config finishes all pending frames.
latency | the latency. |
Reimplemented in eq::Config.