Tunneling class between two processes, connected by shared memory. More...
#include <ipctunnel.h>
Data Structures | |
struct | InternalSharedData |
Public Member Functions | |
IPCTunnel (const std::string ®ion_name, size_t numBuffers, size_t bufferSize) | |
Construct a new Tunnel for IPC Communications. | |
IPCTunnel (const std::string ®ion_name) | |
Access an existing Tunnel. | |
virtual | ~IPCTunnel () |
Destructor. | |
void | shutdown (bool all=false) |
Shutdown. | |
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. | |
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 |
SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::IPCTunnel | ( | const std::string & | region_name, | |
size_t | numBuffers, | |||
size_t | bufferSize | |||
) | [inline] |
Construct a new Tunnel for IPC Communications.
region_name | Name of the shared-memory region to use. | |
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.
SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::IPCTunnel | ( | const std::string & | region_name | ) | [inline] |
Access an existing Tunnel.
region_name | Name of the shared-memory region to access |
References SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::sharedData.