YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
MpiP2PCarrier.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2010 Daniel Krieg <krieg@fias.uni-frankfurt.de>
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_MPIP2PCARRIER_H
8#define YARP_MPIP2PCARRIER_H
9
10#include "MpiCarrier.h"
11#include "MpiP2PStream.h"
12
23 public MpiCarrier
24{
25public:
28 {
29 target = "MPI_____";
30 }
31
32 virtual ~MpiP2PCarrier() {
33 }
34
35 void close() override {
36 yCDebug(MPI_CARRIER, "[MpiP2PCarrier @ %s] Closing carrier", name.c_str() );
37 delete comm;
38 }
39
40 Carrier *create() const override {
41 return new MpiP2PCarrier();
42 }
43
44 void createStream(bool sender) override {
45 comm = new MpiComm(route);
47 }
48
49 std::string getName() const override {
50 return "mpi";
51 }
52
53 bool supportReply() const override {
54 return true;
55 }
56};
57
58#endif // YARP_MPIP2PCARRIER_H
const yarp::os::LogComponent & MPI_CARRIER()
Abstract base carrier for managing port communication via MPI.
Definition MpiCarrier.h:26
std::string target
Definition MpiCarrier.h:32
MpiStream * stream
Definition MpiCarrier.h:28
MpiComm * comm
Definition MpiCarrier.h:29
std::string name
Definition MpiCarrier.h:31
std::string route
Definition MpiCarrier.h:31
Wrapper for MPI_Comm communicator.
Definition MpiComm.h:50
Carrier for port communicating via MPI point-to-point send/receive.
Carrier * create() const override
Factory method.
bool supportReply() const override
This flag is used by YARP to determine whether the connection can carry RPC traffic,...
virtual ~MpiP2PCarrier()
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
void close() override
Close the carrier.
void createStream(bool sender) override
Implements communication via MPI point-to-point send/receive.
#define yCDebug(component,...)