MAK Data Logger API Documentation for HLA
fedAmbCallbackBuffer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2012 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
7 
8 #pragma once
9 
10 #if DtHLA
11 
13 
14 #include <vlutil/vlTime.h>
15 #include <vlutil/vlString.h>
16 
17 #include <queue>
18 #include <set>
19 #include <vector>
20 
21 namespace MAKTrafficClientServerExConn
22 {
23 
24  class DtClientExerciseConnection;
25  class DtTaCallback;
26 
28  {
29  public:
30 
33  DtTaCallbackBuffer(DtTaCallback* callbackToMake=0, unsigned int clientID=0);
34 
37 
39  virtual ~DtTaCallbackBuffer();
40 
42  DtTaCallbackBuffer& operator=(const DtTaCallbackBuffer& orig);
43 
45  virtual DtTaCallback* callback();
46 
48  virtual unsigned int sourceClientID();
49 
51  virtual void setCallback(DtTaCallback* callbackToMake, unsigned int clientID,
52  const std::set<unsigned int>& pendingCallers, const std::set<unsigned int>& callers);
53 
54 
57  virtual bool invokeCallback(DtClientExerciseConnection* client);
58 
60  virtual void addPending(unsigned int callerID);
61 
63  virtual void removePending(unsigned int callerID);
64 
67  virtual unsigned int callbackPending(unsigned int connID=0) const;
68 
71  virtual unsigned int callbackPendingEvaluation(unsigned int connID=0) const;
72 
75  virtual bool getCallbackPending(DtString& list) const;
76 
79  virtual bool getCallbackPendingEvaluation(DtString& list) const;
80 
82  virtual void clear();
83 
84  public:
85 
87  static void setMaximumConnections(unsigned int maxConns);
88 
90  static unsigned int maximumConnections();
91 
92  protected:
93 
96 
98  std::vector<bool> myPendingCallers;
99 
101  std::vector<bool> myCallPending;
102 
104  std::vector<bool> myCallPendingEvaluation;
105 
107  unsigned int mySourceClientID;
108 
109  DtClock myClock;
110 
111  protected:
112  static unsigned int theMaxConnections;
113  };
114 
115  typedef std::vector<DtTaCallbackBuffer> DtTaCallbackVector;
116  typedef std::queue<DtTaCallbackBuffer> DtTaCallbackQueue;
117  typedef std::vector<DtTaCallbackQueue> DtTaCallbackQueueVector;
118 
119 }
120 
121 #endif

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)