00001
00007 #ifndef COMMUNICATE_H
00008 #define COMMUNICATE_H
00009
00010 class MIStream;
00011 class MOStream;
00012
00013 #define ALL -1
00014 #define ALLBUTME -2
00015 #define BUFSIZE 4096
00016 #define ANY -1
00017
00018 class Communicate {
00019
00020 private:
00021 int CsmHandlerIndex;
00022 int CsmAckHandlerIndex;
00023 int nchildren;
00024
00025 public:
00026 Communicate(void);
00027 ~Communicate();
00028 MIStream *newInputStream(int pe, int tag);
00029 MOStream *newOutputStream(int pe, int tag, unsigned int bufsize);
00030 void *getMessage(int PE, int tag);
00031 void sendMessage(int PE, void *msg, int size);
00032 };
00033
00034 #include "MStream.h"
00035
00036 #endif