SST  11.0.0
StructuralSimulationToolkit
SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType > Class Template Reference

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 &region_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.
 

Detailed Description

template<typename ShareDataType, typename MsgType>
class SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >

Tunneling class between two processes, connected by shared memory.

Supports multiple circular-buffer queues, and a generic region of memory for shared data.

Template Parameters
ShareDataTypeType to put in the shared data region
MsgTypeType of messages being sent in the circular buffers

Constructor & Destructor Documentation

template<typename ShareDataType , typename MsgType >
SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::IPCTunnel ( uint32_t  comp_id,
size_t  numBuffers,
size_t  bufferSize,
uint32_t  expectedChildren = 1 
)
inline

Construct a new Tunnel for IPC Communications.

Parameters
comp_idComponent ID of owner
numBuffersNumber of buffers for which we should tunnel
bufferSizeHow large each core's buffer should be

References SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::sharedData.

template<typename ShareDataType , typename MsgType >
SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::IPCTunnel ( const std::string &  region_name)
inline

Access an existing Tunnel.

Parameters
region_nameName of the shared-memory region to access

References SST::Core::Interprocess::IPCTunnel< ShareDataType, MsgType >::sharedData.


The documentation for this class was generated from the following file: