00001
00002
00003 #ifndef TessToolReceiver_h
00004 #define TessToolReceiver_h
00005
00006 #include "TessToolDataStream.h"
00007
00008 #ifdef CCXX_NAMESPACES
00009 using namespace std;
00010 using namespace ost;
00011 #endif
00012
00013 namespace BIE {
00014
00015
00017 class TessToolReceiver: public TessToolDataStream {
00018 public:
00019
00020
00021 TessToolReceiver(string name);
00022
00023
00024
00025 TessToolReceiver(int *argc, char ***argv, string name);
00026 ~TessToolReceiver();
00027
00028 void run();
00029 void SampleNext();
00030 void Detach();
00031
00032 bool isConnectedToTessToolSender() { return _connectedToTessToolSender; };
00033
00034 private:
00035
00036 void Synchronize();
00037 void GetData();
00038
00039 bool _connectedToTessToolSender;
00040 int _sessionId;
00041
00042 MPI_Comm _bieComm;
00043 int _bieSize;
00044 char *_port;
00045
00046 int *_argc;
00047 char ***_argv;
00048
00049 int _level, _step, _iter;
00050
00051 int _numTMs;
00052 int *_tmList;
00053
00054 MPI_Status *_status;
00055 MPI_Request *_request;
00056 int *_flag, *_completed, _numCompleted;
00057
00058 MPI_Datatype _mpidtype;
00059
00060 int filter_sessionId, filter_capacityInRecords;
00061
00062 void **_receivedBuffer;
00063 int _lastInProgress;
00064
00065 };
00066 }
00067 #endif