Registration and location of msu types. More...
Go to the source code of this file.
Macros | |
#define | MAX_TYPE_ID 1000 |
MOVEME: MAX_TYPE_ID This is the maximum ID that can be assigned to an MSU type. More... | |
#define | N_MSU_TYPES (sizeof(DEFINED_MSU_TYPES) / sizeof(struct msu_type*)) |
The number of available MSU types. More... | |
Functions | |
static int | register_msu_type (struct msu_type *type) |
Regsiters an MSU type so that it can be later referenced by its ID. More... | |
void | destroy_msu_types () |
Calls the type-sepecific constructor for each instantiated MSU type. More... | |
struct msu_type * | get_msu_type (int id) |
Gets the MSU type with the provided ID. More... | |
static bool | has_required_fields (struct msu_type *type) |
Checks whether the msu type has the required fields to be used. More... | |
static int | init_msu_type (struct msu_type *type) |
Initializes a specific MSU type, calling its init function and registering it for future calls. 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... | |
Variables | |
static struct msu_type * | DEFINED_MSU_TYPES [] = { &SOCKET_MSU_TYPE, } |
Every MSU type that can be used. More... | |
static struct msu_type * | msu_types [1000] |
Pointers to MSU Types, indexed by ID. More... | |
Registration and location of msu types.
Definition in file msu_type.c.
#define MAX_TYPE_ID 1000 |
MOVEME: MAX_TYPE_ID This is the maximum ID that can be assigned to an MSU type.
Definition at line 35 of file msu_type.c.
#define N_MSU_TYPES (sizeof(DEFINED_MSU_TYPES) / sizeof(struct msu_type*)) |
The number of available MSU types.
Definition at line 46 of file msu_type.c.
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.
id | The type ID of the MSU type to retrieve |
Definition at line 80 of file msu_type.c.
|
static |
Checks whether the msu type has the required fields to be used.
(At the moment, the only required field is receive
)
Definition at line 94 of file msu_type.c.
|
static |
Initializes a specific MSU type, calling its init function and registering it for future calls.
type | The type of MSU to be registered |
Definition at line 109 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.
Definition at line 132 of file msu_type.c.
|
static |
Regsiters an MSU type so that it can be later referenced by its ID.
type | MSU Type to be registered |
Definition at line 58 of file msu_type.c.
|
static |
Every MSU type that can be used.
Defined in msu_type_list.h
, or overridden from previous definition
Definition at line 41 of file msu_type.c.
|
static |
Pointers to MSU Types, indexed by ID.
Definition at line 51 of file msu_type.c.