ROOT-Sim core  3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
msg_queue.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include <core/core.h>
14 #include <lp/msg.h>
15 
16 extern void msg_queue_global_init(void);
17 extern void msg_queue_global_fini(void);
18 extern void msg_queue_init(void);
19 extern void msg_queue_fini(void);
20 extern struct lp_msg *msg_queue_extract(void);
21 extern simtime_t msg_queue_time_peek(void);
22 extern void msg_queue_insert(struct lp_msg *msg);
double simtime_t
Simulation time data type.
Definition: ROOT-Sim.h:27
Core ROOT-Sim functionalities.
Message management functions.
void msg_queue_fini(void)
Finalizes the message queue for the current thread.
Definition: msg_queue.c:67
void msg_queue_init(void)
Initializes the message queue for the current thread.
Definition: msg_queue.c:58
struct lp_msg * msg_queue_extract(void)
Extracts the next message from the queue.
Definition: msg_queue.c:109
void msg_queue_global_fini(void)
Finalizes the message queue at the node level.
Definition: msg_queue.c:84
simtime_t msg_queue_time_peek(void)
Peeks the timestamp of the next message from the queue.
Definition: msg_queue.c:122
void msg_queue_insert(struct lp_msg *msg)
Inserts a message in the queue.
Definition: msg_queue.c:132
A model simulation message.
Definition: msg.h:59