Skip to content

Commit

Permalink
Add transport interface to concatenate transports (eProsima#2103)
Browse files Browse the repository at this point in the history
* Squash of low-bandwidth-plugins development:

Refs eProsima#2731. Initial version of DataTransformTransport

Refs eProsima#2731. DataTransformTransport implementation complete + unit test

Refs eProsima#2731. Refactor of DataTransformTransport with middle class ChainingTransport

Refs eProsima#2752. Refactor to pass participant properties on transport creation

Refs eProsima#2691. Added some utils to StringMatching class

Refs eProsima#2693. Headers reduction transport implementation

Refs eProsima#2759. Blackbox test and bug fixing

Refs eProsima#2759. Fixing compiler warnings

Refs eProsima#2692. Added Payload Compression Transport (ZLIB only)

Refs eProsima#2692. Added BlackBox test for ZLib transport

Refs eProsima#2692. Added BZIP2 compression

Refs eProsima#2692. Added BlackBox test for BZip2 transport

Refs eProsima#2692. Fixing compiler warnings

Refs eProsima#2692. Added automatic compression implementation

Refs eProsima#2692. Added blackbox test for automatic compression

Refs eProsima#2692. Only compiling compression transport when compression libraries are found

Refs eProsima#2727. Added source timestamp transport

Refs eProsima#2727. Added blackbox test for source timestamp transport

Refs eProsima#2693. Removing unsupported entity ids

Refs eProsima#2693. Fix of bug in HeaderReduction_Recover

Refs eProsima#2769. Documenting interfaces and some optimizations

Refs eProsima#2691. Added blackbox test chaining several transports

Better doc on some transports

Refs eProsima#2787. Fixed bug in SourceTimestamp transport

Refs eProsima#2787. Added examples to test interoperability

Refs eProsima#2787. Interop example improved

Refs eProsima#2787. Added dump capabiliy to HeaderReductionTransport

Refs eProsima#2787. Added dump to test participants

Refs eProsima#2787. Fixed bug in SourceTimestampTransport

Refs eProsima#2787. Improving tests and dump

Refs eProsima#2787. Improving example

Refs eProsima#2787. Fixing entiy id packing

Refs eProsima#2787. Message sent improved

Refs eProsima#2787. Added dump of low level data

Refs eProsima#2787. Testing improvements

Refs eProsima#2787. Changing data type

Refs eProsima#2787. Test data

Refs eProsima#2787. Adding parameters to endpoints

Refs eProsima#2787. Conditional compilation of debug dump

Refs eProsima#2691. Changing example name

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Fixing compilation errors after rebase.

Signed-off-by: Ricardo González Moreno <correoricky@gmail.com>

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* New features

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #10121. Fix error creating output channel.

Signed-off-by: Ricardo González Moreno <correoricky@gmail.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #12290. Uncrustify

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Moved example to other repo

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #12290. Fix warning on windows

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #12290. Fix warning on windows

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #12290. Fix warnings on Mac

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs 12290. Fix old uncrustify

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Apply suggestions from code review

Co-authored-by: José Luis Bueno López <69244257+JLBuenoLopez-eProsima@users.noreply.github.com>

* Refs #12290. Apply suggestions.

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #12290. Apply suggestions

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #12290. Add blackbox test.

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #12290. Fix license

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #12290. Fix warning on mac

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Luis LG. Gasco <luisgasco@eprosima.com>
Co-authored-by: José Luis Bueno López <69244257+JLBuenoLopez-eProsima@users.noreply.github.com>
  • Loading branch information
4 people authored Dec 16, 2021
1 parent 71d986f commit 7b97f19
Show file tree
Hide file tree
Showing 32 changed files with 1,146 additions and 188 deletions.
29 changes: 24 additions & 5 deletions examples/C++/RTPSTest_as_socket/TestReaderSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,42 @@
class TestReaderSocket
{
public:

TestReaderSocket();

virtual ~TestReaderSocket();

eprosima::fastrtps::rtps::RTPSParticipant* mp_participant;

eprosima::fastrtps::rtps::RTPSReader* mp_reader;

eprosima::fastrtps::rtps::ReaderHistory* mp_history;
bool init(std::string ip,uint32_t port);

bool init(
std::string ip,
uint32_t port);

void run();
class MyListener:public eprosima::fastrtps::rtps::ReaderListener

class MyListener : public eprosima::fastrtps::rtps::ReaderListener
{
public:
MyListener():m_received(0){};
~MyListener(){};

MyListener()
: m_received(0)
{
}

~MyListener()
{
}

void onNewCacheChangeAdded(
eprosima::fastrtps::rtps::RTPSReader* reader,
const eprosima::fastrtps::rtps::CacheChange_t* const change) override;
uint32_t m_received;
}m_listener;
}
m_listener;

};

Expand Down
28 changes: 20 additions & 8 deletions examples/C++/RTPSTest_as_socket/TestWriterSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,27 @@
#include <cstdio>
#include <cstdint>

class TestWriterSocket {
class TestWriterSocket
{

public:
TestWriterSocket();
virtual ~TestWriterSocket();
eprosima::fastrtps::rtps::RTPSParticipant* mp_participant;
eprosima::fastrtps::rtps::RTPSWriter* mp_writer;
eprosima::fastrtps::rtps::WriterHistory* mp_history;
bool init(std::string ip,uint32_t port);
void run(uint16_t nmsgs);

TestWriterSocket();

virtual ~TestWriterSocket();

eprosima::fastrtps::rtps::RTPSParticipant* mp_participant;

eprosima::fastrtps::rtps::RTPSWriter* mp_writer;

eprosima::fastrtps::rtps::WriterHistory* mp_history;

bool init(
std::string ip,
uint32_t port);

void run(
uint16_t nmsgs);
};

#endif /* TESTWRITER_H_ */
4 changes: 3 additions & 1 deletion include/fastdds/rtps/network/NetworkFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ class NetworkFactory
* Allows registration of a transport dynamically. Only the transports built into FastRTPS
* are supported here (although it can be easily extended at NetworkFactory.cpp)
* @param descriptor Structure that defines all initial configuration for a given transport.
* @param properties Optional policy to specify additional parameters of the created transport.
*/
bool RegisterTransport(
const fastdds::rtps::TransportDescriptorInterface* descriptor);
const fastdds::rtps::TransportDescriptorInterface* descriptor,
const fastrtps::rtps::PropertyPolicy* properties = nullptr);

/**
* Walks over the list of transports, opening every possible channel that can send through
Expand Down
2 changes: 2 additions & 0 deletions include/fastdds/rtps/network/SenderResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#ifndef _FASTDDS_RTPS_SENDER_RESOURCE_H
#define _FASTDDS_RTPS_SENDER_RESOURCE_H

#include <fastdds/rtps/common/Types.h>

#include <functional>
#include <vector>
#include <chrono>
Expand Down
Loading

0 comments on commit 7b97f19

Please sign in to comment.