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

Tunneling class between two processes, connected by shared memory. More...

#include <ipctunnel.h>

Data Structures

struct  InternalSharedData

Public Member Functions

 IPCTunnel (const std::string &region_name, size_t numBuffers, size_t bufferSize)
 Construct a new Tunnel for IPC Communications.
 IPCTunnel (const std::string &region_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.

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:
ShareDataType Type to put in the shared data region
MsgType Type of messages being sent in the circular buffers

Constructor & Destructor Documentation

template<typename ShareDataType , typename MsgType >
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.

Parameters:
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.

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

Access an existing Tunnel.

Parameters:
region_name Name 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:

Generated on 14 Sep 2015 for SST by  doxygen 1.6.1