Wrappers around S4U's communication methods. More...
#include <S4U_Mailbox.h>
Static Public Member Functions | |
static void | dputMessage (std::string mailbox_name, SimulationMessage *msg) |
Asynchronously send a message to a mailbox in a "fire and forget" fashion. More... | |
static std::string | generateUniqueMailboxName (std::string) |
Generate a unique mailbox name given a prefix (this method simply appends an increasing sequence number to the prefix) More... | |
static unsigned long | generateUniqueSequenceNumber () |
Generate a unique sequence number. More... | |
static std::shared_ptr< SimulationMessage > | getMessage (std::string mailbox) |
Synchronously receive a message from a mailbox. More... | |
static std::shared_ptr< SimulationMessage > | getMessage (std::string mailbox, double timeout) |
Synchronously receive a message from a mailbox, with a timeout. More... | |
static std::shared_ptr< S4U_PendingCommunication > | igetMessage (std::string mailbox_name) |
Asynchronously receive a message from a mailbox. More... | |
static std::shared_ptr< S4U_PendingCommunication > | iputMessage (std::string mailbox_name, SimulationMessage *msg) |
Asynchronously send a message to a mailbox. More... | |
static void | putMessage (std::string mailbox, SimulationMessage *m) |
Synchronously send a message to a mailbox. More... | |
Detailed Description
Wrappers around S4U's communication methods.
Member Function Documentation
◆ dputMessage()
|
static |
Asynchronously send a message to a mailbox in a "fire and forget" fashion.
- Parameters
-
mailbox_name the mailbox name msg the SimulationMessage
◆ generateUniqueMailboxName()
|
static |
Generate a unique mailbox name given a prefix (this method simply appends an increasing sequence number to the prefix)
- Parameters
-
prefix a prefix for the mailbox name
- Returns
- a unique mailbox name as a string
◆ generateUniqueSequenceNumber()
|
static |
Generate a unique sequence number.
- Returns
- a unique sequence number
◆ getMessage() [1/2]
|
static |
Synchronously receive a message from a mailbox.
- Parameters
-
mailbox_name the mailbox name
- Returns
- the message, or nullptr (in which case it's likely a brutal termination)
- Exceptions
-
std::shared_ptr<NetworkError>
◆ getMessage() [2/2]
|
static |
Synchronously receive a message from a mailbox, with a timeout.
- Parameters
-
mailbox_name the mailbox name timeout a timeout value in seconds (<0 means never timeout)
- Returns
- the message, or nullptr (in which case it's likely a brutal termination)
- Exceptions
-
std::shared_ptr<NetworkError>
◆ igetMessage()
|
static |
Asynchronously receive a message from a mailbox.
- Parameters
-
mailbox_name the mailbox name
- Returns
- a pending communication handle
- Exceptions
-
std::shared_ptr<NetworkError>
◆ iputMessage()
|
static |
Asynchronously send a message to a mailbox.
- Parameters
-
mailbox_name the mailbox name msg the SimulationMessage
- Returns
- a pending communication handle
- Exceptions
-
std::shared_ptr<NetworkError>
◆ putMessage()
|
static |
Synchronously send a message to a mailbox.
- Parameters
-
mailbox_name the mailbox name msg the SimulationMessage
- Exceptions
-
std::shared_ptr<NetworkError>
The documentation for this class was generated from the following files:
- S4U_Mailbox.h
- S4U_Mailbox.cpp