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 }
yarp::os::Portable
This is a base class for objects that can be both read from and be written to the YARP network.
Definition: Portable.h:29
yarp::os::NullConnectionReader::isActive
bool isActive() const override
Definition: NullConnectionReader.cpp:105
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
yarp::os::NullConnectionReader::isValid
bool isValid() const override
Definition: NullConnectionReader.cpp:100
yarp::os::NullConnectionReader::requestDrop
void requestDrop() override
Tag the connection to be dropped after the current message.
Definition: NullConnectionReader.cpp:115
yarp::os::NullConnectionReader::expectInt64
std::int64_t expectInt64() override
Read a 64-bit integer from the network connection.
Definition: NullConnectionReader.cpp:40
yarp::os::NullConnectionReader::expectBlock
bool expectBlock(char *data, size_t len) override
Read a block of data from the network connection.
Definition: NullConnectionReader.cpp:12
YARP_UNUSED
#define YARP_UNUSED(var)
Definition: api.h:159
yarp::os::NullConnectionReader::expectInt32
std::int32_t expectInt32() override
Read a 32-bit integer from the network connection.
Definition: NullConnectionReader.cpp:35
yarp::os::NullConnectionReader::convertTextMode
bool convertTextMode() override
Reads in a standard description in text mode, and converts it to a standard description in binary.
Definition: NullConnectionReader.cpp:65
yarp::os::NullConnectionReader::getRemoteContact
Contact getRemoteContact() const override
Gets information about who is supplying the data being read, if that information is available.
Definition: NullConnectionReader.cpp:90
yarp::os::NullConnectionReader::getWriter
ConnectionWriter * getWriter() override
Gets a way to reply to the message, if possible.
Definition: NullConnectionReader.cpp:75
yarp::os::ConnectionWriter
An interface for writing to a network connection.
Definition: ConnectionWriter.h:40
yarp::os::NullConnectionReader::isTextMode
bool isTextMode() const override
Check if the connection is text mode.
Definition: NullConnectionReader.cpp:60
yarp::os::NullConnectionReader::expectInt8
std::int8_t expectInt8() override
Read a 8-bit integer from the network connection.
Definition: NullConnectionReader.cpp:25
yarp::os::NullConnectionReader::getSize
size_t getSize() const override
Checks how much data is available.
Definition: NullConnectionReader.cpp:70
yarp::os::NullConnectionReader::expectInt16
std::int16_t expectInt16() override
Read a 16-bit integer from the network connection.
Definition: NullConnectionReader.cpp:30
yarp::os::NullConnectionReader::expectText
std::string expectText(const char terminatingChar='\n') override
Read some text from the network connection.
Definition: NullConnectionReader.cpp:19
yarp::os::Bytes
A simple abstraction for a block of bytes.
Definition: Bytes.h:28
yarp::os::NullConnectionReader::getLocalContact
Contact getLocalContact() const override
Gets information about who is receiving the data, if that information is available.
Definition: NullConnectionReader.cpp:95
yarp::os::NullConnectionReader::getReference
Portable * getReference() const override
Get a direct pointer to the object being sent, if possible.
Definition: NullConnectionReader.cpp:85
yarp::conf::float32_t
float float32_t
Definition: numeric.h:50
yarp::os::NullConnectionReader::pushInt
bool pushInt(int x) override
Store an integer to return on the next call to expectInt()
Definition: NullConnectionReader.cpp:55
yarp::os::NullConnectionReader::expectFloat64
yarp::conf::float64_t expectFloat64() override
Read a 64-bit floating point number from the network connection.
Definition: NullConnectionReader.cpp:50
yarp::os::NullConnectionReader::isError
bool isError() const override
Definition: NullConnectionReader.cpp:110
NullConnectionReader.h
yarp::os::Contact
Represents how to reach a part of a YARP network.
Definition: Contact.h:39
yarp::conf::float64_t
double float64_t
Definition: numeric.h:51
yarp::os::NullConnectionReader::expectFloat32
yarp::conf::float32_t expectFloat32() override
Read a 32-bit floating point number from the network connection.
Definition: NullConnectionReader.cpp:45
yarp::os::NullConnectionReader::getConnectionModifiers
const Searchable & getConnectionModifiers() const override
Access modifiers associated with the connection, if any.
Definition: NullConnectionReader.cpp:119
yarp::os::NullConnectionReader::readEnvelope
Bytes readEnvelope() override
Read a message envelope, if available.
Definition: NullConnectionReader.cpp:80