29 log_error(
"Cannot send message for unscheduled MSU");
42 .payload_size =
sizeof(msg)
48 log_error(
"Error sending create-msu msg to runtime %d",
52 log(LOG_RUNTIME_MESSAGES,
"Sent CREATE_MSU message");
59 log_error(
"Cannot send message for unscheduled MSU");
71 .payload_size =
sizeof(msg)
77 log_error(
"Error sending delete-msu-msg to runtime %d",
81 log(LOG_RUNTIME_MESSAGES,
"Sent DELETE_MSU message");
88 .route_id = route->
id,
94 .payload_size =
sizeof(msg)
102 log(LOG_RUNTIME_MESSAGES,
"Sent CREATE_ROUTE message");
109 .route_id = route->
id
115 .payload_size =
sizeof(msg)
123 log(LOG_RUNTIME_MESSAGES,
"Sent DELETE_ROUTE message");
130 .route_id = route->
id,
137 .payload_size =
sizeof(msg)
142 log_error(
"Error sending add-route-to-msu msg to runtime %d",
146 log(LOG_RUNTIME_MESSAGES,
"Sent ADD_ROUTE_TO_MSU message");
153 .route_id = route->
id,
154 .msu_id = endpoint->
msu->
id,
155 .key = endpoint->
key,
162 .payload_size =
sizeof(msg)
167 log_error(
"Error sending add-endpoint-to-route msg to runtime %d",
171 log(LOG_RUNTIME_MESSAGES,
"Sent ADD_ENDPOINT message");
178 .route_id = route->
id,
179 .msu_id = endpoint->
msu->
id
185 .payload_size =
sizeof(msg)
193 log(LOG_RUNTIME_MESSAGES,
"Sent ADD_ENDPOINT message");
200 .route_id = route->
id,
201 .msu_id = endpoint->
msu->
id,
208 .payload_size =
sizeof(msg)
228 .payload_size =
sizeof(msg)
233 log_error(
"Error sending create-thread msg to runtime %d", rt->
id);
236 log(LOG_RUNTIME_MESSAGES,
"Sent CREATE_THREAD message");
payload: ctrl_create_thread_msg
int send_to_runtime(unsigned int runtime_id, struct ctrl_runtime_msg_hdr *hdr, void *payload)
enum thread_mode mode
Pinned/unpinned mode for the thread.
#define MAIN_THREAD_ID
The ID to which messages should be addressed when delivered to the main runtime thread.
struct dfg_scheduling scheduling
Information about where an MSU is scheduled.
payload: ctrl_msu_route_msg
All messages sent from controller to runtime are prefixed with this header.
Payload for messages of type CTRL_DELETE_MSU.
int send_delete_msu_msg(struct dfg_msu *msu)
enum ctrl_msu_route_type type
Sub-type of message.
int send_add_endpoint_msg(struct dfg_route *route, struct dfg_route_endpoint *endpoint)
int send_mod_endpoint_msg(struct dfg_route *route, struct dfg_route_endpoint *endpoint)
Payload for messages of type CTRL_MODIFY_ROUTE.
int id
Unique identifier for the runtime.
payload: ctrl_create_msu_msg
Logging of status messages to the terminal.
struct dfg_msu_type * type
The type of the MSU and meta-routing information.
Payload for messages of type CTRL_CREATE_MSU.
Representation of a runtime in the DFG.
int send_create_msu_msg(struct dfg_msu *msu)
struct dfg_runtime * runtime
The runtime on which an MSU is running.
#define log_error(fmt,...)
int thread_id
The ID to give to the created thread.
struct dfg_msu * msu
The MSU at this endpoint to which a message would be delivered.
int send_add_route_to_msu_msg(struct dfg_route *route, struct dfg_msu *msu)
Payload for messages of type CTRL_CREATE_THREAD.
int id
A unique identifier for the MSU.
struct dfg_thread * thread
The thread on which an MSU is running.
Definitions of structures for sending messages from the global controller to runtimes.
int msu_id
ID of the MSU to be deleted.
int id
Unique identifier for the thread.
Representation of a single MSU in the dfg.
Payload for messages of type CTRL_MSU_ROUTES.
struct dfg_runtime * runtime
The runtime on which the route is located.
int id
A unique identifier for the MSU type.
int id
A unique identifier for the route.
Adds an endpoint to a route.
A route through which MSU messages can be passed.
struct msu_init_data init_data
Initial data passed to the MSU.
int msu_id
ID of the MSU to create.
Interfaces for the creation and modification of the data-flow-graph and and general description of th...
A single endpoint for an MSU route.
Deletes an endpoint from a route.
uint32_t key
The key associated with this endpoint.
enum ctrl_runtime_msg_type type
Identifies the type of payload that follows.
enum ctrl_route_msg_type type
sub-type of message
Modifies the key corresponding to a route endpoint.
Representation of a thread on a runtime in the DFG.
#define log(level, fmt,...)
Log at a custom level.
int send_delete_route_msg(struct dfg_route *route)
int send_create_route_msg(struct dfg_route *route)
int send_del_endpoint_msg(struct dfg_route *route, struct dfg_route_endpoint *endpoint)
int send_create_thread_msg(struct dfg_thread *thread, struct dfg_runtime *rt)
payload: ctrl_delete_msu_msg
struct dfg_msu_type * msu_type
The type of MSU to which this route delivers.