Mercury
Main Page
Classes
Files
File List
File Members
mercury_types.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_TYPES_H
12
#define MERCURY_TYPES_H
13
14
#include "
na.h
"
15
#include "mercury_config.h"
16
17
typedef
hg_uint32_t
hg_id_t
;
/* Operation ID of the operation */
18
typedef
hg_bool_t
hg_status_t
;
/* Status of the operation */
19
typedef
hg_int32_t
hg_error_t
;
/* Error code */
20
typedef
void
*
hg_request_t
;
/* Abstract request */
21
typedef
void
*
hg_proc_t
;
/* Abstract serialization processor */
22
typedef
void
*
hg_handle_t
;
/* Abstract RPC handle */
23
typedef
void
*
hg_bulk_t
;
/* Abstract bulk data handle */
24
typedef
void
*
hg_bulk_request_t
;
/* Bulk request object */
25
26
typedef
enum
{
27
HG_BULK_PUSH
,
28
HG_BULK_PULL
29
}
hg_bulk_op_t
;
30
31
#define HG_BULK_READWRITE NA_MEM_READWRITE
32
#define HG_BULK_READ_ONLY NA_MEM_READ_ONLY
33
#define HG_BULK_WRITE_ONLY NA_MEM_READWRITE
34
35
#define HG_STATUS_IGNORE ((hg_status_t *)1)
36
37
#define HG_MAX_IDLE_TIME NA_MAX_IDLE_TIME
38
39
#define HG_REQUEST_NULL ((hg_request_t)0)
40
#define HG_PROC_NULL ((hg_proc_t)0)
41
#define HG_HANDLE_NULL ((hg_handle_t)0)
42
#define HG_BULK_NULL ((hg_bulk_t)0)
43
#define HG_BULK_REQUEST_NULL ((hg_bulk_request_t)0)
44
50
typedef
enum
{
51
HG_ENCODE
,
52
HG_DECODE
,
53
HG_FREE
54
}
hg_proc_op_t
;
55
59
typedef
enum
{
60
HG_CRC16
,
61
HG_CRC64
,
62
HG_NOHASH
63
}
hg_proc_hash_t
;
64
65
/* Error return codes:
66
* Functions return 0 for success or -HG_XXX_ERROR for failure */
67
typedef
enum
hg_return
{
68
HG_FAIL
= -1,
/* default (TODO keep until switch to new error format) */
69
HG_SUCCESS
= 0,
70
HG_NA_ERROR
,
/* error in NA layer */
71
HG_TIMEOUT
,
/* reached timeout */
72
HG_INVALID_PARAM
,
/* invalid parameter */
73
HG_SIZE_ERROR
,
/* size error */
74
HG_NOMEM_ERROR
,
/* no memory error */
75
HG_PROTOCOL_ERROR
,
/* protocol does not match */
76
HG_NO_MATCH
,
/* no function match */
77
HG_CHECKSUM_ERROR
/* checksum error */
78
}
hg_return_t
;
79
80
/* Proc callback for serializing/deserializing parameters */
81
typedef
hg_return_t
(*
hg_proc_cb_t
)(
hg_proc_t
proc,
void
*in_struct);
82
83
/* Callback for executing RPC */
84
typedef
hg_return_t
(*
hg_rpc_cb_t
)(
hg_handle_t
handle);
85
86
/* Context used for request emulation */
87
struct
hg_context
{
88
na_class_t
*
na_class
;
89
na_context_t
*
na_context
;
90
};
91
92
#endif
/* MERCURY_TYPES_H */
HG_BULK_PUSH
Definition:
mercury_types.h:27
hg_bulk_request_t
void * hg_bulk_request_t
Definition:
mercury_types.h:24
hg_context
Definition:
mercury_types.h:87
HG_ENCODE
Definition:
mercury_types.h:51
HG_BULK_PULL
Definition:
mercury_types.h:28
HG_NOHASH
Definition:
mercury_types.h:62
hg_context::na_context
na_context_t * na_context
Definition:
mercury_types.h:89
HG_NOMEM_ERROR
Definition:
mercury_types.h:74
HG_PROTOCOL_ERROR
Definition:
mercury_types.h:75
hg_bulk_t
void * hg_bulk_t
Definition:
mercury_types.h:23
HG_NA_ERROR
Definition:
mercury_types.h:70
hg_error_t
hg_int32_t hg_error_t
Definition:
mercury_types.h:19
HG_SIZE_ERROR
Definition:
mercury_types.h:73
hg_id_t
hg_uint32_t hg_id_t
Definition:
mercury_types.h:17
HG_CHECKSUM_ERROR
Definition:
mercury_types.h:77
hg_context::na_class
na_class_t * na_class
Definition:
mercury_types.h:88
na_class
Definition:
na_private.h:52
HG_TIMEOUT
Definition:
mercury_types.h:71
hg_bulk_op_t
hg_bulk_op_t
Definition:
mercury_types.h:26
hg_handle_t
void * hg_handle_t
Definition:
mercury_types.h:22
na_context
Definition:
na_private.h:47
HG_DECODE
Definition:
mercury_types.h:52
hg_proc_t
void * hg_proc_t
Definition:
mercury_types.h:21
HG_CRC16
Definition:
mercury_types.h:60
na.h
hg_proc_hash_t
hg_proc_hash_t
Hash methods available for proc.
Definition:
mercury_types.h:59
HG_FREE
Definition:
mercury_types.h:53
hg_rpc_cb_t
hg_return_t(* hg_rpc_cb_t)(hg_handle_t handle)
Definition:
mercury_types.h:84
hg_proc_op_t
hg_proc_op_t
Proc operations.
Definition:
mercury_types.h:50
HG_NO_MATCH
Definition:
mercury_types.h:76
hg_return_t
enum hg_return hg_return_t
hg_request_t
void * hg_request_t
Definition:
mercury_types.h:20
HG_FAIL
Definition:
mercury_types.h:68
HG_SUCCESS
Definition:
mercury_types.h:69
hg_status_t
hg_bool_t hg_status_t
Definition:
mercury_types.h:18
hg_return
hg_return
Definition:
mercury_types.h:67
HG_INVALID_PARAM
Definition:
mercury_types.h:72
hg_proc_cb_t
hg_return_t(* hg_proc_cb_t)(hg_proc_t proc, void *in_struct)
Definition:
mercury_types.h:81
HG_CRC64
Definition:
mercury_types.h:61
Generated by
1.8.6