Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make XBT_{IN,OUT,HERE} function-like macros.
[simgrid.git] / src / gras / DataDesc / datadesc_interface.h
1 /* datadesc - describing the data to exchange                               */
2
3 /* module's public interface exported within GRAS, but not to end user.     */
4
5 /* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
6  * All rights reserved.                                                     */
7
8 /* This program is free software; you can redistribute it and/or modify it
9  * under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #ifndef GRAS_DATADESC_INTERFACE_H
12 #define GRAS_DATADESC_INTERFACE_H
13
14 XBT_PUBLIC(gras_datadesc_type_t) gras_datadesc_by_id(long int code);
15
16 /* to debug */
17 XBT_PUBLIC(void) gras_datadesc_type_dump(const gras_datadesc_type_t ddt);
18 XBT_PUBLIC(const char *) gras_datadesc_arch_name(int code);
19
20 /* compare two data type description */
21 XBT_PUBLIC(int)
22 gras_datadesc_type_cmp(const gras_datadesc_type_t d1,
23                        const gras_datadesc_type_t d2);
24
25 /* Access function */
26 XBT_PUBLIC(int) gras_datadesc_size(gras_datadesc_type_t type);
27 /* Described data exchanges: direct use */
28 XBT_PUBLIC(int) gras_datadesc_memcpy(gras_datadesc_type_t type, void *src,
29                                      void *dst);
30 XBT_PUBLIC(void) gras_datadesc_send(gras_socket_t sock,
31                                     gras_datadesc_type_t type, void *src);
32 XBT_PUBLIC(void) gras_datadesc_recv(gras_socket_t sock,
33                                     gras_datadesc_type_t type, int r_arch,
34                                     void *dst);
35
36 /* Described data exchanges: IDL compilation FIXME: not implemented*/
37 void gras_datadesc_gen_cpy(gras_datadesc_type_t type, void *src,
38                            void **dst);
39 void gras_datadesc_gen_send(gras_socket_t sock,
40                             gras_datadesc_type_t type, void *src);
41 void gras_datadesc_gen_recv(gras_socket_t sock,
42                             gras_datadesc_type_t type, int r_arch,
43                             void *dst);
44
45
46 #endif                          /* GRAS_DATADESC_INTERFACE_H */