BUG FIX: rtps_handler was droping valid ACKNACKs and GAPs
The rtps_handler was droping SequenceNumberSets where the 0 bit was set. The rtps_handler Test1 was also extended a bit to test for more invalid variants.
This commit is contained in:
parent
ef32055f21
commit
49fc01cf6b
@ -927,7 +927,7 @@ NumberSet (9.4.2.6)
|
|||||||
---------
|
---------
|
||||||
* bitmapBase <= 0
|
* bitmapBase <= 0
|
||||||
* numBits < 0 or numBits > 256
|
* numBits < 0 or numBits > 256
|
||||||
* M/=(numBits+31)/32 longs in Submessage
|
* M /= (numBits+31)/32 longs in Submessage
|
||||||
|
|
||||||
Parameter List (8.3.5.9)
|
Parameter List (8.3.5.9)
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@ -243,6 +243,25 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending valid RTPS Header [Protocol Minor Version Missmatch]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
rtps_header := DEFAULT_RTPS_HEADER;
|
||||||
|
rtps_header.version := PROTOCOLVERSION_2_1;
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Valid Data
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
-- Valid RTPS Header from here on
|
-- Valid RTPS Header from here on
|
||||||
rtps_header := DEFAULT_RTPS_HEADER;
|
rtps_header := DEFAULT_RTPS_HEADER;
|
||||||
|
|
||||||
@ -403,12 +422,12 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid DATA [Invalid writerSN]", INFO);
|
Log("Sending invalid DATA [Invalid writerSN (0)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [Invalid writerSN] (Dropped)
|
-- Valid DATA (Dropped)
|
||||||
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
rtps_sub.submessageID := SID_DATA;
|
rtps_sub.submessageID := SID_DATA;
|
||||||
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
@ -427,6 +446,53 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid DATA [Invalid writerSN (-8589934592)]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Valid DATA (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_DATA;
|
||||||
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
|
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
|
||||||
|
rtps_sub.data := RAND_DATA;
|
||||||
|
rtps_sub.writerSN := (0 => unsigned(int(-2,WORD_WIDTH)), 1 => (others => '0'));
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid Data (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid DATA [Invalid writerSN (SEQUENCENUMBER_UNKNOWN)]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Valid DATA (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_DATA;
|
||||||
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
|
rtps_sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1';
|
||||||
|
rtps_sub.data := RAND_DATA;
|
||||||
|
rtps_sub.writerSN := SEQUENCENUMBER_UNKNOWN;
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid Data (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
-- *ACKNACK SUBMESSAGE*
|
-- *ACKNACK SUBMESSAGE*
|
||||||
Log("Sending valid ACKNACK [Meta Traffic, Both Endianness]", INFO);
|
Log("Sending valid ACKNACK [Meta Traffic, Both Endianness]", INFO);
|
||||||
@ -512,7 +578,7 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid ACKNACK [ReaderSNState invalid (Base invalid)]", INFO);
|
Log("Sending invalid ACKNACK [ReaderSNState invalid (Base invalid (0))]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
@ -534,7 +600,29 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid ACKNACK [ReaderSNState invalid (NumBits invalid)]", INFO);
|
Log("Sending invalid ACKNACK [ReaderSNState invalid (Base invalid (-8589934592))]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Invalid ACKNACK [readerSNState invalid (Base Invalid)] (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_ACKNACK;
|
||||||
|
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
|
||||||
|
rtps_sub.readerSNState.base := (0 => unsigned(int(-2,WORD_WIDTH)), 1 => (others => '0'));
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid DATA (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid ACKNACK [ReaderSNState invalid (NumBits invalid (-2))]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
@ -543,7 +631,29 @@ begin
|
|||||||
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
rtps_sub.submessageID := SID_ACKNACK;
|
rtps_sub.submessageID := SID_ACKNACK;
|
||||||
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
|
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
|
||||||
rtps_sub.readerSNState.numBits := int(257, 32);
|
rtps_sub.readerSNState.numBits := int(-2, WORD_WIDTH);
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid DATA (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid ACKNACK [ReaderSNState invalid (NumBits invalid (257))]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Invalid ACKNACK [readerSNState invalid (NumBits Invalid)] (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_ACKNACK;
|
||||||
|
rtps_sub.readerId := DEFAULT_READER_ENTITYID;
|
||||||
|
rtps_sub.readerSNState.numBits := int(257, WORD_WIDTH);
|
||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
-- Valid DATA (Dropped)
|
-- Valid DATA (Dropped)
|
||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
@ -640,7 +750,7 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid GAP [GapStart invalid]", INFO);
|
Log("Sending invalid GAP [GapStart invalid (0)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
@ -662,7 +772,29 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid GAP [GapList invalid (Base invalid)]", INFO);
|
Log("Sending invalid GAP [GapStart invalid (-8589934592)]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Invalid GAP [GapStart invalid] (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_GAP;
|
||||||
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
|
rtps_sub.gapStart := (0 => unsigned(int(-2,WORD_WIDTH)), 1 => (others => '0'));
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid Data (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid GAP [GapList invalid (Base invalid (0))]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
@ -684,16 +816,16 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid GAP [GapList invalid (NumBits invalid)]", INFO);
|
Log("Sending invalid GAP [GapList invalid (Base invalid (-8589934592))]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid GAP [GapList invalid (NumBits invalid)] (Dropped)
|
-- Invalid GAP [GapList invalid (Base invalid)] (Dropped)
|
||||||
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
rtps_sub.submessageID := SID_GAP;
|
rtps_sub.submessageID := SID_GAP;
|
||||||
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
rtps_sub.gapList.numBits := int(257,32);
|
rtps_sub.gapList.base := (0 => unsigned(int(-2,WORD_WIDTH)), 1 => (others => '0'));
|
||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
-- Valid Data (Dropped)
|
-- Valid Data (Dropped)
|
||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
@ -706,6 +838,49 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid GAP [GapList invalid (NumBits invalid (-2))]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Invalid GAP [GapList invalid (NumBits invalid)] (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_GAP;
|
||||||
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
|
rtps_sub.gapList.numBits := int(-2,WORD_WIDTH);
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid Data (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid GAP [GapList invalid (NumBits invalid (257))]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Invalid GAP [GapList invalid (NumBits invalid)] (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_GAP;
|
||||||
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
|
rtps_sub.gapList.numBits := int(257,WORD_WIDTH);
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid Data (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
-- *HEARTBEAT SUBMESSAGE*
|
-- *HEARTBEAT SUBMESSAGE*
|
||||||
Log("Sending valid HEARTBEAT [Meta Traffic, Both Endianness]", INFO);
|
Log("Sending valid HEARTBEAT [Meta Traffic, Both Endianness]", INFO);
|
||||||
@ -791,7 +966,7 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [FirstSN invalid]", INFO);
|
Log("Sending invalid HEARTBEAT [FirstSN invalid (0)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
@ -813,7 +988,29 @@ begin
|
|||||||
stimulus := EMPTY_TEST_PACKET;
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
reference := EMPTY_TEST_PACKET;
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [LastSN invalid]", INFO);
|
Log("Sending invalid HEARTBEAT [FirstSN invalid (-8589934592)]", INFO);
|
||||||
|
-- UDP Header
|
||||||
|
gen_output_header(UDP_META, stimulus);
|
||||||
|
-- RTPS Header
|
||||||
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
|
-- Invalid HEARTBEAT [FirstSN invalid] (Dropped)
|
||||||
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
|
rtps_sub.submessageID := SID_HEARTBEAT;
|
||||||
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
|
rtps_sub.firstSN := (0 => unsigned(int(-2,WORD_WIDTH)), 1 => (others => '0'));
|
||||||
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
|
-- Valid Data (Dropped)
|
||||||
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
|
-- Finalize Packet
|
||||||
|
fix_output_packet(stimulus);
|
||||||
|
start_test;
|
||||||
|
wait_on_complete;
|
||||||
|
check_cnt := check_cnt + reference.length;
|
||||||
|
stimulus := EMPTY_TEST_PACKET;
|
||||||
|
reference := EMPTY_TEST_PACKET;
|
||||||
|
|
||||||
|
Log("Sending invalid HEARTBEAT [LastSN invalid (-8589934592)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_output_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
@ -822,7 +1019,7 @@ begin
|
|||||||
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
rtps_sub.submessageID := SID_HEARTBEAT;
|
rtps_sub.submessageID := SID_HEARTBEAT;
|
||||||
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
rtps_sub.lastSN := (others => (others => '1')); -- Negative
|
rtps_sub.lastSN := (0 => unsigned(int(-2,WORD_WIDTH)), 1 => (others => '0'));
|
||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
-- Valid Data (Dropped)
|
-- Valid Data (Dropped)
|
||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
@ -844,8 +1041,8 @@ begin
|
|||||||
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
rtps_sub := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
rtps_sub.submessageID := SID_HEARTBEAT;
|
rtps_sub.submessageID := SID_HEARTBEAT;
|
||||||
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
rtps_sub.writerId := DEFAULT_WRITER_ENTITYID;
|
||||||
rtps_sub.firstSN := ((others => '0'), unsigned(int(5,WORD_WIDTH))); -- 5
|
rtps_sub.firstSN := ((others => '0'), unsigned(int(5,WORD_WIDTH)));
|
||||||
rtps_sub.lastSN := ((others => '0'), unsigned(int(1,WORD_WIDTH))); -- 1
|
rtps_sub.lastSN := ((others => '0'), unsigned(int(1,WORD_WIDTH)));
|
||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
-- Valid Data (Dropped)
|
-- Valid Data (Dropped)
|
||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
|
|||||||
@ -805,7 +805,7 @@ begin
|
|||||||
cnt2_next <= 0;
|
cnt2_next <= 0;
|
||||||
|
|
||||||
-- VALIDITY CHECK
|
-- VALIDITY CHECK
|
||||||
if (data_in_swapped(0) = '1' or unsigned(data_in_swapped) > 256) then
|
if (unsigned(data_in_swapped) > 256) then
|
||||||
-- If numBits is negative or larger than 256, Number Set is invalid (see DDSI-RTPS 2.3 Section 9.4.2.6)
|
-- If numBits is negative or larger than 256, Number Set is invalid (see DDSI-RTPS 2.3 Section 9.4.2.6)
|
||||||
-- If readerSNState is invalid, skip Packet (see DDSI-RTPS 2.3 Section 8.3.7.1.3 and 8.3.4.1)
|
-- If readerSNState is invalid, skip Packet (see DDSI-RTPS 2.3 Section 8.3.7.1.3 and 8.3.4.1)
|
||||||
stage_next <= SKIP_PACKET;
|
stage_next <= SKIP_PACKET;
|
||||||
@ -893,7 +893,7 @@ begin
|
|||||||
|
|
||||||
-- VALIDITY CHECK
|
-- VALIDITY CHECK
|
||||||
-- TODO: Shouldn't that check the highest bit?
|
-- TODO: Shouldn't that check the highest bit?
|
||||||
if (data_in_swapped(0) = '1' or unsigned(data_in_swapped) > 256) then
|
if (unsigned(data_in_swapped) > 256) then
|
||||||
-- If numBits is negative or larger than 256, Number Set is invalid (see DDSI-RTPS 2.3 Section 9.4.2.6)
|
-- If numBits is negative or larger than 256, Number Set is invalid (see DDSI-RTPS 2.3 Section 9.4.2.6)
|
||||||
-- If gapList is invalid, skip Packet (see DDSI-RTPS 2.3 Section 8.3.7.4.3 and 8.3.4.1)
|
-- If gapList is invalid, skip Packet (see DDSI-RTPS 2.3 Section 8.3.7.4.3 and 8.3.4.1)
|
||||||
stage_next <= SKIP_PACKET;
|
stage_next <= SKIP_PACKET;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user