BUG FIX: Subscriber and Publisher ACKNACK destinations were flipped

This commit is contained in:
Greek 2022-01-26 23:26:40 +01:00 committed by Greek64
parent 6524ad6c0d
commit 0396097f05
3 changed files with 9 additions and 8 deletions

View File

@ -99,6 +99,7 @@
ros2 run rosidl_adapter msg2idl.py *.msg
ros2 run rosidl_adapter srv2idl.py *.srv
* The publication_handle of the DDS Specification (e.g. the one returned in the Sample Info) is an implementation specific ID that can identify local and remote DDS Entities LOCALY.
* Testbench did not catch Bug, where the Pub ACKNACK was sent to as Sub ACKNACK (ACKNACK Destinations were flipped). Extend testbench to catch this case.
* Fast-RTPS does not follow DDSI-RTPS Specification
- Open Github Issue

View File

@ -131,8 +131,8 @@ architecture testbench of L1_rtps_discovery_module_test1 is
-- PUBLISHER ACKNACK
sub := DEFAULT_RTPS_SUBMESSAGE;
sub.submessageID := SID_ACKNACK;
sub.writerId := ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_ANNOUNCER;
sub.readerId := ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_DETECTOR;
sub.writerId := ENTITYID_SEDP_BUILTIN_PUBLICATIONS_ANNOUNCER;
sub.readerId := ENTITYID_SEDP_BUILTIN_PUBLICATIONS_DETECTOR;
sub.readerSNState.base := pub_sn;
sub.readerSNState.numBits := int(WORD_WIDTH, CDR_LONG_WIDTH);
sub.readerSNState.bitmap := (0 to WORD_WIDTH-1 => '1', others => '0');
@ -142,8 +142,8 @@ architecture testbench of L1_rtps_discovery_module_test1 is
-- SUBSCRIBER ACKNACK
sub := DEFAULT_RTPS_SUBMESSAGE;
sub.submessageID := SID_ACKNACK;
sub.writerId := ENTITYID_SEDP_BUILTIN_PUBLICATIONS_ANNOUNCER;
sub.readerId := ENTITYID_SEDP_BUILTIN_PUBLICATIONS_DETECTOR;
sub.writerId := ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_ANNOUNCER;
sub.readerId := ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_DETECTOR;
sub.readerSNState.base := sub_sn;
sub.readerSNState.numBits := int(WORD_WIDTH, CDR_LONG_WIDTH);
sub.readerSNState.bitmap := (0 to WORD_WIDTH-1 => '1', others => '0');

View File

@ -3358,11 +3358,11 @@ begin
cnt_next <= cnt + 1;
-- Reader Entity ID
when 1 =>
data_out_sig <= ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_DETECTOR;
data_out_sig <= ENTITYID_SEDP_BUILTIN_PUBLICATIONS_DETECTOR;
cnt_next <= cnt + 1;
-- Writer Entity ID
when 2 =>
data_out_sig <= ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_ANNOUNCER;
data_out_sig <= ENTITYID_SEDP_BUILTIN_PUBLICATIONS_ANNOUNCER;
cnt_next <= cnt + 1;
-- Sequence Number Set (Bitmap Base 1/2)
when 3 =>
@ -3393,11 +3393,11 @@ begin
cnt_next <= cnt + 1;
-- Reader Entity ID
when 9 =>
data_out_sig <= ENTITYID_SEDP_BUILTIN_PUBLICATIONS_DETECTOR;
data_out_sig <= ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_DETECTOR;
cnt_next <= cnt + 1;
-- Writer Entity ID
when 10 =>
data_out_sig <= ENTITYID_SEDP_BUILTIN_PUBLICATIONS_ANNOUNCER;
data_out_sig <= ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_ANNOUNCER;
cnt_next <= cnt + 1;
-- Sequence Number Set (Bitmap Base 1/2)
when 11 =>