YARP
Yet Another Robot Platform
NullConnectionWriter.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 #include <yarp/os/PortReader.h>
11 
12 void yarp::os::NullConnectionWriter::appendBlock(const char* data, size_t len)
13 {
14  YARP_UNUSED(data);
15  YARP_UNUSED(len);
16 }
17 
19 {
20  YARP_UNUSED(data);
21 }
22 
24 {
25  YARP_UNUSED(data);
26 }
27 
29 {
30  YARP_UNUSED(data);
31 }
32 
34 {
35  YARP_UNUSED(data);
36 }
37 
39 {
40  YARP_UNUSED(data);
41 }
42 
44 {
45  YARP_UNUSED(data);
46 }
47 
48 void yarp::os::NullConnectionWriter::appendText(const std::string& str, const char terminate)
49 {
50  YARP_UNUSED(str);
51  YARP_UNUSED(terminate);
52 }
53 
54 void yarp::os::NullConnectionWriter::appendExternalBlock(const char* data, size_t len)
55 {
56  YARP_UNUSED(data);
57  YARP_UNUSED(len);
58 }
59 
61 {
62  return false;
63 }
64 
66 {
67  return false;
68 }
69 
71 {
72  YARP_UNUSED(argc);
73  YARP_UNUSED(argv);
74 }
75 
77 {
78  YARP_UNUSED(reader);
79 }
80 
82 {
83  YARP_UNUSED(obj);
84 }
85 
87 {
88  return false;
89 }
90 
92 {
93  return false;
94 }
95 
97 {
98  return true;
99 }
100 
102 {
103  return true;
104 }
105 
107 {
108 }
109 
111 {
112  return true;
113 }
114 
116 {
117  return nullptr;
118 }
yarp::os::NullConnectionWriter::isValid
bool isValid() const override
Definition: NullConnectionWriter.cpp:91
yarp::os::NullConnectionWriter::appendExternalBlock
void appendExternalBlock(const char *data, size_t len) override
Send a block of data to the network connection, without making a copy.
Definition: NullConnectionWriter.cpp:54
yarp::os::NullConnectionWriter::declareSizes
void declareSizes(int argc, int *argv) override
If you can easily determine how many blocks there are in a message, call this first,...
Definition: NullConnectionWriter.cpp:70
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
NullConnectionWriter.h
yarp::os::NullConnectionWriter::appendFloat64
void appendFloat64(yarp::conf::float64_t data) override
Send a representation of a 64-bit floating point number to the network connection.
Definition: NullConnectionWriter.cpp:43
YARP_UNUSED
#define YARP_UNUSED(var)
Definition: api.h:159
yarp::os::NullConnectionWriter::appendFloat32
void appendFloat32(yarp::conf::float32_t data) override
Send a representation of a 32-bit floating point number to the network connection.
Definition: NullConnectionWriter.cpp:38
yarp::os::NullConnectionWriter::appendBlock
void appendBlock(const char *data, size_t len) override
Send a block of data to the network connection.
Definition: NullConnectionWriter.cpp:12
yarp::os::NullConnectionWriter::appendInt8
void appendInt8(std::int8_t data) override
Send a representation of a 8-bit integer to the network connection.
Definition: NullConnectionWriter.cpp:18
yarp::os::NullConnectionWriter::setReference
void setReference(Portable *obj) override
Stores a direct pointer to the object being sent.
Definition: NullConnectionWriter.cpp:81
yarp::os::NullConnectionWriter::appendInt64
void appendInt64(std::int64_t data) override
Send a representation of a 64-bit integer to the network connection.
Definition: NullConnectionWriter.cpp:33
yarp::os::NullConnectionWriter::isActive
bool isActive() const override
Definition: NullConnectionWriter.cpp:96
yarp::os::NullConnectionWriter::appendText
void appendText(const std::string &str, const char terminate='\n') override
Send a terminated string to the network connection.
Definition: NullConnectionWriter.cpp:48
yarp::os::NullConnectionWriter::isTextMode
bool isTextMode() const override
Check if the connection is text mode.
Definition: NullConnectionWriter.cpp:60
yarp::os::PortReader
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:28
yarp::os::NullConnectionWriter::setReplyHandler
void setReplyHandler(PortReader &reader) override
This sets a handler to deal with replies to the message.
Definition: NullConnectionWriter.cpp:76
yarp::os::NullConnectionWriter::isNull
bool isNull() const override
Definition: NullConnectionWriter.cpp:110
yarp::os::NullConnectionWriter::appendInt16
void appendInt16(std::int16_t data) override
Send a representation of a 16-bit integer to the network connection.
Definition: NullConnectionWriter.cpp:23
yarp::conf::float32_t
float float32_t
Definition: numeric.h:50
yarp::os::NullConnectionWriter::appendInt32
void appendInt32(std::int32_t data) override
Send a representation of a 32-bit integer to the network connection.
Definition: NullConnectionWriter.cpp:28
yarp::os::NullConnectionWriter::isBareMode
bool isBareMode() const override
Check if the connection is bare mode.
Definition: NullConnectionWriter.cpp:65
yarp::os::NullConnectionWriter::isError
bool isError() const override
Definition: NullConnectionWriter.cpp:101
PortReader.h
yarp::conf::float64_t
double float64_t
Definition: numeric.h:51
yarp::os::NullConnectionWriter::convertTextMode
bool convertTextMode() override
Converts a standard description in binary into a textual description, if the connection is in text-mo...
Definition: NullConnectionWriter.cpp:86
yarp::os::NullConnectionWriter::requestDrop
void requestDrop() override
Tag the connection to be dropped after the current message.
Definition: NullConnectionWriter.cpp:106
yarp::os::SizedWriter
Minimal requirements for an efficient Writer.
Definition: SizedWriter.h:36
yarp::os::NullConnectionWriter::getBuffer
SizedWriter * getBuffer() const override
Definition: NullConnectionWriter.cpp:115