YARP
Yet Another Robot Platform
ModifyingCarrier.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_OS_MODIFYINGCARRIER_H
10 #define YARP_OS_MODIFYINGCARRIER_H
11 
13 
14 namespace yarp {
15 namespace os {
16 
23 {
24 public:
25  Carrier* create() const override = 0;
26 
27  std::string getName() const override = 0;
28 
29  bool checkHeader(const yarp::os::Bytes& header) override;
30  void getHeader(yarp::os::Bytes& header) const override;
31  bool respondToHeader(yarp::os::ConnectionState& proto) override;
32  bool modifiesIncomingData() const override;
33  bool modifiesOutgoingData() const override;
34  bool modifiesReply() const override;
35  void setCarrierParams(const yarp::os::Property& params) override;
36  void getCarrierParams(yarp::os::Property& params) const override;
37  bool configureFromProperty(yarp::os::Property& prop) override;
38  // only remains to implement modifyIncomingData()
39 };
40 
41 } // namespace os
42 } // namespace yarp
43 
44 #endif // YARP_OS_MODIFYINGCARRIER_H
yarp::os::Carrier
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
Definition: Carrier.h:48
yarp::os::ModifyingCarrier
A starter class for implementing simple modifying carriers.
Definition: ModifyingCarrier.h:23
YARP_os_API
#define YARP_os_API
Definition: api.h:19
AbstractCarrier.h
yarp::os::AbstractCarrier
A starter class for implementing simple carriers.
Definition: AbstractCarrier.h:25
yarp::os::ModifyingCarrier::create
Carrier * create() const override=0
Factory method.
yarp::os::ModifyingCarrier::getName
std::string getName() const override=0
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
yarp::os::Bytes
A simple abstraction for a block of bytes.
Definition: Bytes.h:28
yarp::os::ConnectionState
The basic state of a connection - route, streams in use, etc.
Definition: ConnectionState.h:31
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::Property
A class for storing options and configuration information.
Definition: Property.h:37