source: XIOS/trunk/src/context_server.hpp @ 773

Last change on this file since 773 was 697, checked in by ymipsl, 9 years ago

Implement registryIn and registryOut functionnalities.
YM

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.2 KB
Line 
1#ifndef __CONTEXT_SERVER_HPP__
2#define __CONTEXT_SERVER_HPP__
3#include "xios_spl.hpp"
4#include "event_server.hpp"
5#include "buffer_server.hpp"
6#include "mpi.hpp"
7
8namespace xios
9{
10  class CContext ;
11
12  class CContextServer
13  {
14    public:
15
16    CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ;
17    bool eventLoop(void) ;
18    void listen(void) ;
19    void checkPendingRequest(void) ;
20    void processRequest(int rank, char* buff,int count) ;
21    void processEvents(void) ;
22    void dispatchEvent(CEventServer& event) ;
23    void setPendingEvent(void) ;
24    bool hasPendingEvent(void) ;
25    bool hasFinished(void);
26
27    MPI_Comm intraComm ;
28    int intraCommSize ;
29    int intraCommRank ;
30
31    MPI_Comm interComm ;
32    int commSize ;
33
34    map<int,CServerBuffer*> buffers ;
35    map<int,MPI_Request> pendingRequest ;
36    map<int,char*> bufferRequest ;
37
38    map<size_t,CEventServer*> events ;
39    size_t currentTimeLine ;
40    CContext* context ;
41     
42    bool finished ;
43    bool pendingEvent ;
44    bool scheduled  ;    /*!< event of current timeline is alreading scheduled ? */
45    size_t hashId ;
46    ~CContextServer() ;
47
48    private:
49      std::map<int, StdSize> mapBufferSize_;
50  } ;
51
52}
53
54#endif
Note: See TracBrowser for help on using the repository browser.