Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Connector Class Reference

#include <Connector.h>

Collaboration diagram for Connector:

Collaboration graph
[legend]
List of all members.

Detailed Description

The Connector is the main class of the Connector.

It is the controller or handler.

Definition at line 22 of file Connector.h.

Public Methods

 Connector ()
 The Connector empty Constructor, uses the default port to listen on.

virtual ~Connector ()
 Destructor, disconnects all connections and stops listening on ports.

 Connector (int start)
 Constructor, specify a starting port.

 Connector (int inputPort, int outputPort, int filterPort, int configPort)
 Constructor, explicitly specify inputPort, outputPort, filterPort, configPort.

int lastUpdate ()
 lastUpdate returns when last updated

void lastChange ()
 sends the last Change Status to the Current ConfigConnection

void updated ()
 update the time of last Updated.

list< ConnectionWrap * > * getConnectionList ()
 Retrieves a list of non config connections.

void disconnect (int fd)
 disconnect from filehandle fd (e.g.

void unPatch (int fhFrom, int fhTo)
 unpatch from filehandle fhFrom to fhTo

void patch (int fhFrom, int fhTo)
 patch a connection between fhFrom to fhTo

void sendUpdate ()
 sends the update to the current Config Connection

void process ()
 Process - iterates through one cycle of move audio, check connections and disconnections.

void shutDown ()
 Tells the server to shutdown, not necessarily immediately.

bool done ()
 is the Connector done (shutdown)?


Private Methods

void init (int inputPort, int outputPort, int filterPort, int configPort)

Private Attributes

bool quit
void * messageExecutor
list< ConnectionWrap * > * allConnections
list< ConfigConnection * > * configConnections
ConfigConnectioncurrentConfig
ConnectionFactoryconnectionFactory
BufferedFileFactorybf
int lastUpdated
int processUpdate


Constructor & Destructor Documentation

Connector::Connector  
 

The Connector empty Constructor, uses the default port to listen on.

Definition at line 7 of file Connector.C.

References DEFAULT_PORT, and init().

Connector::~Connector   [virtual]
 

Destructor, disconnects all connections and stops listening on ports.

Definition at line 10 of file Connector.C.

References allConnections, bf, configConnections, connectionFactory, currentConfig, and messageExecutor.

Connector::Connector int    start
 

Constructor, specify a starting port.

Definition at line 45 of file Connector.C.

References init().

Connector::Connector int    inputPort,
int    outputPort,
int    filterPort,
int    configPort
 

Constructor, explicitly specify inputPort, outputPort, filterPort, configPort.

Definition at line 48 of file Connector.C.

References init().


Member Function Documentation

void Connector::disconnect int    fd
 

disconnect from filehandle fd (e.g.

connection id).

Definition at line 80 of file Connector.C.

References allConnections, ConnectionWrap::disconnect(), and updated().

Referenced by MessageExecutor::executeMessage().

bool Connector::done  
 

is the Connector done (shutdown)?

Definition at line 266 of file Connector.C.

References quit.

Referenced by main().

list< ConnectionWrap * > * Connector::getConnectionList  
 

Retrieves a list of non config connections.

Definition at line 77 of file Connector.C.

References allConnections.

void Connector::init int    inputPort,
int    outputPort,
int    filterPort,
int    configPort
[private]
 

Definition at line 51 of file Connector.C.

References allConnections, bf, configConnections, connectionFactory, lastUpdated, messageExecutor, processUpdate, quit, and updated().

Referenced by Connector().

void Connector::lastChange  
 

sends the last Change Status to the Current ConfigConnection

Definition at line 65 of file Connector.C.

References currentConfig, lastUpdate(), and ConfigConnection::write().

Referenced by MessageExecutor::executeMessage().

int Connector::lastUpdate  
 

lastUpdate returns when last updated

Definition at line 62 of file Connector.C.

References lastUpdated.

Referenced by lastChange(), and sendUpdate().

void Connector::patch int    fhFrom,
int    fhTo
 

patch a connection between fhFrom to fhTo

Definition at line 125 of file Connector.C.

References allConnections, ConnectionWrap::connectFrom(), ConnectionWrap::readable(), and updated().

Referenced by MessageExecutor::executeMessage().

void Connector::process  
 

Process - iterates through one cycle of move audio, check connections and disconnections.

Definition at line 177 of file Connector.C.

References allConnections, bf, Clock::clock, ConnectionU::configConn, CONFIGCONN, configConnections, ConnectionWrap::conn, connectionFactory, currentConfig, ConnectionU::floatConn, Connection< float >::getFileHandle(), ConfigConnection::getMessage(), Message::getXML(), ConnectionFactory::isThereANewConnection(), lastUpdated, messageExecutor, BufferedFileFactory::process(), processUpdate, sendUpdate(), ConnectionWrap::type, updated(), and ConfigConnection::write().

Referenced by main().

void Connector::sendUpdate  
 

sends the update to the current Config Connection

Definition at line 149 of file Connector.C.

References allConnections, configConnections, currentConfig, lastUpdate(), and ConfigConnection::write().

Referenced by MessageExecutor::executeMessage(), and process().

void Connector::shutDown  
 

Tells the server to shutdown, not necessarily immediately.

Definition at line 262 of file Connector.C.

References quit.

Referenced by MessageExecutor::executeMessage().

void Connector::unPatch int    fhFrom,
int    fhTo
 

unpatch from filehandle fhFrom to fhTo

Definition at line 106 of file Connector.C.

References allConnections, ConnectionWrap::disconnectFrom(), and updated().

Referenced by MessageExecutor::executeMessage().

void Connector::updated  
 

update the time of last Updated.

Must be called when state changes.

Definition at line 74 of file Connector.C.

References lastUpdated.

Referenced by disconnect(), init(), patch(), process(), and unPatch().


Member Data Documentation

list<ConnectionWrap *>* Connector::allConnections [private]
 

Definition at line 87 of file Connector.h.

Referenced by disconnect(), getConnectionList(), init(), patch(), process(), sendUpdate(), unPatch(), and ~Connector().

BufferedFileFactory* Connector::bf [private]
 

Definition at line 91 of file Connector.h.

Referenced by init(), process(), and ~Connector().

list<ConfigConnection *>* Connector::configConnections [private]
 

Definition at line 88 of file Connector.h.

Referenced by init(), process(), sendUpdate(), and ~Connector().

ConnectionFactory* Connector::connectionFactory [private]
 

Definition at line 90 of file Connector.h.

Referenced by init(), process(), and ~Connector().

ConfigConnection* Connector::currentConfig [private]
 

Definition at line 89 of file Connector.h.

Referenced by lastChange(), process(), sendUpdate(), and ~Connector().

int Connector::lastUpdated [private]
 

Definition at line 93 of file Connector.h.

Referenced by init(), lastUpdate(), process(), and updated().

void* Connector::messageExecutor [private]
 

Definition at line 86 of file Connector.h.

Referenced by init(), process(), and ~Connector().

int Connector::processUpdate [private]
 

Definition at line 94 of file Connector.h.

Referenced by init(), and process().

bool Connector::quit [private]
 

Definition at line 85 of file Connector.h.

Referenced by done(), init(), and shutDown().


The documentation for this class was generated from the following files:
Generated on Tue Dec 17 21:14:39 2002 for AUSS_Connector by doxygen1.2.18