17 #include <vlutil/vlTime.h>
19 namespace MAKTrafficClientServerExConn
21 class DtServerExerciseConnection;
22 class DtClientExerciseConnection;
28 DtServerFederateAmbassadorBase(
const DtServerFederateAmbassadorBase& src );
30 DtServerFederateAmbassadorBase& operator=(
const DtServerFederateAmbassadorBase& src );
34 DtServerFederateAmbassadorBase();
37 virtual ~DtServerFederateAmbassadorBase()
38 throw( RTI::FederateInternalError );
41 virtual
void setServerConnection(DtServerExerciseConnection* serverConnection);
45 virtual
void setReceiveSelfReflect(
unsigned long clientID,
bool enableReceiveSelfReflect);
48 virtual
bool receiveSelfReflectEnabled(
unsigned long clientID) const;
57 virtual
int invokeCallbacks(DtClientExerciseConnection* client,
58 double maximum=-1,
double minimum=0);
64 virtual
bool flush(DtTime sleepTime, DtTime maxTime);
71 virtual
bool transferSelfReflects(
unsigned int clientID);
75 virtual
double transferSelfReflects();
78 virtual
void clearOpenSlots();
81 virtual
void resetConnection(
unsigned int clientID);
84 virtual
void resetConnections();
89 static
void setQueueSize(
unsigned int size);
94 virtual
void pushCallback(DtTaCallback* callback,
unsigned int clientID=0,
95 bool callIsSelfReflect=false);
98 virtual
void pushSelfReflect(DtTaCallback* callback,
unsigned int clientID);
101 virtual
void addConnection(DtClientExerciseConnection* conn);
104 virtual
void removeConnection(DtClientExerciseConnection* conn);
109 virtual
bool flushCallback(
int callbackIndex, DtTime sleepTime, DtTime timeToQuit);
112 virtual
void clearSelfReflects(
unsigned int clientID);
115 virtual
void clearSelfReflects();
120 static
void addConnection(DtClientExerciseConnection* conn,
void* usr);
123 static
void removeConnection(DtClientExerciseConnection* conn,
void* usr);
128 DtServerExerciseConnection* myServerConnection;
131 DtTaCallbackVector myFedAmbCallbackQueue;
134 DtTaCallbackQueueVector myClientSelfReflectQueues;
140 DtTaCallbackQueueVector myServerSelfReflectQueues;
143 unsigned int myNumberPendingCallbacks;
146 unsigned int myNextCallbackIndex;
149 std::vector<
unsigned int> myConnectionCallbackIndex;
152 std::set<
unsigned int> myConnectionIDs;
155 std::set<
unsigned int> myReceiveSelfReflectIDs;
166 unsigned int myOldestIndex;
171 static
unsigned int theQueueSize;
The DtTaCallback is a base class to store callback parameters.
#define DT_DLL_CSEC
Definition: clientServerExConnDllDefines.h:17