SimGrid 3.7.1
Scalable simulation of distributed systems
|
Defines | |
#define | gras_msg_rpccall(server, timeout, msg, req, ans) |
Conduct a RPC call. | |
#define | gras_msg_rpc_async_call(server, timeout, msg, req) |
Launch a RPC call, but do not block for the answer. | |
Functions | |
void | gras_msgtype_declare_rpc (const char *name, xbt_datadesc_type_t payload_request, xbt_datadesc_type_t payload_answer) |
declare a new versionned RPC type of the given name and payloads | |
void | gras_msgtype_declare_rpc_v (const char *name, short int version, xbt_datadesc_type_t payload_request, xbt_datadesc_type_t payload_answer) |
declare a new versionned RPC type of the given name and payloads | |
void | gras_msg_rpccall_ (xbt_socket_t server, double timeOut, gras_msgtype_t msgtype, void *request, void *answer) |
Conduct a RPC call. | |
gras_msg_rpc_async_call_ (xbt_socket_t server, double timeOut, gras_msgtype_t msgtype, void *request) | |
Launch a RPC call, but do not block for the answer. | |
void | gras_msg_rpc_async_wait (gras_msg_cb_ctx_t ctx, void *answer) |
Wait the answer of a RPC call previously launched asynchronously. | |
void | gras_msg_rpcreturn (double timeOut, gras_msg_cb_ctx_t ctx, void *answer) |
Return the result of a RPC call. |
Remote Procedure Call (RPC) are a classical mecanism to request a service from a remote host. Using this set of functions, you let GRAS doing most of the work of sending the request, wait for an answer, make sure it is the right answer from the right host and so on. Any exception raised on the server is also passed over the network to the client.
Callbacks are attached to RPC incoming messages the regular way using gras_cb_register.
For an example of use, check the examples/gras/rpc directory of the distribution.
void gras_msgtype_declare_rpc | ( | const char * | name, |
xbt_datadesc_type_t | payload_request, | ||
xbt_datadesc_type_t | payload_answer | ||
) |
declare a new versionned RPC type of the given name and payloads
name,: | name as it should be used for logging messages (must be uniq) |
payload_request,: | datatype of request |
payload_answer,: | datatype of answer |
Registers a new RPC message to the GRAS mechanism. RPC are constituted of a pair of messages.
void gras_msgtype_declare_rpc_v | ( | const char * | name, |
short int | version, | ||
xbt_datadesc_type_t | payload_request, | ||
xbt_datadesc_type_t | payload_answer | ||
) |
declare a new versionned RPC type of the given name and payloads
name,: | name as it should be used for logging messages (must be uniq) |
version,: | something like versionning symbol |
payload_request,: | datatype of request |
payload_answer,: | datatype of answer |
Registers a new RPC message to the GRAS mechanism. RPC are constituted of a pair of messages.
Use this version instead of gras_rpctype_declare when you change the semantic or syntax of a message and want your programs to be able to deal with both versions. Internally, each will be handled as an independent message type, so you can register differents for each of them.
void gras_msg_rpcreturn | ( | double | timeOut, |
gras_msg_cb_ctx_t | ctx, | ||
void * | answer | ||
) |
Return the result of a RPC call.
It done before the actual return of the callback so that the callback can do some cleanups before leaving.
Back to the main Simgrid Documentation page |
The version of SimGrid documented here is v3.7.1. Documentation of other versions can be found in their respective archive files (directory doc/html). |
Generated by ![]() |