YARP  2.3.68+225-20170329.5+gitb0d3289
Yet Another Robot Platform
yarp::os::MpiComm Class Reference

Wrapper for MPI_Comm communicator. More...

#include <mpi_carrier/include/yarp/os/MpiComm.h>

Public Member Functions

 MpiComm (ConstString name)
 
 ~MpiComm ()
 
bool connect (ConstString port)
 
bool accept ()
 
void disconnect (bool disconn)
 
bool notLocal (ConstString other)
 
void openPort ()
 
void closePort ()
 
int rank ()
 

Public Attributes

char port_name [MPI_MAX_PORT_NAME]
 
char unique_id [10+MPI_MAX_PROCESSOR_NAME]
 
MPI_Comm comm
 
yarp::os::Semaphore sema
 

Private Attributes

ConstString name
 

Detailed Description

Wrapper for MPI_Comm communicator.

Uses the dynamic process management from the MPI-2 standard to set up a communicator between two seperate processes.

Note
Needs an MPI implementation with THREAD_MULTIPLE support.

Definition at line 56 of file MpiComm.h.

Constructor & Destructor Documentation

◆ MpiComm()

MpiComm::MpiComm ( ConstString  name)

Definition at line 82 of file MpiComm.cpp.

◆ ~MpiComm()

yarp::os::MpiComm::~MpiComm ( )
inline

Definition at line 67 of file MpiComm.h.

Member Function Documentation

◆ accept()

bool MpiComm::accept ( )

Definition at line 152 of file MpiComm.cpp.

◆ closePort()

void yarp::os::MpiComm::closePort ( )
inline

Definition at line 81 of file MpiComm.h.

◆ connect()

bool MpiComm::connect ( ConstString  port)

Definition at line 115 of file MpiComm.cpp.

◆ disconnect()

void MpiComm::disconnect ( bool  disconn)

Definition at line 180 of file MpiComm.cpp.

◆ notLocal()

bool MpiComm::notLocal ( ConstString  other)

Definition at line 107 of file MpiComm.cpp.

◆ openPort()

void yarp::os::MpiComm::openPort ( )
inline

Definition at line 78 of file MpiComm.h.

◆ rank()

int yarp::os::MpiComm::rank ( )
inline

Definition at line 84 of file MpiComm.h.

Member Data Documentation

◆ comm

MPI_Comm yarp::os::MpiComm::comm

Definition at line 62 of file MpiComm.h.

◆ name

ConstString yarp::os::MpiComm::name
private

Definition at line 57 of file MpiComm.h.

◆ port_name

char yarp::os::MpiComm::port_name[MPI_MAX_PORT_NAME]

Definition at line 60 of file MpiComm.h.

◆ sema

yarp::os::Semaphore yarp::os::MpiComm::sema

Definition at line 63 of file MpiComm.h.

◆ unique_id

char yarp::os::MpiComm::unique_id[10+MPI_MAX_PROCESSOR_NAME]

Definition at line 61 of file MpiComm.h.


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