CYCLONE DDS Compatibility: Remove expectsinlineQoS Flag

Apparently Cyclone DDS does not support Readers with the inline QoS
Flag.
Change rtps_test_package to generate only necessary PIDs (e.g. no
PID_EXPECTS_INLINE_QOS for writers)
This commit is contained in:
Greek 2021-12-14 14:45:27 +01:00
parent 49fc01cf6b
commit 6d609a5a34
3 changed files with 66 additions and 58 deletions

View File

@ -1021,28 +1021,28 @@ begin
-- *PID_EXPECTS_INLINE_QOS*
Log("Ignore Endpoint [Invalid PID_EXPECTS_INLINE_QOS]", INFO);
sub_p.writerSN := p_snp;
sub_s.writerSN := p_sns;
endpoint := e0;
endpoint.reader := FALSE;
endpoint.entityId := gen_rand_entityid_2(FALSE);
gen_endpoint_data(endpoint, sub_p.data, PID_EXPECTS_INLINE_QOS, -1);
gen_sentinel(sub_p.data);
gen_rtps_handler_out(sub_p, endpoint, stimulus);
endpoint.reader := TRUE;
endpoint.entityId := gen_rand_entityid_2(TRUE);
gen_endpoint_data(endpoint, sub_s.data, PID_EXPECTS_INLINE_QOS, -1);
gen_sentinel(sub_s.data);
gen_rtps_handler_out(sub_s, endpoint, stimulus);
start_test;
wait_on_sent;
wait_on_mem_check;
stimulus := EMPTY_TEST_PACKET;
reference := EMPTY_TEST_PACKET;
sub_p.data := EMPTY_TEST_PACKET;
sub_s.data := EMPTY_TEST_PACKET;
Log("Match Endpoint [Extra Bytes in PID_EXPECTS_INLINE_QOS]", INFO);
sub_p.writerSN := p_snp;
sub_s.writerSN := p_sns;
endpoint := e0;
endpoint.reader := FALSE;
endpoint.entityId := gen_rand_entityid_2(FALSE);
gen_endpoint_data(endpoint, sub_p.data, PID_EXPECTS_INLINE_QOS, +1);
gen_sentinel(sub_p.data);
gen_rtps_handler_out(sub_p, endpoint, stimulus);
endpoint.reader := TRUE;
endpoint.entityId := gen_rand_entityid_2(TRUE);
gen_endpoint_data(endpoint, sub_s.data, PID_EXPECTS_INLINE_QOS, +1);
gen_sentinel(sub_s.data);
gen_rtps_handler_out(sub_s, endpoint, stimulus);
wr_sig := (0 => '1', 9 => '1', 10 => '1', 15 => '1', others => '0');
push_endpoint_reference;
start_test;
@ -1050,8 +1050,8 @@ begin
wait_on_mem_check;
stimulus := EMPTY_TEST_PACKET;
reference := EMPTY_TEST_PACKET;
sub_p.data := EMPTY_TEST_PACKET;
p_snp := p_snp + 1;
sub_s.data := EMPTY_TEST_PACKET;
p_sns := p_sns + 1;
-- *PID_DATA_MAX_SIZE_SERIALIZED*
Log("Ignore Endpoint [Invalid PID_DATA_MAX_SIZE_SERIALIZED]", INFO);

View File

@ -412,10 +412,12 @@ package body rtps_config_package is
len := len + 1;
ret.data(ind+len) := ENTITYID(i);
-- EXPECTS INLINE QOS
len := len + 1;
ret.data(ind+len) := PID_EXPECTS_INLINE_QOS & std_logic_vector(to_unsigned(4, 16));
len := len + 1;
ret.data(ind+len) := (24 => '1', others => '0');
-- XXX: Cyclone DDS Compatibility
-- Apparently Cyclone DDS does not support Readers with the expectsInlineQoS Flag
--len := len + 1;
--ret.data(ind+len) := PID_EXPECTS_INLINE_QOS & std_logic_vector(to_unsigned(4, 16));
--len := len + 1;
--ret.data(ind+len) := (24 => '1', others => '0');
-- TOPIC NAME
tmp := string_len(ENDPOINT_TOPIC(i));
len := len + 1;

View File

