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,6 +2233,7 @@ package body rtps_test_package is
output.length := output.length + offset;
end if;
-- EXPECTS IN-LINE QOS
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;
@ -2248,6 +2249,7 @@ package body rtps_test_package is
output.length := output.length + offset;
end if;
end if;
end if;
-- TOPIC NAME
tmp := string_len(ref.topic_name);
if (pid = PID_TOPIC_NAME) then
@ -2395,6 +2397,7 @@ package body rtps_test_package is
end if;
end if;
-- OWNERSHIP STRENGTH
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;
@ -2409,6 +2412,7 @@ package body rtps_test_package is
output.length := output.length + offset;
end if;
end if;
end if;
-- LIVELINESS
if (ref.liveliness /= DEFAULT_LIVELINESS_QOS or ref.leaseDuration /= DEFAULT_LEASE_DURATION or pid = PID_LIVELINESS) then
if (pid = PID_LIVELINESS) then
@ -2604,6 +2608,7 @@ package body rtps_test_package is
end loop;
end if;
-- MAX SIZE SERIALIZED
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
@ -2619,6 +2624,7 @@ package body rtps_test_package is
output.length := output.length + offset;
end if;
end if;
end if;
end procedure;
procedure gen_endpoint_data( ref : in ENDPOINT_DATA_TYPE; output : inout TEST_PACKET_TYPE) is
@ -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;