Equalizer  1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
eq::Client Class Reference

The client represents a network node of the application in the cluster. More...

#include <client.h>

+ Inheritance diagram for eq::Client:
+ Collaboration diagram for eq::Client:

Public Member Functions

EQ_API Client ()
 Construct a new client. More...
 
EQ_API bool connectServer (ServerPtr server)
 Open and connect an Equalizer server to the local client. More...
 
EQ_API bool disconnectServer (ServerPtr server)
 Disconnect and close the connection to an Equalizer server. More...
 
virtual EQ_API bool initLocal (const int argc, char **argv)
 Initialize a local, listening node. More...
 
virtual EQ_API bool exitLocal ()
 De-initialize a local, listening node. More...
 
EQ_API bool hasCommands ()
 
virtual EQ_API co::CommandQueue * getMainThreadQueue ()
 
const Strings & getActiveLayouts ()
 
const std::string & getGPUFilter () const
 
float getModelUnit () const
 
- Public Member Functions inherited from eq::fabric::Client
EQFABRIC_API bool connectServer (co::NodePtr server)
 Open and connect an Equalizer server to the local client. More...
 
EQFABRIC_API bool disconnectServer (co::NodePtr server)
 Disconnect and close the connection to an Equalizer server. More...
 
EQFABRIC_API void processCommand (const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
 Get and process one pending command from the node command queue. More...
 
virtual EQFABRIC_API bool dispatchCommand (co::ICommand &command)
 

Protected Member Functions

virtual EQ_API ~Client ()
 Destruct the client. More...
 
virtual EQ_API void clientLoop ()
 Implements the processing loop for render clients. More...
 
virtual EQ_API void exitClient ()
 Exit the process cleanly on render clients. More...
 
- Protected Member Functions inherited from eq::fabric::Client
EQFABRIC_API Client ()
 Construct a new client.
 

Detailed Description

The client represents a network node of the application in the cluster.

The methods initLocal() and exitLocal() should be used to set up and exit the listening node instance for each application process.

See Also
fabric::Client for public methods

Definition at line 39 of file client/client.h.

Constructor & Destructor Documentation

EQ_API eq::Client::Client ( )

Construct a new client.

Version
1.0
virtual EQ_API eq::Client::~Client ( )
protectedvirtual

Destruct the client.

Version
1.0

Reimplemented from eq::fabric::Client.

Member Function Documentation

virtual EQ_API void eq::Client::clientLoop ( )
protectedvirtual

Implements the processing loop for render clients.

As long as the node is running, that is, between initLocal() and an exit send from the server, this method executes received commands using processCommand() and triggers the message pump between commands.

See Also
Pipe::createMessagePump()
Version
1.0
EQ_API bool eq::Client::connectServer ( ServerPtr  server)

Open and connect an Equalizer server to the local client.

The client has to be in the listening state, see initLocal(). Not thread safe.

Parameters
serverthe server.
Returns
true if the server was connected, false if not.
Version
1.0
EQ_API bool eq::Client::disconnectServer ( ServerPtr  server)

Disconnect and close the connection to an Equalizer server.

Not thread safe.

Parameters
serverthe server.
Returns
true if the server was disconnected, false if not.
Version
1.0
virtual EQ_API void eq::Client::exitClient ( )
protectedvirtual

Exit the process cleanly on render clients.

Version
1.0
virtual EQ_API bool eq::Client::exitLocal ( )
virtual

De-initialize a local, listening node.

Version
1.1.6
virtual EQ_API co::CommandQueue* eq::Client::getMainThreadQueue ( )
virtual
Returns
the command queue to the main node thread.

Implements eq::fabric::Client.

EQ_API bool eq::Client::hasCommands ( )
Returns
true if the client has commands pending, false otherwise.
Version
1.0
virtual EQ_API bool eq::Client::initLocal ( const int  argc,
char **  argv 
)
virtual

Initialize a local, listening node.

The –eq-client, –eq-layout and –eq-modelunit command line options are recognized by this method.

–eq-client is used for remote nodes which have been auto-launched by another node, e.g., remote render clients. This method does not return when this command line option is present.

–eq-layout can apply multiple times. Each instance has to be followed by the name of a layout. The given layouts will be activated on all canvases using them during Config::init().

–eq-modelunit is used for scaling the rendered models in all views. The model unit defines the size of the model wrt the virtual room unit which is always in meter. The default unit is 1 (1 meter or EQ_M).

Parameters
argcthe command line argument count.
argvthe command line argument values.
Returns
true if the client was successfully initialized, false otherwise.
Version
1.0

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