iso::flock::FlockCom Class Reference

#include <iso_flock_com.h>

Collaboration diagram for iso::flock::FlockCom:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void createOSCControl (unsigned int pReceiverPort, const base::String &pSenderIP, unsigned int pSenderPort) throw (FlockException)
 create osc control
void createOSCControl (OSCControl *pControl, unsigned int pReceiverPort, const base::String &pSenderIP, unsigned int pSenderPort) throw (FlockException)
 create osc control
void removeSenders () throw (com::ComException)
 remove all senders with the exception of those involved in osc control
Exceptions:
failed to remove senders

void removeSender (const base::String &pSenderName) throw (com::ComException)
 remove sender
void removeReceivers () throw (com::ComException)
 remove all receivers with the exception of those involved in osc control
Exceptions:
failed to remove receivers

ParameterRegistrationparameterRegistration (com::Sender *pSender, const base::String &pSwarmName, const base::String &pParameterName) throw (FlockException)
 retrieve parameter registration information
QList< ParameterRegistration * > parameterRegistrations (const base::String &pSwarmName, const base::String &pParameterName) const
 return parameter registration information
bool checkParameter (const base::String &pSenderName, const base::String &pSwarmName, const base::String &pParameterName)
 check if parameter is registered for sending
void registerParameter (const base::String &pSenderName, const base::String &pSwarmName, const base::String &pParameterName) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, const base::String &pSwarmName, const base::String &pParameterName, const math::Vector< float > &pMinParValue, const math::Vector< float > &pMaxParValue) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, const base::String &pSwarmName, const base::String &pParameterName, const math::Vector2< int > &pAgentRange) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, const base::String &pSwarmName, const base::String &pParameterName, const math::Vector2< int > &pAgentRange, const math::Vector< float > &pMinParValue, const math::Vector< float > &pMaxParValue) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, unsigned int pSendInterval, const base::String &pSwarmName, const base::String &pParameterName) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, unsigned int pSendInterval, const base::String &pSwarmName, const base::String &pParameterName, const math::Vector< float > &pMinParValue, const math::Vector< float > &pMaxParValue) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, unsigned int pSendInterval, const base::String &pSwarmName, const base::String &pParameterName, const math::Vector2< int > &pAgentRange) throw (FlockException)
 register parameter for sending
void registerParameter (const base::String &pSenderName, unsigned int pSendInterval, const base::String &pSwarmName, const base::String &pParameterName, const math::Vector2< int > &pAgentRange, const math::Vector< float > &pMinParValue, const math::Vector< float > &pMaxParValue) throw (FlockException)
 register parameter for sending
void deregisterParameter (const base::String &pSenderName, const base::String &pSwarmName, const base::String &pParameterName) throw (FlockException)
 deregister parameter from sending
virtual void update () throw (FlockException)
 update messenger
Exceptions:
FlockException failed to update messenger


Static Public Member Functions

static FlockComget ()
 get flock com singleton instance
static void destroy ()
 destroy flock com singleton instance

Protected Member Functions

 FlockCom ()
 default constructor
 ~FlockCom ()
 destructor
bool checkParameterRegistration (com::Sender *pSender, const base::String &pSwarmName, const base::String &pParameterName)
 check if parameter registration for sender already exists
void send () throw (FlockException)
 update senders
Exceptions:
ComException failed to update senders

void sendDefaultMessage (com::Sender *pSender) throw (FlockException)
 send default message
void updateDefaultMessage (ParameterRegistration *pRegistration, com::Message &pMessage) throw (FlockException)
 update default message
void updateDefaultMessage (ParameterRegistration *pRegistration, float *pValueArray, unsigned int pParameterDim, unsigned int pParameterCount, com::Message &pMessage) throw (FlockException)
 update default message
void sendOSCMessage (com::Sender *pSender) throw (FlockException)
 send osc message
void sendOSCMessage (com::Sender *pSender, ParameterRegistration *pRegistration) throw (FlockException)
 update osc sender
void sendOSCMessage (com::Sender *pSender, ParameterRegistration *pRegistration, const base::String &pAddress, Parameter &pParameter) throw (FlockException)
 update osc sender

Protected Attributes

QMultiHash< com::Sender *,
ParameterRegistration * > 
mParameterRegistry
 singleton instance
QTime mTime
 parameter communication registry

Static Protected Attributes

static FlockComsFlockCom

Constructor & Destructor Documentation

FlockCom::FlockCom (  )  [protected]

default constructor

FlockCom::~FlockCom (  )  [protected]

destructor


Member Function Documentation

FlockCom & FlockCom::get (  )  [static]

get flock com singleton instance

Returns:
flock com

void FlockCom::destroy (  )  [static]

destroy flock com singleton instance

void FlockCom::createOSCControl ( unsigned int  pReceiverPort,
const base::String &  pSenderIP,
unsigned int  pSenderPort 
) throw (FlockException)

create osc control

Parameters:
pReceiverPort receiver port number
pSenderIP sender ip address
pSenderPort sender port number
Exceptions:
FlockException failed to create osc control

void FlockCom::createOSCControl ( OSCControl pControl,
unsigned int  pReceiverPort,
const base::String &  pSenderIP,
unsigned int  pSenderPort 
) throw (FlockException)

create osc control

Parameters:
pControl OSCControl
pReceiverPort receiver port number
pSenderIP sender ip address
pSenderPort sender port number
Exceptions:
FlockException failed to create osc control

void FlockCom::removeSenders (  )  throw (com::ComException)

remove all senders with the exception of those involved in osc control

Exceptions:
failed to remove senders

void FlockCom::removeSender ( const base::String &  pSenderName  )  throw (com::ComException)

remove sender

Parameters:
pSenderName name of sender
Exceptions:
failed to remove sender

void FlockCom::removeReceivers (  )  throw (com::ComException)

remove all receivers with the exception of those involved in osc control

Exceptions:
failed to remove receivers

ParameterRegistration * FlockCom::parameterRegistration ( com::Sender *  pSender,
const base::String &  pSwarmName,
const base::String &  pParameterName 
) throw (FlockException)

retrieve parameter registration information

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter
Exceptions:
ComException failed to retrieve paramater registration

QList< ParameterRegistration * > FlockCom::parameterRegistrations ( const base::String &  pSwarmName,
const base::String &  pParameterName 
) const

return parameter registration information

Parameters:
pSwarmName name of swarm / env
pParameterName name of parameter
Returns:
parameter registration information

bool FlockCom::checkParameter ( const base::String &  pSenderName,
const base::String &  pSwarmName,
const base::String &  pParameterName 
)

check if parameter is registered for sending

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
const base::String &  pSwarmName,
const base::String &  pParameterName 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
const base::String &  pSwarmName,
const base::String &  pParameterName,
const math::Vector< float > &  pMinParValue,
const math::Vector< float > &  pMaxParValue 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter
pMinParValue minimum parameter value
pMaxParValue maximum parameter value
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
const base::String &  pSwarmName,
const base::String &  pParameterName,
const math::Vector2< int > &  pAgentRange 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter
pAgentRange range of agents
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
const base::String &  pSwarmName,
const base::String &  pParameterName,
const math::Vector2< int > &  pAgentRange,
const math::Vector< float > &  pMinParValue,
const math::Vector< float > &  pMaxParValue 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter
pAgentRange range of agents
pMinParValue minimum parameter value
pMaxParValue maximum parameter value
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
unsigned int  pSendInterval,
const base::String &  pSwarmName,
const base::String &  pParameterName 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSendInterval send interval
pSwarmName name of swarm
pParameterName name of parameter
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
unsigned int  pSendInterval,
const base::String &  pSwarmName,
const base::String &  pParameterName,
const math::Vector< float > &  pMinParValue,
const math::Vector< float > &  pMaxParValue 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSendInterval send interval
pSwarmName name of swarm
pParameterName name of parameter
pMinParValue minimum parameter value
pMaxParValue maximum parameter value
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
unsigned int  pSendInterval,
const base::String &  pSwarmName,
const base::String &  pParameterName,
const math::Vector2< int > &  pAgentRange 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSendInterval send interval
pSwarmName name of swarm
pParameterName name of parameter
pAgentRange range of agents
Exceptions:
FlockException failed to register parameter

