YARP
Yet Another Robot Platform
NullConnectionReader.cpp
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 
10 
11 
12 bool yarp::os::NullConnectionReader::expectBlock(char* data, size_t len)
13 {
14  YARP_UNUSED(data);
15  YARP_UNUSED(len);
16  return false;
17 }
18 
19 std::string yarp::os::NullConnectionReader::expectText(const char terminatingChar)
20 {
21  YARP_UNUSED(terminatingChar);
22  return {};
23 }
24 
26 {
27  return 0;
28 }
29 
31 {
32  return 0;
33 }
34 
36 {
37  return 0;
38 }
39 
41 {
42  return 0;
43 }
44 
46 {
47  return 0.0f;
48 }
49 
51 {
52  return 0.0;
53 }
54 
56 {
57  YARP_UNUSED(x);
58  return false;
59 }
61 {
62  return false;
63 }
64 
66 {
67  return false;
68 }
69 
71 {
72  return 0;
73 }
74 
76 {
77  return nullptr;
78 }
79 
81 {
82  return {nullptr, 0};
83 }
84 
86 {
87  return nullptr;
88 }
89 
91 {
92  return Contact();
93 }
94 
96 {
97  return Contact();
98 }
99 
101 {
102  return false;
103 }
104 
106 {
107  return false;
108 }
109 
111 {
112  return true;
113 }
114 
116 {
117 }
118 
120 {
121  return blank;
122 }
A simple abstraction for a block of bytes.
Definition: Bytes.h:28
An interface for writing to a network connection.
Represents how to reach a part of a YARP network.
Definition: Contact.h:39
Portable * getReference() const override
Get a direct pointer to the object being sent, if possible.
size_t getSize() const override
Checks how much data is available.
bool isTextMode() const override
Check if the connection is text mode.
const Searchable & getConnectionModifiers() const override
Access modifiers associated with the connection, if any.
bool convertTextMode() override
Reads in a standard description in text mode, and converts it to a standard description in binary.
Contact getLocalContact() const override
Gets information about who is receiving the data, if that information is available.
std::int8_t expectInt8() override
Read a 8-bit integer from the network connection.
std::string expectText(const char terminatingChar='\n') override
Read some text from the network connection.
std::int64_t expectInt64() override
Read a 64-bit integer from the network connection.
std::int16_t expectInt16() override
Read a 16-bit integer from the network connection.
Bytes readEnvelope() override
Read a message envelope, if available.
yarp::conf::float32_t expectFloat32() override
Read a 32-bit floating point number from the network connection.
Contact getRemoteContact() const override
Gets information about who is supplying the data being read, if that information is available.
void requestDrop() override
Tag the connection to be dropped after the current message.
yarp::conf::float64_t expectFloat64() override
Read a 64-bit floating point number from the network connection.
bool expectBlock(char *data, size_t len) override
Read a block of data from the network connection.
ConnectionWriter * getWriter() override
Gets a way to reply to the message, if possible.
std::int32_t expectInt32() override
Read a 32-bit integer from the network connection.
bool pushInt(int x) override
Store an integer to return on the next call to expectInt()
This is a base class for objects that can be both read from and be written to the YARP network.
Definition: Portable.h:29
A base class for nested structures that can be searched.
Definition: Searchable.h:69
double float64_t
Definition: numeric.h:51
float float32_t
Definition: numeric.h:50
#define YARP_UNUSED(var)
Definition: api.h:159