@ -2233,19 +2233,21 @@ package body rtps_test_package is
output.length := output.length + offset;
end if;
-- EXPECTS IN-LINE QOS
if (ref.expectsInlineQoS(0) /= DEFAULT_EXPECTS_INLINE_QOS or pid = PID_EXPECTS_INLINE_QOS) then
if (pid = PID_EXPECTS_INLINE_QOS) then
assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE;
output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH));
else
output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH));
end if;
output.length := output.length + 1;
output.data(output.length) := (others => '0');
output.data(output.length)(31 downto 24) := ref.expectsInlineQoS; -- 1 Byte, No endian swap
output.length := output.length + 1;
if (pid = PID_EXPECTS_INLINE_QOS) then
output.length := output.length + offset;
if (ref.reader) then
if (ref.expectsInlineQoS(0) /= DEFAULT_EXPECTS_INLINE_QOS or pid = PID_EXPECTS_INLINE_QOS) then
if (pid = PID_EXPECTS_INLINE_QOS) then
assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE;
output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH));
else
output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH));
end if;
output.length := output.length + 1;
output.data(output.length) := (others => '0');
output.data(output.length)(31 downto 24) := ref.expectsInlineQoS; -- 1 Byte, No endian swap
output.length := output.length + 1;
if (pid = PID_EXPECTS_INLINE_QOS) then
output.length := output.length + offset;
end if;
end if;
end if;
-- TOPIC NAME
@ -2395,18 +2397,20 @@ package body rtps_test_package is
end if;
end if;
-- OWNERSHIP STRENGTH
if (ref.ownership_strength /= DEFAULT_OWNERSHIP_STRENGTH_QOS or pid = PID_OWNERSHIP_STRENGTH) then
if (pid = PID_OWNERSHIP_STRENGTH) then
assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE;
output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH));
else
output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH));
end if;
output.length := output.length + 1;
output.data(output.length) := endian_swap(ref.littleEndian, ref.ownership_strength);
output.length := output.length + 1;
if (pid = PID_OWNERSHIP_STRENGTH) then
output.length := output.length + offset;
if (not ref.reader) then
if (ref.ownership_strength /= DEFAULT_OWNERSHIP_STRENGTH_QOS or pid = PID_OWNERSHIP_STRENGTH) then
if (pid = PID_OWNERSHIP_STRENGTH) then
assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE;
output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH));
else
output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH));
end if;
output.length := output.length + 1;
output.data(output.length) := endian_swap(ref.littleEndian, ref.ownership_strength);
output.length := output.length + 1;
if (pid = PID_OWNERSHIP_STRENGTH) then
output.length := output.length + offset;
end if;
end if;
end if;
-- LIVELINESS
@ -2604,19 +2608,21 @@ package body rtps_test_package is
end loop;
end if;
-- MAX SIZE SERIALIZED
-- NOTE: PID_DATA_MAX_SIZE_SERIALIZED has no default value, but we use the value zero as default for not sending the parameter
if (unsigned(ref.max_size_serialized) /= 0) then
if (pid = PID_DATA_MAX_SIZE_SERIALIZED) then
assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE;
output.data(output.length) := endian_swap(ref.littleEndian, PID_DATA_MAX_SIZE_SERIALIZED) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH));
else
output.data(output.length) := endian_swap(ref.littleEndian, PID_DATA_MAX_SIZE_SERIALIZED) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH));
end if;
output.length := output.length + 1;
output.data(output.length) := endian_swap(ref.littleEndian, ref.max_size_serialized);
output.length := output.length + 1;
if (pid = PID_DATA_MAX_SIZE_SERIALIZED) then
output.length := output.length + offset;
if (not ref.reader) then
-- NOTE: PID_DATA_MAX_SIZE_SERIALIZED has no default value, but we use the value zero as default for not sending the parameter
if (unsigned(ref.max_size_serialized) /= 0) then
if (pid = PID_DATA_MAX_SIZE_SERIALIZED) then
assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE;
output.data(output.length) := endian_swap(ref.littleEndian, PID_DATA_MAX_SIZE_SERIALIZED) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH));
else
output.data(output.length) := endian_swap(ref.littleEndian, PID_DATA_MAX_SIZE_SERIALIZED) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH));
end if;
output.length := output.length + 1;
output.data(output.length) := endian_swap(ref.littleEndian, ref.max_size_serialized);
output.length := output.length + 1;
if (pid = PID_DATA_MAX_SIZE_SERIALIZED) then
output.length := output.length + offset;
end if;
end if;
end if;
end procedure;
@ -3016,7 +3022,7 @@ package body rtps_test_package is
ret.transport_priority := ENDPOINT_TRANSPORT_PRIORITY_QOS(id);
ret.lifespan := ENDPOINT_LIFESPAN_QOS(id);
ret.destination_order := ENDPOINT_DESTINATION_ORDER_QOS(id);
ret.expectsInlineQoS(0) := '1' when (id < NUM_READERS) else '0';
ret.expectsInlineQoS(0) := DEFAULT_EXPECTS_INLINE_QOS when (id < NUM_READERS) else '0';
ret.participant := THIS_PARTICIPANT_DATA;
ret.entityId := ENTITYID(id);
ret.nr := id;