Skip to content

Commit 5d32cbb

Browse files
authored
add detailed comments for get_transceiver_change_event (sonic-net#12)
Signed-off-by: Guohan Lu <[email protected]>
1 parent 6d8c940 commit 5d32cbb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sonic_sfp/sfputilbase.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -893,9 +893,13 @@ def reset(self, port_num):
893893
@abc.abstractmethod
894894
def get_transceiver_change_event(self, timeout=0):
895895
"""
896-
:param timeout
897-
:returns: Boolean, True if call successful, False if not;
898-
dict for pysical interface number and the SFP status,
896+
:param timeout in milliseconds. The method is a blocking call. When timeout is
897+
zero, it only returns when there is change event, i.e., transceiver plug-in/out
898+
event. When timeout is non-zero, the function can also return when the timer expires.
899+
When timer expires, the return status is True and events is empty.
900+
:returns: (status, events)
901+
:status: Boolean, True if call successful, False if not;
902+
:events: dictionary for pysical port index and the SFP status,
899903
status='1' represent plug in, '0' represent plug out like {'0': '1', '31':'0'}
900904
"""
901905
return

0 commit comments

Comments
 (0)