From fedd9d96dfe861db73239b8b5565e4c160f8db44 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Wed, 11 Jan 2017 15:41:09 -0800 Subject: [PATCH] Add a comment describing durability. Signed-off-by: Chris Lalancette --- image_tools_py/src/image_qos_profile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/image_tools_py/src/image_qos_profile.py b/image_tools_py/src/image_qos_profile.py index 8c05f23fb..d7411718d 100644 --- a/image_tools_py/src/image_qos_profile.py +++ b/image_tools_py/src/image_qos_profile.py @@ -46,6 +46,10 @@ def create_qos_profile(depth, reliability_policy, keep): else: raise ValueError("Invalid keep policy (must be 0 for keep last or 1 for keep all") + # The durability policy determines what happens to samples that were sent before + # a subscribe joined the network. + # VOLATILE - Past samples ignored + # TRANSIENT_LOCAL - Past samples are sent to the subscriber qos_profile.durability = QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_VOLATILE return qos_profile