39 typedef void *(*deserialization_fn)(
struct local_msu *
self, 
size_t input_size, 
void *input,
 
void(* destroy)(struct local_msu *self)
Type-specific destructor that frees any internal data or state. 
void *(* deserialization_fn)(struct local_msu *self, size_t input_size, void *input, size_t *out_size)
Header for messages passed to MSUs. 
void destroy_msu_types()
Calls the type-sepecific constructor for each instantiated MSU type. 
int(* receive)(struct local_msu *self, struct msu_msg *msg)
Handles the receiving of data sent from other MSUs. 
struct msu_type * get_msu_type(int id)
Gets the MSU type with the provided ID. 
int(* receive_error)(struct local_msu *self, struct msu_msg *msg)
unsigned int id
Numerical identifier for the MSU. 
deserialization_fn deserialize_error
The structure that represents an MSU located on the local machine. 
serialization_fn serialize
Defines serialization protocol for data sent to this MSU type If NULL, assumes no pointers in the msu...
int init_msu_type_id(unsigned int type_id)
Initializes the MSU type with the given ID, calling the custom constructor if appropriate. 
Data with which an MSU is initialized, and the payload for messages of type CTRL_CREATE_MSU. 
Definitions of structures for sending messages from the global controller to runtimes. 
Functions for routing MSU messages between MSUs. 
ssize_t(* serialization_fn)(struct msu_type *, struct msu_msg *, void **output)
serialization_fn serialize_error
Defines serialization protocol for errors returned to this MSU type If NULL, assumes no pointers in t...
int(* route)(struct msu_type *type, struct local_msu *sender, struct msu_msg *msg, struct msu_endpoint *output)
Choose which MSU of this type the previous MSU will route to. 
int(* init)(struct local_msu *self, struct msu_init_data *initial_data)
Type-specific construction function. 
deserialization_fn deserialize
Defines deserialization protocl for data received by this MSU type If NULL, assumes no pointers in th...
void(* destroy_type)(struct msu_type *type)
Destructor for an MSU type, should destroy context initialized in init_type. 
A message that is to be delivered to an instance of an MSU. 
char * name
Name for the msu type. 
int(* init_type)(struct msu_type *type)
Constructor for an MSU_type itself, should initialize whatever context all MSUs of this type might ne...
An endpoint to which an msu_msg can be delivered.