YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
UdpCarrier.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_OS_IMPL_UDPCARRIER_H
8#define YARP_OS_IMPL_UDPCARRIER_H
9
12
13namespace yarp::os::impl {
14
19 public AbstractCarrier
20{
21public:
23
24 Carrier* create() const override;
25
26 std::string getName() const override;
27
28 virtual int getSpecifierCode() const;
29
30 bool checkHeader(const Bytes& header) override;
31 void getHeader(Bytes& header) const override;
32 void setParameters(const Bytes& header) override;
33 bool requireAck() const override;
34 bool isConnectionless() const override;
35 bool respondToHeader(ConnectionState& proto) override;
36 bool expectReplyToHeader(ConnectionState& proto) override;
37};
38
39} // namespace yarp::os::impl
40
41#endif // YARP_OS_IMPL_UDPCARRIER_H
A starter class for implementing simple carriers.
A simple abstraction for a block of bytes.
Definition Bytes.h:24
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
Definition Carrier.h:44
The basic state of a connection - route, streams in use, etc.
Communicating between two ports via UDP.
Definition UdpCarrier.h:20
bool expectReplyToHeader(ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
void setParameters(const Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
Carrier * create() const override
Factory method.
virtual int getSpecifierCode() const
void getHeader(Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
bool checkHeader(const Bytes &header) override
Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for...
bool respondToHeader(ConnectionState &proto) override
Respond to the header.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
The components from which ports and connections are built.