SST
11.0.0
StructuralSimulationToolkit
|
Tunneling class between two processes, connected by shared memory. More...
#include <ipctunnel.h>
Public Member Functions | |
IPCTunnel (uint32_t comp_id, size_t numBuffers, size_t bufferSize, uint32_t expectedChildren=1) | |
Construct a new Tunnel for IPC Communications. More... | |
IPCTunnel (const std::string ®ion_name) | |
Access an existing Tunnel. More... | |
virtual | ~IPCTunnel () |
Destructor. | |
void | shutdown (bool all=false) |
Shutdown. | |
const std::string & | getRegionName (void) const |
ShareDataType * | getSharedData () |
return a pointer to the ShareDataType region | |
void | writeMessage (size_t core, const MsgType &command) |
Blocks until space is available. | |
MsgType | readMessage (size_t buffer) |
Blocks until a command is available. | |
bool | readMessageNB (size_t buffer, MsgType *result) |
Non-blocking version of readMessage. | |
void | clearBuffer (size_t core) |
Empty the messages in the buffer. | |
Protected Attributes | |
ShareDataType * | sharedData |
Pointer to the Shared Data Region. | |
Tunneling class between two processes, connected by shared memory.
Supports multiple circular-buffer queues, and a generic region of memory for shared data.
ShareDataType | Type to put in the shared data region |
MsgType | Type of messages being sent in the circular buffers |
|
inline |
Construct a new Tunnel for IPC Communications.
comp_id | Component ID of owner |
numBuffers | Number of buffers for which we should tunnel |
bufferSize | How large each core's buffer should be |
References SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::sharedData.
|
inline |
Access an existing Tunnel.
region_name | Name of the shared-memory region to access |
References SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::sharedData.