Changeset 1761 for XIOS/dev/dev_ym/XIOS_SERVICES/src/node/context.hpp
- Timestamp:
- 10/18/19 15:40:35 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_SERVICES/src/node/context.hpp
r1639 r1761 12 12 #include "registry.hpp" 13 13 #include "mpi.hpp" 14 #include "services_manager.hpp" 15 #include "server_context.hpp" 14 16 15 17 … … 89 91 // Initialize server or client 90 92 void initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer = 0); 93 void init(CServerContext* parentServerContext, MPI_Comm intraComm, int serviceType); 94 void initClient(MPI_Comm intraComm, int serviceType); 95 91 96 void initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient = 0); 97 void initServer(MPI_Comm intraComm, int serviceType ); 98 void createClientInterComm(MPI_Comm interCommClient, MPI_Comm interCommServer) ; 99 void createServerInterComm(void) ; 100 92 101 bool isInitialized(void); 93 102 … … 96 105 // Put sever or client into loop state 97 106 bool checkBuffersAndListen(bool enableEventsProcessing=true); 107 bool eventLoop(bool enableEventsProcessing=true); 98 108 99 109 // Finalize a context 100 110 void finalize(void); 111 void finalize_old(void); 101 112 bool isFinalized(void); 102 113 … … 161 172 162 173 const StdString& getIdServer(); 174 void setIdServer(const StdString& idServer); 163 175 const StdString& getIdServer(const int srvPoolNb); 176 std::string getContextId() {return contextId_;} 164 177 165 178 // Client side: Receive and process messages … … 208 221 static void ShowTree(StdOStream & out = std::clog); 209 222 static void CleanTree(void); 223 int getServiceType(void) {return serviceType_;} 210 224 211 225 public : … … 223 237 virtual bool hasChild(void) const; 224 238 239 bool isProcessingEvent(void) {return isProcessingEvent_;} 240 bool setProcessingEvent(void) {isProcessingEvent_=true ;} 241 bool unsetProcessingEvent(void) {isProcessingEvent_=false ;} 225 242 226 243 public : … … 252 269 std::vector<CContextServer*> serverPrimServer; 253 270 std::vector<CContextClient*> clientPrimServer; 271 std::vector<std::string> primServerId_; 254 272 255 273 CRegistry* registryIn ; //!< input registry which is read from file 256 274 CRegistry* registryOut ; //!< output registry which will be written into file at the finalize 275 276 277 MPI_Comm intraComm_ ; //! context intra communicator 257 278 258 279 private: … … 265 286 std::list<MPI_Comm> comms; //!< Communicators allocated internally 266 287 288 int serviceType_; //!< service associated to the context 289 string contextId_ ; //!< context client id for the servers. For clients this is same as getId() 290 bool isProcessingEvent_ ; 291 CServerContext* parentServerContext_ ; 292 267 293 public: // Some function maybe removed in the near future 268 294 // virtual void toBinary (StdOStream & os) const;
Note: See TracChangeset
for help on using the changeset viewer.