MESH Communications Header. More...
Go to the source code of this file.
Functions | |
| void | mesh_comm_write (gchar *comm_thread, void *arg, mesh_shared_data *msd, gint blocking_mode) |
| Simulates a write to the communication infrastructure. The behavior of this write is specified within a comm_thread which is identified by name. This API function will create an instance of a comm_thread and suspend the calling thread according to the blocking_mode specified. Depending on the comm_thread specified, additional arguments or shared data might be passed as well. | |
| void | mesh_comm_write_delayed (gchar *comm_thread, void *arg, mesh_shared_data *msd, gint blocking_mode) |
| Performs mesh_comm_write() after the delay of the next consume call has been applied. For of arguments,. | |
| void | mesh_comm_read (gchar *comm_thread, void *arg, mesh_shared_data *msd, gint blocking_mode) |
| Simulates a read to the communication infrastructure. The behavior of this read is specified within a comm_thread which is identified by name. This API function will create an instance of a comm_thread and suspend the calling thread according to the blocking_mode specified. Depending on the comm_thread specified, additional arguments or shared data might be passed as well. | |
| void | mesh_comm_read_delayed (gchar *comm_thread, void *arg, mesh_shared_data *msd, gint blocking_mode) |
| Performs mesh_comm_read() after the delay of the next consume call has been applied. For of arguments,. | |
| void | mesh_create_comm_thread (gchar *name, mesh_scheduler *cs, void *(*thread)(void *)) |
| Creates a communication threads. Unlike conventional execution threads, a creation of a communication thread does not automatically start the thread and make it eligible to run. Instead, the thread is registered with the simulator and is available to be started via mesh_comm_read and mesh_comm_write calls. | |
MESH Communications Header.
| void mesh_comm_read | ( | gchar * | comm_thread, | |
| void * | arg, | |||
| mesh_shared_data * | msd, | |||
| gint | blocking_mode | |||
| ) |
Simulates a read to the communication infrastructure. The behavior of this read is specified within a comm_thread which is identified by name. This API function will create an instance of a comm_thread and suspend the calling thread according to the blocking_mode specified. Depending on the comm_thread specified, additional arguments or shared data might be passed as well.
| comm_thread | Name of the communication thread that will model the functionality of this read call | |
| arg | An optional argument to the communication thread | |
| msd | A shared data entity that allows data to be passed through mesh_comm_read or mesh_comm_write calls | |
| blocking_mode | Defines what happens to the calling execution thread while a comm thread is executing. BLOCK_RESOURCE -- the resource running the execution thread will not be able to run until the comm thread has completed. BLOCK_THREAD -- the execution thread must wait for the comm thread, but the resource does not (i.e. resource can context switch to another thread while waiting for communication). NO_BLOCKING -- the execution thread is allowed to run without having to wait for the comm thread. precond The comm_thread must be created via mesh_create_comm_thread(). |
| void mesh_comm_read_delayed | ( | gchar * | comm_thread, | |
| void * | arg, | |||
| mesh_shared_data * | msd, | |||
| gint | blocking_mode | |||
| ) |
Performs mesh_comm_read() after the delay of the next consume call has been applied. For of arguments,.
| void mesh_comm_write | ( | gchar * | comm_thread, | |
| void * | arg, | |||
| mesh_shared_data * | msd, | |||
| gint | blocking_mode | |||
| ) |
Simulates a write to the communication infrastructure. The behavior of this write is specified within a comm_thread which is identified by name. This API function will create an instance of a comm_thread and suspend the calling thread according to the blocking_mode specified. Depending on the comm_thread specified, additional arguments or shared data might be passed as well.
label mesh_comm_write
| comm_thread | Name of the communication thread that will model the functionality of this read call | |
| arg | An optional argument to the communication thread | |
| msd | A shared data entity that allows data to be passed through mesh_comm_read or mesh_comm_write calls | |
| blocking_mode | Defines what happens to the calling execution thread while a comm thread is executing. See mesh_comm_read() for more information. precond The comm_thread must be created via mesh_create_comm_thread(). |
| void mesh_comm_write_delayed | ( | gchar * | comm_thread, | |
| void * | arg, | |||
| mesh_shared_data * | msd, | |||
| gint | blocking_mode | |||
| ) |
Performs mesh_comm_write() after the delay of the next consume call has been applied. For of arguments,.
label mesh_comm_write_delayed
| void mesh_create_comm_thread | ( | gchar * | name, | |
| mesh_scheduler * | cs, | |||
| void *(*)(void *) | thread | |||
| ) |
Creates a communication threads. Unlike conventional execution threads, a creation of a communication thread does not automatically start the thread and make it eligible to run. Instead, the thread is registered with the simulator and is available to be started via mesh_comm_read and mesh_comm_write calls.
label mesh_create_comm_thread
| name | Name of the thread | |
| ms | Pointer to the mesh_scheduler that will serve as the default scheduler for this thread | |
| (*thread) | Function pointer to the function that implements the comm thread functionality. |
1.7.1