SimGrid 3.7.1
Scalable simulation of distributed systems
Data Structures | Enumerations | Functions
Message exchange (advanced interface)
Messages

Data Structures

struct  s_gras_msg_t
 Message instance (internal struct) More...

Enumerations

enum  e_gras_msg_kind_t { , e_gras_msg_kind_oneway = 1, e_gras_msg_kind_rpccall = 2, e_gras_msg_kind_rpcanswer = 3, e_gras_msg_kind_rpcerror = 4 }
 Message kind (internal enum) More...

Functions

void gras_msg_wait_ext_ (double timeout, gras_msgtype_t msgt_want, xbt_socket_t expe_want, gras_msg_filter_t filter, void *filter_ctx, gras_msg_t msg_got)
 Waits for a message to come in over a given socket.
void gras_msg_wait_or (double timeout, xbt_dynar_t msgt_want, gras_msg_cb_ctx_t *ctx, int *msgt_got, void *payload)
 Waits for a message to come in over a given socket.

Enumeration Type Documentation

Message kind (internal enum)

Enumerator:
e_gras_msg_kind_oneway 

good old regular messages

e_gras_msg_kind_rpccall 

RPC request

e_gras_msg_kind_rpcanswer 

RPC successful answer

e_gras_msg_kind_rpcerror 

RPC failure on server (payload=exception); should not leak to user-space


Function Documentation

void gras_msg_wait_ext_ ( double  timeout,
gras_msgtype_t  msgt_want,
xbt_socket_t  expe_want,
gras_msg_filter_t  filter,
void *  filter_ctx,
gras_msg_t  msg_got 
)

Waits for a message to come in over a given socket.

Parameters:
timeout,:How long should we wait for this message.
msgt_want,:type of awaited msg (or NULL if I'm enclined to accept any message)
expe_want,:awaited expeditot (match on hostname, not port; NULL if not relevant)
filter,:function returning true or false when passed a payload. Messages for which it returns false are not selected. (NULL if not relevant)
filter_ctx,:context passed as second argument of the filter (a pattern to match?)
[out]msg_got,:where to write the message we got

Every message of another type received before the one waited will be queued and used by subsequent call to this function or gras_msg_handle().

void gras_msg_wait_or ( double  timeout,
xbt_dynar_t  msgt_want,
gras_msg_cb_ctx_t ctx,
int *  msgt_got,
void *  payload 
)

Waits for a message to come in over a given socket.

Parameters:
timeout,:How long should we wait for this message.
msgt_want,:a dynar containing all accepted message type
[out]ctx,:the context of received message (in case it's a RPC call we want to answer to)
[out]msgt_got,:indice in the dynar of the type of the received message
[out]payload,:where to write the payload of the incoming message
Returns:
the error code (or no_error).

Every message of a type not in the accepted list received before the one waited will be queued and used by subsequent call to this function or gras_msg_handle().

If you are interested in the context, pass the address of a s_gras_msg_cb_ctx_t variable.


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 doxygen