Yet Another Robot Platform
No Matches
MpiComm Class Reference

Wrapper for MPI_Comm communicator. More...

#include <mpi_carrier/MpiComm.h>

Public Member Functions

 MpiComm (std::string name)
 ~MpiComm ()
bool connect (std::string port)
bool accept ()
void disconnect (bool disconn)
bool notLocal (std::string 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

Detailed Description

Wrapper for MPI_Comm communicator.

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

Needs an MPI implementation with THREAD_MULTIPLE support.

Definition at line 49 of file MpiComm.h.

Constructor & Destructor Documentation

◆ MpiComm()

MpiComm::MpiComm ( std::string  name)

Definition at line 80 of file MpiComm.cpp.

◆ ~MpiComm()

MpiComm::~MpiComm ( )

Definition at line 61 of file MpiComm.h.

Member Function Documentation

◆ accept()

bool MpiComm::accept ( )

Definition at line 143 of file MpiComm.cpp.

◆ closePort()

void MpiComm::closePort ( )

Definition at line 73 of file MpiComm.h.

◆ connect()

bool MpiComm::connect ( std::string  port)

Definition at line 113 of file MpiComm.cpp.

◆ disconnect()

void MpiComm::disconnect ( bool  disconn)

Definition at line 165 of file MpiComm.cpp.

◆ notLocal()

bool MpiComm::notLocal ( std::string  other)

Definition at line 105 of file MpiComm.cpp.

◆ openPort()

void MpiComm::openPort ( )

Definition at line 70 of file MpiComm.h.

◆ rank()

int MpiComm::rank ( )

Definition at line 76 of file MpiComm.h.

Member Data Documentation

◆ comm

MPI_Comm MpiComm::comm

Definition at line 56 of file MpiComm.h.

◆ port_name

char MpiComm::port_name[MPI_MAX_PORT_NAME]

Definition at line 54 of file MpiComm.h.

◆ sema

yarp::os::Semaphore MpiComm::sema

Definition at line 57 of file MpiComm.h.

◆ unique_id

char MpiComm::unique_id[10+MPI_MAX_PROCESSOR_NAME]

Definition at line 55 of file MpiComm.h.

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