English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TSocketRun.h Source File
Uranie / ReLauncher v4.9.0
/* @license-end */
TSocketRun.h
Go to the documentation of this file.
1/* --- Ansi C --- */
3// Copyright (C) 2013-2024 CEA/DES
4//
5// This program is free software: you can redistribute it and/or
6// modify it under the terms of the GNU Lesser General Public License
7// as published by the Free Software Foundation, either version 3 of
8// the License, or any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public
16// License along with this program.
17// if not, see <http://www.gnu.org/licenses/>.
19
27#ifndef __TSOCKETRUN__
28#define __TSOCKETRUN__
29
30#include "TSeparateRun.h"
31
32#include <queue>
33#include <vector>
34
35#include "TSocket.h"
36#include "TServerSocket.h"
37#include "TMonitor.h"
38
39namespace URANIE
40{
41namespace Relauncher
42{
43
45{
46protected:
47
48 // server side
49 TServerSocket *_sserv;
50 TMonitor *_moni;
51 std::vector<TSocket *> _sclient;
52 // client side
53 const char *_conn;
54 int _port;
55 //TSocket *_sock;
56
57
58 virtual int wait_service();
59 virtual int send_header(int canal, int *head, int size);
60 virtual int send_value(int canal, double *mesg, int size);
61 virtual int receive_header(int canal, int *head, int size);
62 virtual int receive_value(int canal, double *mesg, int size);
63
64public:
65
67 virtual ~TSocketRun();
68
69 virtual void startSlave();
70 virtual Bool_t onMaster();
71 virtual Bool_t readyToGet();
72
73 ClassDef(URANIE::Relauncher::TSocketRun, ID_RELAUNCHER)
74};
75
76
77}} //namespace
78#endif
separate process communicating by stream
Definition TEval.h:50
Definition TSeparateRun.h:45
Definition TSocketRun.h:45
virtual int send_value(int canal, double *mesg, int size)
Definition TSocketRun.cxx:111
TServerSocket * _sserv
Definition TSocketRun.h:49
virtual void startSlave()
Definition TSocketRun.cxx:118
virtual int send_header(int canal, int *head, int size)
Definition TSocketRun.cxx:106
std::vector< TSocket * > _sclient
Definition TSocketRun.h:51
virtual int receive_header(int canal, int *head, int size)
Definition TSocketRun.cxx:96
virtual Bool_t readyToGet()
Definition TSocketRun.cxx:156
int _port
Definition TSocketRun.h:54
virtual Bool_t onMaster()
Definition TSocketRun.cxx:151
virtual int wait_service()
Definition TSocketRun.cxx:87
const char * _conn
Definition TSocketRun.h:53
TMonitor * _moni
Definition TSocketRun.h:50
virtual int receive_value(int canal, double *mesg, int size)
Definition TSocketRun.cxx:101
virtual ~TSocketRun()
Definition TSocketRun.cxx:70
Definition TBaseEval.cxx:44