From 49dadd6620b59436323e0911d940777e01d3e9b4 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Mon, 21 Mar 2022 15:12:45 +0100 Subject: [PATCH] L2SS-676: Explictly refer where markers are recorded in the code --- .../tangostationcontrol/devices/sdp/packet.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/packet.py b/tangostationcontrol/tangostationcontrol/devices/sdp/packet.py index ae21c8f5a..611017659 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/packet.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/packet.py @@ -73,7 +73,12 @@ class SDPPacket(object): @classmethod def valid_markers(cls): - """ Valid values for the 'marker_raw' header field for this class. """ + """ Valid values for the 'marker_raw' header field for this class. + + Each new packet class that introduces a new marker should be added + to the PACKET_CLASS_FOR_MARKER registry, which holds the mapping + marker -> packet class. + """ # return all markers registered in PACKET_CLASS_FOR_MARKER which are for this class or any of its specialisations return [marker for marker, klass in PACKET_CLASS_FOR_MARKER.items() if issubclass(klass, cls)] -- GitLab