Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
HyodaTcp.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*****************************************************************************
8 * HyodaTcp.h (C) 2000-2012 *
9 * *
10 * Header du debugger hybrid. *
11 *****************************************************************************/
12#ifndef ARCANE_HYODA_TCP_H
13#define ARCANE_HYODA_TCP_H
14
15#include <netdb.h>
16#include <poll.h>
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21ARCANE_BEGIN_NAMESPACE
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26class Hyoda;
27
28/******************************************************************************
29 * Hyoda CLASS
30 *****************************************************************************/
31class HyodaTcp: public TraceAccessor{
32public:
33 HyodaTcp(Hyoda*, ISubDomain*, ITraceMng*, Integer, Integer, Integer,bool=false);
34 ~HyodaTcp();
35public:
36 void send(const void *,size_t);
37 void recvPov(double*);
38 void recvPov(double*,int);
39 void waitForAcknowledgment(void);
40 void sendAcknowledgmentPacket(void);
41 void recvPacket(char *pov, int maxSize, int ms_timeout);
42public:
43 void disconect(void);
44 Integer payload(void){return m_payload;}
45 void handshake(void);
46 void getVariableCollectionAndSendItToHost(void);
47private:
48 ssize_t wData(int sockd, const void *vptr, size_t n);
49 ssize_t rData(int sockd, void *vptr, size_t maxlen);
50 int checkTcpError(int error);
51private:
52 Hyoda *hyoda;
53 ISubDomain *m_sub_domain;
54 size_t m_payload;
55 int m_sockfd;
56 struct sockaddr_in *m_servaddr;
57 nfds_t m_nfds;
58 struct pollfd *m_fds;
59};
60
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65ARCANE_END_NAMESPACE
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69
70#endif // ARCANE_HYODA_TCP_H
Interface du gestionnaire d'un sous-domaine.
Definition ISubDomain.h:74
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Interface du gestionnaire de traces.