-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection of data and notification to listeners RTPS_PACKETS_LOST [10795] #1956
Merged
Merged
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1cff7df
Refs 11450. Added OutputTrafficManager.
MiguelCompany 2dcf6ff
Refs 11450. Added OutputTrafficManager to UDP transport.
MiguelCompany f72d730
Refs 11450. Added OutputTrafficManager to TCP transport.
MiguelCompany 4a4990a
Refs 10795. Sepparate processing of timestamp and sequence.
MiguelCompany dfbf25f
Refs 10795. Loss accountance and notification.
MiguelCompany 57c6bf1
Refs 10795. Send destination locator on statistics submessage.
MiguelCompany ad86b42
Refs 10795. Test transport updates sequencing info on packet drops.
MiguelCompany 5f55cd9
Refs 11450. Explicitly use boolean expression for carry operations.
MiguelCompany c0cf150
Refs 10795. Added RTPS_LOST callback to RTPSStatisticsTests.
MiguelCompany 38410b0
Refs 10795. Linter.
MiguelCompany 1282b17
Refs 11562. Added test for unordered packets.
MiguelCompany 7f0b26b
Refs 11562. Avoid processing datagrams in the past.
MiguelCompany a1db13e
Refs 11562. Account for full message size.
MiguelCompany 8b042d6
Refs 11562. Linters.
MiguelCompany 36f1c16
Refs 11562. Avoid unused var warning.
MiguelCompany b2530b3
Refs 11562. Avoid unused parameter warning.
MiguelCompany e0f5d41
Refs 11562. Prevent side effects on length accounting.
MiguelCompany e291178
Refs 11562. Correct naming of private vars.
MiguelCompany 0e33ab7
Refs 11562. Use correct length on write_small_sample.
MiguelCompany e24587d
Refs 11562. Fix asio include on ListenerTests.
MiguelCompany File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,16 @@ class StatisticsParticipantImpl | |
|
||
std::map<fastrtps::rtps::Locator_t, rtps_sent_data> traffic; | ||
|
||
// RTPS_LOST ancillary | ||
using lost_traffic_key = std::pair<fastrtps::rtps::GuidPrefix_t, fastrtps::rtps::Locator_t>; | ||
struct lost_traffic_value | ||
{ | ||
uint64_t first_sequence = 0; | ||
Entity2LocatorTraffic data{}; | ||
rtps::StatisticsSubmessageData::Sequence seq_data{}; | ||
}; | ||
std::map<lost_traffic_key, lost_traffic_value> lost_traffic; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the style guide |
||
|
||
// PDP_PACKETS ancillary | ||
unsigned long long pdp_counter_ = {}; | ||
// EDP_PACKETS ancillary | ||
|
@@ -255,12 +265,38 @@ class StatisticsParticipantImpl | |
* @param [in] source_locator Locator indicating the sending address. | ||
* @param [in] reception_locator Locator indicating the listening address. | ||
* @param [in] data Statistics submessage received. | ||
* @param [in] datagram_size The size in bytes of the received datagram. | ||
*/ | ||
void on_network_statistics( | ||
const fastrtps::rtps::GuidPrefix_t& source_participant, | ||
const fastrtps::rtps::Locator_t& source_locator, | ||
const fastrtps::rtps::Locator_t& reception_locator, | ||
const rtps::StatisticsSubmessageData& data); | ||
const rtps::StatisticsSubmessageData& data, | ||
uint64_t datagram_size); | ||
|
||
/* | ||
* Process a received statistics submessage timestamp, informing of network latency. | ||
* @param [in] source_locator Locator indicating the sending address. | ||
* @param [in] reception_locator Locator indicating the listening address. | ||
* @param [in] ts The timestamp of the statistics submessage received. | ||
*/ | ||
void process_network_timestamp( | ||
const fastrtps::rtps::Locator_t& source_locator, | ||
const fastrtps::rtps::Locator_t& reception_locator, | ||
const rtps::StatisticsSubmessageData::TimeStamp& ts); | ||
|
||
/* | ||
* Process a received statistics submessage sequence, informing of network loss. | ||
* @param [in] source_participant GUID prefix of the participant sending the message. | ||
* @param [in] reception_locator Locator indicating the listening address. | ||
* @param [in] seq The sequencing info ot the statistics submessage received. | ||
* @param [in] datagram_size The size in bytes of the received datagram. | ||
*/ | ||
void process_network_sequence( | ||
const fastrtps::rtps::GuidPrefix_t& source_participant, | ||
const fastrtps::rtps::Locator_t& reception_locator, | ||
const rtps::StatisticsSubmessageData::Sequence& seq, | ||
uint64_t datagram_size); | ||
|
||
/* | ||
* Report a message that is sent by the participant | ||
|
@@ -415,12 +451,14 @@ class StatisticsParticipantImpl | |
* @param [in] Locator indicating the sending address. | ||
* @param [in] Locator indicating the listening address. | ||
* @param [in] Statistics submessage received. | ||
* @param [in] The size in bytes of the received datagram. | ||
*/ | ||
inline void on_network_statistics( | ||
const fastrtps::rtps::GuidPrefix_t&, | ||
const fastrtps::rtps::Locator_t&, | ||
const fastrtps::rtps::Locator_t&, | ||
const rtps::StatisticsSubmessageData&) | ||
const rtps::StatisticsSubmessageData&, | ||
uint64_t) | ||
{ | ||
} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to prevent side effects is better practice to stash the msg state before the
read_statistics_submessage
call using local variables.Note that
read_statistics_submessage
original implementation avoided side effects and stashing would have prevented applying the correction twice.