void FlockCom::registerParameter ( const base::String &  pSenderName,
unsigned int  pSendInterval,
const base::String &  pSwarmName,
const base::String &  pParameterName,
const math::Vector2< int > &  pAgentRange,
const math::Vector< float > &  pMinParValue,
const math::Vector< float > &  pMaxParValue 
) throw (FlockException)

register parameter for sending

Parameters:
pSenderName name of sender
pSendInterval send interval
pSwarmName name of swarm
pParameterName name of parameter
pAgentRange range of agents
pMinParValue minimum parameter value
pMaxParValue maximum parameter value
Exceptions:
FlockException failed to register parameter

void FlockCom::deregisterParameter ( const base::String &  pSenderName,
const base::String &  pSwarmName,
const base::String &  pParameterName 
) throw (FlockException)

deregister parameter from sending

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter

void FlockCom::update (  )  throw (FlockException) [virtual]

update messenger

Exceptions:
FlockException failed to update messenger

bool FlockCom::checkParameterRegistration ( com::Sender *  pSender,
const base::String &  pSwarmName,
const base::String &  pParameterName 
) [protected]

check if parameter registration for sender already exists

Parameters:
pSenderName name of sender
pSwarmName name of swarm
pParameterName name of parameter
Returns:
true if parameter registration found, false otherwise

void FlockCom::send (  )  throw (FlockException) [protected]

update senders

Exceptions:
ComException failed to update senders

Remarks:
creates message based on registered parameters for all senders and sends them

void FlockCom::sendDefaultMessage ( com::Sender *  pSender  )  throw (FlockException) [protected]

send default message

Parameters:
pSender sender
Exceptions:
ComException failed to update sender

void FlockCom::updateDefaultMessage ( ParameterRegistration pRegistration,
com::Message &  pMessage 
) throw (FlockException) [protected]

update default message

Parameters:
pRegistration parameter registration
pMessage message
Exceptions:
ComException failed to update sender

void FlockCom::updateDefaultMessage ( ParameterRegistration pRegistration,
float *  pValueArray,
unsigned int  pParameterDim,
unsigned int  pParameterCount,
com::Message &  pMessage 
) throw (FlockException) [protected]

update default message

Parameters:
pRegistration parameter registration
pValueArray array of parameter values
pParameterDim parameter dimension
pParameterCount parameter count
pMessage message
Exceptions:
ComException failed to update sender

void FlockCom::sendOSCMessage ( com::Sender *  pSender  )  throw (FlockException) [protected]

send osc message

Parameters:
pSender sender
Exceptions:
ComException failed to update sender

void FlockCom::sendOSCMessage ( com::Sender *  pSender,
ParameterRegistration pRegistration 
) throw (FlockException) [protected]

update osc sender

Parameters:
pSender sender
pRegistration parameter registration
Exceptions:
ComException failed to update sender

void FlockCom::sendOSCMessage ( com::Sender *  pSender,
ParameterRegistration pRegistration,
const base::String &  pAddress,
Parameter pParameter 
) throw (FlockException) [protected]

update osc sender

Parameters:
pSender sender
pRegistration parameter registration
pAddress osc address pattern
pParameter parameter
Exceptions:
ComException failed to update sender


Member Data Documentation

FlockCom * FlockCom::sFlockCom [static, protected]

QMultiHash< com::Sender*, ParameterRegistration* > iso::flock::FlockCom::mParameterRegistry [protected]

singleton instance

QTime iso::flock::FlockCom::mTime [protected]

parameter communication registry


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 15:28:03 2011 for iso_flock by  doxygen 1.5.1