From e6b3f09f50d85eb3189748e9713a4253d199fbcf Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sun, 3 Sep 2017 16:02:04 -0700 Subject: [PATCH] add some better documentation.. --- yadenon.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/yadenon.py b/yadenon.py index 45dc3a6..67e617f 100644 --- a/yadenon.py +++ b/yadenon.py @@ -42,7 +42,11 @@ import twisted.internet.serialport __all__ = [ 'DenonAVR' ] class DenonAVR(object,basic.LineReceiver): - delimiter = '\r' + '''A Twisted Protocol Handler for Denon Receivers. This is not yet + complete, but has basic functionally, and more will be added as + needed.''' + + delimiter = '\r' # line delimiter is the CR timeOut = 1 def __init__(self, serdev): @@ -181,7 +185,8 @@ class DenonAVR(object,basic.LineReceiver): self.sendLine(cmd) def lineReceived(self, event): - '''Process a line from the AVR.''' + '''Process a line from the AVR. This is internal and will + be called by LineReceiver.''' #print 'lR:', `event` if len(event) >= 2: @@ -214,7 +219,9 @@ class DenonAVR(object,basic.LineReceiver): @inlineCallbacks def update(self): '''Update the status of the AVR. This ensures that the - state of the object matches the amp.''' + state of the object matches the amp. Returns a Deferred. + When the deferred fires, then all the internal state has + been updated and can be examined.''' d = self._waitfor('PW')