My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Typedefs | Functions
msu_type.h File Reference

Defines a type of MSU, including callback and accessor functions. More...

#include "routing.h"
#include "ctrl_runtime_messages.h"
#include <stdint.h>

Go to the source code of this file.

Classes

struct  msu_type
 Defines a type of MSU. More...
 

Typedefs

typedef ssize_t(* serialization_fn )(struct msu_type *, struct msu_msg *, void **output)
 
typedef void *(* deserialization_fn )(struct local_msu *self, size_t input_size, void *input, size_t *out_size)
 

Functions

void destroy_msu_types ()
 Calls the type-sepecific constructor for each instantiated MSU type. More...
 
int init_msu_type_id (unsigned int type_id)
 Initializes the MSU type with the given ID, calling the custom constructor if appropriate. More...
 
struct msu_typeget_msu_type (int id)
 Gets the MSU type with the provided ID. More...
 

Detailed Description

Defines a type of MSU, including callback and accessor functions.

Definition in file msu_type.h.

Typedef Documentation

typedef void*(* deserialization_fn)(struct local_msu *self, size_t input_size, void *input, size_t *out_size)

Definition at line 39 of file msu_type.h.

typedef ssize_t(* serialization_fn)(struct msu_type *, struct msu_msg *, void **output)

Definition at line 38 of file msu_type.h.

Function Documentation

void destroy_msu_types ( )

Calls the type-sepecific constructor for each instantiated MSU type.

Definition at line 69 of file msu_type.c.

struct msu_type* get_msu_type ( int  id)

Gets the MSU type with the provided ID.

Parameters
idThe type ID of the MSU type to retrieve
Returns
The MSU Type with the given ID, NULL in N/A

Definition at line 80 of file msu_type.c.

int init_msu_type_id ( unsigned int  type_id)

Initializes the MSU type with the given ID, calling the custom constructor if appropriate.

This function is meant to be called on each MSU type that is defined in the DFG used to initialize the runtime.

Returns
0 on success, -1 on error

Definition at line 132 of file msu_type.c.