8.0
general documentation
Loading...
Searching...
No Matches
cs_control.h
Go to the documentation of this file.
1#ifndef __CS_CONTROL_H__
2#define __CS_CONTROL_H__
3
4/*============================================================================
5 * Interactive control management.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2023 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "cs_defs.h"
35#include "cs_time_step.h"
36
37/*----------------------------------------------------------------------------*/
38
40
41/*=============================================================================
42 * Macro definitions
43 *============================================================================*/
44
45typedef enum {
46
47 CS_CONTROL_COMM_TYPE_SOCKET, /* Communicate through sockets */
48 CS_CONTROL_COMM_TYPE_NULL /* Null communicator */
49
51
52/*============================================================================
53 * Type definitions
54 *============================================================================*/
55
56/*============================================================================
57 * Public function prototypes
58 *============================================================================*/
59
60/*----------------------------------------------------------------------------*/
64/*----------------------------------------------------------------------------*/
65
66void
68
69/*----------------------------------------------------------------------------
70 * Check the presence of a control file and deal with the interactive
71 * control.
72 *----------------------------------------------------------------------------*/
73
74void
76
77/*----------------------------------------------------------------------------*/
85/*----------------------------------------------------------------------------*/
86
87void
88cs_control_comm_initialize(const char *port_name,
89 const char *key,
91
92/*----------------------------------------------------------------------------*/
96/*----------------------------------------------------------------------------*/
97
98void
100
101/*----------------------------------------------------------------------------*/
109/*----------------------------------------------------------------------------*/
110
111void
112cs_control_comm_write(const void *rec,
113 size_t size,
114 size_t count);
115
116/*----------------------------------------------------------------------------*/
125/*----------------------------------------------------------------------------*/
126
127size_t
129
130/*----------------------------------------------------------------------------*/
131
133
134#endif /* __CS_CONTROL_H__ */
void cs_control_comm_write(const void *rec, size_t size, size_t count)
Write a record to a client.
Definition cs_control.c:2022
void cs_control_comm_finalize(void)
Finalize a connection to a client.
Definition cs_control.c:2006
void cs_control_comm_initialize(const char *port_name, const char *key, cs_control_comm_type_t type)
Establish a connection to a client.
Definition cs_control.c:1984
void cs_control_check_file(void)
Check the presence of a control file and deal with the interactive control.
Definition cs_control.c:1821
cs_control_comm_type_t
Definition cs_control.h:45
@ CS_CONTROL_COMM_TYPE_SOCKET
Definition cs_control.h:47
@ CS_CONTROL_COMM_TYPE_NULL
Definition cs_control.h:48
void cs_control_finalize(void)
Finalize controller structures.
Definition cs_control.c:1763
size_t cs_control_comm_read_to_queue(void)
Read data from a client into a command queue.
Definition cs_control.c:2055
#define BEGIN_C_DECLS
Definition cs_defs.h:509
#define END_C_DECLS
Definition cs_defs.h:510