Mercury
mercury.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MERCURY_H
12 #define MERCURY_H
13 
14 #include "mercury_types.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
29 HG_EXPORT hg_return_t
30 HG_Version_get(unsigned int *major, unsigned int *minor, unsigned int *patch);
31 
42 HG_EXPORT hg_return_t
44 
50 HG_EXPORT hg_return_t
51 HG_Finalize(void);
52 
61 HG_EXPORT hg_return_t
62 HG_Initialized(hg_bool_t *flag, na_class_t **na_class);
63 
75 HG_EXPORT hg_id_t
76 HG_Register(const char *func_name, hg_proc_cb_t in_proc_cb,
77  hg_proc_cb_t out_proc_cb, hg_rpc_cb_t rpc_cb);
78 
88 HG_EXPORT hg_return_t
89 HG_Registered(const char *func_name, hg_bool_t *flag, hg_id_t *id);
90 
103 HG_EXPORT hg_return_t
104 HG_Forward(na_addr_t addr, hg_id_t id,
105  void *in_struct, void *out_struct, hg_request_t *request);
106 
117 HG_EXPORT hg_return_t
118 HG_Wait(hg_request_t request, unsigned int timeout, hg_status_t *status);
119 
130 HG_EXPORT hg_return_t
131 HG_Wait_all(int count, hg_request_t array_of_requests[],
132  unsigned int timeout, hg_status_t array_of_statuses[]);
133 
143 HG_EXPORT hg_return_t
145 
153 HG_EXPORT const char *
155 
156 #ifdef __cplusplus
157 }
158 #endif
159 
160 #endif /* MERCURY_H */
HG_EXPORT hg_return_t HG_Wait(hg_request_t request, unsigned int timeout, hg_status_t *status)
Wait for an operation request to complete.
HG_EXPORT hg_return_t HG_Wait_all(int count, hg_request_t array_of_requests[], unsigned int timeout, hg_status_t array_of_statuses[])
Wait for all operations in array_of_requests to complete.
HG_EXPORT hg_id_t HG_Register(const char *func_name, hg_proc_cb_t in_proc_cb, hg_proc_cb_t out_proc_cb, hg_rpc_cb_t rpc_cb)
Register a function name that can be sent using the RPC layer.
void * na_addr_t
Definition: na.h:20
HG_EXPORT hg_return_t HG_Request_free(hg_request_t request)
Free request and resources allocated when decoding the output.
hg_uint32_t hg_id_t
Definition: mercury_types.h:17
HG_EXPORT hg_return_t HG_Init(na_class_t *na_class)
Initialize the Mercury layer.
HG_EXPORT hg_return_t HG_Initialized(hg_bool_t *flag, na_class_t **na_class)
Indicate whether HG_Init has been called and return associated network class.
HG_EXPORT hg_return_t HG_Version_get(unsigned int *major, unsigned int *minor, unsigned int *patch)
Get Mercury version number.
HG_EXPORT hg_return_t HG_Registered(const char *func_name, hg_bool_t *flag, hg_id_t *id)
Indicate whether HG_Register has been called and return associated ID.
hg_return_t(* hg_rpc_cb_t)(hg_handle_t handle)
Definition: mercury_types.h:84
HG_EXPORT hg_return_t HG_Forward(na_addr_t addr, hg_id_t id, void *in_struct, void *out_struct, hg_request_t *request)
Forward a call to a remote server.
enum hg_return hg_return_t
HG_EXPORT const char * HG_Error_to_string(hg_return_t errnum)
Convert error return code to string (null terminated).
void * hg_request_t
Definition: mercury_types.h:20
HG_EXPORT hg_return_t HG_Finalize(void)
Finalize the Mercury layer.
hg_bool_t hg_status_t
Definition: mercury_types.h:18
hg_return_t(* hg_proc_cb_t)(hg_proc_t proc, void *in_struct)
Definition: mercury_types.h:81