Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
9222c59f849924cdef826430f0ae7881e5eb9e97
[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) 2003 Olivier Aumage.                                       */
6 /* Copyright (c) 2003, 2004 Martin Quinson.                                 */
7 /* All rights reserved.                                                     */
8
9 /* This program is free software; you can redistribute it and/or modify it
10  * under the terms of the license (GNU LGPL) which comes with this package. */
11
12 #ifndef GRAS_DATADESC_INTERFACE_H
13 #define GRAS_DATADESC_INTERFACE_H
14
15 XBT_PUBLIC(gras_datadesc_type_t) gras_datadesc_by_id(long int code);
16
17 /* to debug */
18 XBT_PUBLIC(void) gras_datadesc_type_dump(const gras_datadesc_type_t ddt);
19 XBT_PUBLIC(const char *) gras_datadesc_arch_name(int code);
20
21 /* compare two data type description */
22 XBT_PUBLIC(int)
23 gras_datadesc_type_cmp(const gras_datadesc_type_t d1,
24                        const gras_datadesc_type_t d2);
25
26 /* Access function */
27 XBT_PUBLIC(int) gras_datadesc_size(gras_datadesc_type_t type);
28 /* Described data exchanges: direct use */
29 XBT_PUBLIC(int) gras_datadesc_memcpy(gras_datadesc_type_t type, void *src,
30                                      void *dst);
31 XBT_PUBLIC(void) gras_datadesc_send(gras_socket_t sock,
32                                     gras_datadesc_type_t type, void *src);
33 XBT_PUBLIC(void) gras_datadesc_recv(gras_socket_t sock,
34                                     gras_datadesc_type_t type, int r_arch,
35                                     void *dst);
36
37 /* Described data exchanges: IDL compilation FIXME: not implemented*/
38      void gras_datadesc_gen_cpy(gras_datadesc_type_t type, void *src,
39                                 void **dst);
40      void gras_datadesc_gen_send(gras_socket_t sock,
41                                  gras_datadesc_type_t type, void *src);
42      void gras_datadesc_gen_recv(gras_socket_t sock,
43                                  gras_datadesc_type_t type, int r_arch,
44                                  void *dst);
45
46
47 #endif /* GRAS_DATADESC_INTERFACE_H */