Molssi Driver Interface Library
|
Dummy communication implementation for testing purposes. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include "mdi.h"
#include "mdi_test.h"
#include "mdi_global.h"
Functions | |
int | enable_test_support (int code_id) |
Enable support for the TEST method. | |
int | test_on_selection () |
Callback when the end-user selects TCP as the method. | |
int | test_on_accept_communicator () |
Callback when the TEST method must accept a communicator. | |
int | test_on_send_command (const char *command, MDI_Comm comm, int *skip_flag) |
Callback when the TEST method must send a command. | |
int | test_after_send_command (const char *command, MDI_Comm comm) |
Callback after the TEST method has received a command. | |
int | test_on_recv_command (MDI_Comm comm) |
Callback when the TEST method must receive a command. | |
int | test_initialize () |
Perform initialization of a dummy communicator for testing purposes. More... | |
int | test_send (const void *buf, int count, MDI_Datatype datatype, MDI_Comm comm, int msg_flag) |
Dummy function to handle sending data through an MDI connection, for testing purposes. More... | |
int | test_recv (void *buf, int count, MDI_Datatype datatype, MDI_Comm comm, int msg_flag) |
Dummy function to handle receiving data through an MDI connection, for testing purposes. More... | |
Dummy communication implementation for testing purposes.
int test_initialize | ( | ) |
Perform initialization of a dummy communicator for testing purposes.
int test_recv | ( | void * | buf, |
int | count, | ||
MDI_Datatype | datatype, | ||
MDI_Comm | comm, | ||
int | msg_flag | ||
) |
Dummy function to handle receiving data through an MDI connection, for testing purposes.
[in] | buf | Pointer to the buffer where the received data will be stored. |
[in] | count | Number of values (integers, double precision floats, characters, etc.) to be received. |
[in] | datatype | MDI handle (MDI_INT, MDI_DOUBLE, MDI_CHAR, etc.) corresponding to the type of data to be received. |
[in] | comm | MDI communicator associated with the connection to the sending code. |
[in] | msg_flag | Type of role this data has within a message. 0: Not part of a message. 1: The header of a message. 2: The body (data) of a message. |
int test_send | ( | const void * | buf, |
int | count, | ||
MDI_Datatype | datatype, | ||
MDI_Comm | comm, | ||
int | msg_flag | ||
) |
Dummy function to handle sending data through an MDI connection, for testing purposes.
[in] | buf | Pointer to the data to be sent. |
[in] | count | Number of values (integers, double precision floats, characters, etc.) to be sent. |
[in] | datatype | MDI handle (MDI_INT, MDI_DOUBLE, MDI_CHAR, etc.) corresponding to the type of data to be sent. |
[in] | comm | MDI communicator associated with the intended recipient code. |
[in] | msg_flag | Type of role this data has within a message. 0: Not part of a message. 1: The header of a message. 2: The body (data) of a message. |