Skip to content

Commit 4403d4d

Browse files
Update persistence tutorial to use keep-last instead of keep-all (#696)
Also updated last-value-cache module to use snippet qos profiles.
1 parent 6104b25 commit 4403d4d

File tree

4 files changed

+42
-10
lines changed

4 files changed

+42
-10
lines changed

tutorials/data_persistence/c++11/USER_QOS_PROFILES.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@
1414
<qos_profile name="Persistence" is_default_qos="true">
1515
<base_name>
1616
<element>BuiltinQosSnippetLib::QosPolicy.Durability.Persistent</element>
17-
<element>BuiltinQosSnippetLib::QosPolicy.History.KeepAll</element>
1817
<element>BuiltinQosSnippetLib::QosPolicy.Reliability.Reliable</element>
1918
</base_name>
19+
20+
<datawriter_qos>
21+
<history>
22+
<kind>KEEP_LAST_HISTORY_QOS</kind>
23+
<depth>10</depth>
24+
</history>
25+
</datawriter_qos>
26+
<datareader_qos>
27+
<history>
28+
<kind>KEEP_LAST_HISTORY_QOS</kind>
29+
<depth>10</depth>
30+
</history>
31+
</datareader_qos>
2032
</qos_profile>
2133
</qos_library>
2234
</dds>

tutorials/data_persistence/py/USER_QOS_PROFILES.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@
1414
<qos_profile name="Persistence" is_default_qos="true">
1515
<base_name>
1616
<element>BuiltinQosSnippetLib::QosPolicy.Durability.Persistent</element>
17-
<element>BuiltinQosSnippetLib::QosPolicy.History.KeepAll</element>
1817
<element>BuiltinQosSnippetLib::QosPolicy.Reliability.Reliable</element>
1918
</base_name>
19+
20+
<datawriter_qos>
21+
<history>
22+
<kind>KEEP_LAST_HISTORY_QOS</kind>
23+
<depth>10</depth>
24+
</history>
25+
</datawriter_qos>
26+
<datareader_qos>
27+
<history>
28+
<kind>KEEP_LAST_HISTORY_QOS</kind>
29+
<depth>10</depth>
30+
</history>
31+
</datareader_qos>
2032
</qos_profile>
2133
</qos_library>
2234
</dds>

tutorials/last_value_cache/c++11/USER_QOS_PROFILES.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,26 @@
1313
<qos_library name="MyLibrary">
1414
<qos_profile name="MyProfile" is_default_qos="true">
1515
<base_name>
16-
<element>BuiltinQosLib::Generic.KeepLastReliable.TransientLocal</element>
16+
<element>BuiltinQosSnippetLib::QosPolicy.Durability.TransientLocal</element>
17+
<element>BuiltinQosSnippetLib::QosPolicy.Reliability.Reliable</element>
18+
<element>BuiltinQosSnippetLib::QosPolicy.History.KeepLast_1</element>
1719
</base_name>
1820
</qos_profile>
1921
<qos_profile name="Last10Cache">
2022
<base_name>
21-
<element>BuiltinQosLib::Generic.KeepLastReliable.TransientLocal</element>
23+
<element>BuiltinQosSnippetLib::QosPolicy.Durability.TransientLocal</element>
24+
<element>BuiltinQosSnippetLib::QosPolicy.Reliability.Reliable</element>
2225
</base_name>
23-
<!-- Up to this point we will only keep the last sample
24-
Lets update the history to keep the last 10 samples -->
26+
2527
<datawriter_qos>
2628
<history>
29+
<kind>KEEP_LAST_HISTORY_QOS</kind>
2730
<depth>10</depth>
2831
</history>
2932
</datawriter_qos>
3033
<datareader_qos>
3134
<history>
35+
<kind>KEEP_LAST_HISTORY_QOS</kind>
3236
<depth>10</depth>
3337
</history>
3438
</datareader_qos>

tutorials/last_value_cache/py/USER_QOS_PROFILES.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,26 @@
1313
<qos_library name="MyLibrary">
1414
<qos_profile name="MyProfile" is_default_qos="true">
1515
<base_name>
16-
<element>BuiltinQosLib::Generic.KeepLastReliable.TransientLocal</element>
16+
<element>BuiltinQosSnippetLib::QosPolicy.Durability.TransientLocal</element>
17+
<element>BuiltinQosSnippetLib::QosPolicy.Reliability.Reliable</element>
18+
<element>BuiltinQosSnippetLib::QosPolicy.History.KeepLast_1</element>
1719
</base_name>
1820
</qos_profile>
1921
<qos_profile name="Last10Cache">
2022
<base_name>
21-
<element>BuiltinQosLib::Generic.KeepLastReliable.TransientLocal</element>
23+
<element>BuiltinQosSnippetLib::QosPolicy.Durability.TransientLocal</element>
24+
<element>BuiltinQosSnippetLib::QosPolicy.Reliability.Reliable</element>
2225
</base_name>
23-
<!-- Up to this point we will only keep the last sample
24-
Lets update the history to keep the last 10 samples -->
26+
2527
<datawriter_qos>
2628
<history>
29+
<kind>KEEP_LAST_HISTORY_QOS</kind>
2730
<depth>10</depth>
2831
</history>
2932
</datawriter_qos>
3033
<datareader_qos>
3134
<history>
35+
<kind>KEEP_LAST_HISTORY_QOS</kind>
3236
<depth>10</depth>
3337
</history>
3438
</datareader_qos>

0 commit comments

Comments
 (0)