Conversation
7bafd5f to
5c067c7
Compare
MiguelCompany
left a comment
There was a problem hiding this comment.
Partial review: examples and include was covered.
General feedback
- Some files contain TAB characters. We use 4 spaces for indentation.
- Some files on the examples seem to have been generated with an old version of fastrtpsgen. Please fix this
Design feedback
It seems the transport layer is using information from the upper layer (participant guid is passed to the transport layer, ReceiverResource is processing messages). This should not be the case. I understand that on TCP we can receive an RTPSMessage that should be sent to several participants. On UDP was easy, as multiple sockets can be listening on the same port, and all of them will receive a copy of the message. I understand that we may need a way to pass the received message to several entities of the uper layer, but that sould be done without knowledge of the content of the messages.
|
|
||
| In the first one launch: 'BenchMark publisher tcp' or 'BenchMark publisher udp' (or HelloWorldExample.exe publisher on windows). | ||
| In the second one: 'HelloWorldExample subscriber tcp' or 'HelloWorldExample subscriber udp' | ||
|
|
There was a problem hiding this comment.
Seems you forgot to change some HelloWorldExample to BenchMark
| using std::cout; | ||
| using std::endl; | ||
|
|
||
| /* |
There was a problem hiding this comment.
I suppose this is to remove the 'unused variable' warning. I think it's better to remove the code completely.
| //CREATE RTPSParticipant | ||
| ParticipantAttributes PParam; | ||
| PParam.rtps.defaultSendPort = 10042; | ||
| //PParam.rtps.defaultSendPort = 10042; // TODO Create transport? |
There was a problem hiding this comment.
As defaultSendPort is being removed, and I don't like TODOs on examples, please remove the whole line
| //CREATE RTPSParticipant | ||
| ParticipantAttributes PParam; | ||
| PParam.rtps.defaultSendPort = 10042; | ||
| //PParam.rtps.defaultSendPort = 10042; // TODO Create transport? |
There was a problem hiding this comment.
As defaultSendPort is being removed, and I don't like TODOs on examples, please remove the whole line
| } | ||
|
|
||
| void HelloWorldPublisher::run(uint32_t samples) | ||
| void HelloWorldPublisher::runThread(uint32_t samples, uint32_t sleep) |
There was a problem hiding this comment.
Why are we complicating the most basic example with the creation of an additional thread?
There was a problem hiding this comment.
This additional thread allows to stop the publisher pressing enter. This is useful when HelloWorldExample is executed as publisher without a limit of samples.
| namespace fastrtps{ | ||
| namespace rtps{ | ||
|
|
||
| class RTPSWriter; |
There was a problem hiding this comment.
I don't think this class should have knowledge of the upper layer. If we need to pass a received message to several entities, we may register more than one MessageReceiver on the same ReceiverResource.
| namespace fastrtps{ | ||
| namespace rtps{ | ||
|
|
||
| class RTPSParticipantImpl; |
There was a problem hiding this comment.
SenderResource should only know about locators and data, not about participants and guids
| namespace fastrtps{ | ||
| namespace rtps{ | ||
|
|
||
| class ChannelResource |
There was a problem hiding this comment.
The purpose of this class should be documented
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #ifndef CHANNEL_RESOURCE_INFO_ |
There was a problem hiding this comment.
Define doesn't match filename
| protected: | ||
|
|
||
| uint32_t maxMessageSize; | ||
| //! Participant GUID prefix. |
There was a problem hiding this comment.
Why should a transport need the GUID prefix?
dd7e6b9 to
34630fd
Compare
… it into the socket infos.
… TCP negotiation.
…the header file.
…ture connections.
- Update TCP transport to fix an issue opening output channels over an input socket.
…the hello world initialization for UDP.
…s union types yet. OpenLogicalPort negociation seems to work fine, redirection maybe not.
…r Android Devices. - Update project configuration to build fastrtps with fastcdr in Windows
35f9db6 to
c26c823
Compare
| break; | ||
| case LOCATOR_KIND_TCPv4: | ||
| case LOCATOR_KIND_TCPv6: | ||
| //TODO: Check Physical <-> Logical Port |
| #define LOCATOR_KIND_TCPv4 4 | ||
| #define LOCATOR_KIND_TCPv6 8 | ||
|
|
||
| // TODO Make this class a base class for each kind of locator? |
| m_att.port.offsetd3 + | ||
| m_att.port.participantIDGain*m_att.participantID), true); | ||
| } | ||
| if (loc.get_physical_port() == 0) |
There was a problem hiding this comment.
This if can be true when transport is UDP and change the value of the port, which was set already before.
Implementation of a new transport layer to manage TCP communication. These new transports are connection oriented, and they manage internally the negotiation and the reconnection if the communication is lost. The transport layer has been restructured to fit with the needs of the TCP communication and to ease the management of the sockets.
This feature includes: