Skip to content

Commit

Permalink
add detailed comments for get_transceiver_change_event (sonic-net#12)
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <gulv@microsoft.com>
  • Loading branch information
lguohan authored Sep 11, 2018
1 parent 6d8c940 commit 5d32cbb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,13 @@ def reset(self, port_num):
@abc.abstractmethod
def get_transceiver_change_event(self, timeout=0):
"""
:param timeout
:returns: Boolean, True if call successful, False if not;
dict for pysical interface number and the SFP status,
:param timeout in milliseconds. The method is a blocking call. When timeout is
zero, it only returns when there is change event, i.e., transceiver plug-in/out
event. When timeout is non-zero, the function can also return when the timer expires.
When timer expires, the return status is True and events is empty.
:returns: (status, events)
:status: Boolean, True if call successful, False if not;
:events: dictionary for pysical port index and the SFP status,
status='1' represent plug in, '0' represent plug out like {'0': '1', '31':'0'}
"""
return

0 comments on commit 5d32cbb

Please sign in to comment.