SimGrid 3.6.2
Scalable simulation of distributed systems
|
Typedefs | |
typedef struct s_gras_msgtype * | gras_msgtype_t |
Opaque type. | |
Functions | |
void | gras_msgtype_declare (const char *name, gras_datadesc_type_t payload) |
declare a new message type of the given name. It only accepts the given datadesc as payload | |
void | gras_msgtype_declare_v (const char *name, short int version, gras_datadesc_type_t payload) |
declare a new versionned message type of the given name and payload | |
gras_msgtype_t | gras_msgtype_by_name (const char *name) |
retrieve an existing message type from its name (raises an exception if it does not exist). | |
gras_msgtype_t | gras_msgtype_by_name_or_null (const char *name) |
retrieve an existing message type from its name (or NULL if it does not exist). | |
gras_msgtype_t | gras_msgtype_by_namev (const char *name, short int version) |
retrieve an existing message type from its name and version. | |
gras_msgtype_t | gras_msgtype_by_id (int id) |
retrieve an existing message type from its name and version. | |
void | gras_msgtype_dumpall (void) |
GRAS messages can only accept one type of payload. See Data description for more information on how to describe data in GRAS.
If you absolutely want use a message able to convey several datatypes, you can always say that it conveys a generic reference (see gras_datadesc_ref_generic).
In order to ease the upgrade of GRAS applications, it is possible to version the messages, ie to add a version number to the message (by default, the version is set to 0). Any messages of the wrong version will be ignored by the applications not providing any specific callback for them.
This mechanism (stolen from the dynamic loader one) should ensure you to change the semantic of a given message while still understanding the old one.
void gras_msgtype_declare | ( | const char * | name, |
gras_datadesc_type_t | payload | ||
) |
declare a new message type of the given name. It only accepts the given datadesc as payload
name,: | name as it should be used for logging messages (must be uniq) |
payload,: | datadescription of the payload |
void gras_msgtype_declare_v | ( | const char * | name, |
short int | version, | ||
gras_datadesc_type_t | payload | ||
) |
declare a new versionned message type of the given name and payload
name,: | name as it should be used for logging messages (must be uniq) |
version,: | something like versionning symbol |
payload,: | datadescription of the payload |
Registers a message to the GRAS mechanism. Use this version instead of gras_msgtype_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_msgtype_dumpall | ( | void | ) |
Dump all declared message types (debugging purpose)
Back to the main Simgrid Documentation page |
The version of Simgrid documented here is v3.6.2. Documentation of other versions can be found in their respective archive files (directory doc/html). |
Generated for SimGridAPI by
![]() |