InteractionBroadcastList Class Reference

#include <InteractionBroadcastList.hh>

List of all members.

Public Member Functions

 InteractionBroadcastList (NetworkMessage *theMsg)
 ~InteractionBroadcastList ()
 Free all structures, including Message.
void clear ()
 Empty the list so it can reused(like the destructor).
void addFederate (FederateHandle theFederate)
void sendPendingMessage (SecurityServer *Server)

Public Attributes

NetworkMessagemessage
 The Message to be broadcasted.

Private Member Functions

InteractionBroadcastLinegetLineWithFederate (FederateHandle theFederate)
 Return the line of the list describing federate 'federate', or 0.

Private Attributes

MessageBuffer NM_msgBufSend
std::list
< InteractionBroadcastLine * > 
lines


Detailed Description

Definition at line 48 of file InteractionBroadcastList.hh.


Constructor & Destructor Documentation

theMsg must have been allocated, and will be destroyed by the destructor. theMsg->NumeroFedere is added to the list, and its state is set as "Sent".

Definition at line 64 of file InteractionBroadcastList.cc.

References NetworkMessage::federate, certi::G, InteractionBroadcastList::lines, InteractionBroadcastList::message, PrettyDebug::Out(), pdGendoc, and InteractionBroadcastLine::sent.

Here is the call graph for this function:

Free all structures, including Message.

Definition at line 89 of file InteractionBroadcastList.cc.

References InteractionBroadcastList::clear().

Here is the call graph for this function:


Member Function Documentation

void clear (  ) 

Empty the list so it can reused(like the destructor).

Definition at line 97 of file InteractionBroadcastList.cc.

References certi::D, InteractionBroadcastList::lines, InteractionBroadcastList::message, PrettyDebug::Out(), and pdTerm.

Referenced by InteractionBroadcastList::~InteractionBroadcastList().

Here is the call graph for this function:

void addFederate ( FederateHandle  federate  ) 

Add a federate to the list. If it was not present in the list, a new line is added and its state is set as bsNotSub. Then if the Federate has not been sent a message for this interaction, the line's state is set to bsWaiting.

Definition at line 44 of file InteractionBroadcastList.cc.

References certi::D, InteractionBroadcastList::getLineWithFederate(), InteractionBroadcastList::lines, PrettyDebug::Out(), pdRegister, pdTrace, and InteractionBroadcastLine::waiting.

Referenced by Subscribable::addFederatesIfOverlap().

Here is the call graph for this function:

void sendPendingMessage ( SecurityServer server  ) 

IMPORTANT: Before calling this method, be sure to set the Message->NumeroFederation handle.

Broadcast the message to all the Federate in the bsWaiting state, and then set their state to bsSent.

Definition at line 132 of file InteractionBroadcastList.cc.

References certi::BEST_EFFORT, certi::D, certi::G, SecurityServer::getSocketLink(), InteractionBroadcastList::lines, InteractionBroadcastList::message, InteractionBroadcastList::NM_msgBufSend, PrettyDebug::Out(), pdExcept, pdGendoc, pdProtocol, NetworkMessage::send(), InteractionBroadcastLine::sent, and InteractionBroadcastLine::waiting.

Referenced by Interaction::broadcastInteractionMessage().

Here is the call graph for this function:

InteractionBroadcastLine * getLineWithFederate ( FederateHandle  theFederate  )  [private]

Return the line of the list describing federate 'federate', or 0.

Definition at line 113 of file InteractionBroadcastList.cc.

References InteractionBroadcastList::lines.

Referenced by InteractionBroadcastList::addFederate().


Member Data Documentation

The Message to be broadcasted.

This message must be allocated before calling the constructor of the class, be is deleted by the destructor.

Definition at line 62 of file InteractionBroadcastList.hh.

Referenced by Interaction::broadcastInteractionMessage(), InteractionBroadcastList::clear(), InteractionBroadcastList::InteractionBroadcastList(), and InteractionBroadcastList::sendPendingMessage().

std::list<InteractionBroadcastLine *> lines [private]


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

Generated on Thu Apr 30 15:55:15 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5