From 5b0b88ced37e8fbe3031867255412f449245ca26 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 19 May 2016 18:38:05 +0200 Subject: Consistency renames of {ss,es}_ variables. --- decoders/usb_request/pd.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'decoders/usb_request/pd.py') diff --git a/decoders/usb_request/pd.py b/decoders/usb_request/pd.py index a4e3577..39a9df6 100644 --- a/decoders/usb_request/pd.py +++ b/decoders/usb_request/pd.py @@ -141,8 +141,8 @@ class Decoder(srd.Decoder): self.request = {} self.request_id = 0 self.transaction_state = 'IDLE' - self.transaction_ss = None - self.transaction_es = None + self.ss_transaction = None + self.es_transaction = None self.transaction_ep = None self.transaction_addr = None self.wrote_pcap_header = False @@ -182,7 +182,7 @@ class Decoder(srd.Decoder): addr = self.transaction_addr if not (addr, ep) in self.request: self.request[(addr, ep)] = {'setup_data': [], 'data': [], - 'type': None, 'ss': self.transaction_ss, 'es': None, + 'type': None, 'ss': self.ss_transaction, 'es': None, 'id': self.request_id, 'addr': addr, 'ep': ep} self.request_id += 1 request_started = 1 @@ -192,12 +192,12 @@ class Decoder(srd.Decoder): if request['type'] in (None, 'BULK IN') and self.transaction_type == 'IN': request['type'] = 'BULK IN' request['data'] += self.transaction_data - request['es'] = self.transaction_es + request['es'] = self.es_transaction self.handle_request(request_started, request_end) elif request['type'] in (None, 'BULK OUT') and self.transaction_type == 'OUT': request['type'] = 'BULK OUT' request['data'] += self.transaction_data - request['es'] = self.transaction_es + request['es'] = self.es_transaction self.handle_request(request_started, request_end) # CONTROL, SETUP stage @@ -223,11 +223,11 @@ class Decoder(srd.Decoder): # CONTROL, STATUS stage elif request['type'] == 'SETUP IN' and self.transaction_type == 'OUT': - request['es'] = self.transaction_es + request['es'] = self.es_transaction self.handle_request(0, request_end) elif request['type'] == 'SETUP OUT' and self.transaction_type == 'IN': - request['es'] = self.transaction_es + request['es'] = self.es_transaction self.handle_request(0, request_end) else: @@ -306,12 +306,12 @@ class Decoder(srd.Decoder): if pname == 'SOF': return if self.transaction_state == 'TOKEN RECEIVED': - transaction_timeout = self.transaction_es + transaction_timeout = self.es_transaction # Token length is 35 bits, timeout is 16..18 bit times # (USB 2.0 7.1.19.1). - transaction_timeout += int((self.transaction_es - self.transaction_ss) / 2) + transaction_timeout += int((self.es_transaction - self.ss_transaction) / 2) if ss > transaction_timeout: - self.transaction_es = transaction_timeout + self.es_transaction = transaction_timeout self.handshake = 'timeout' self.handle_transfer() self.transaction_state = 'IDLE' @@ -323,8 +323,8 @@ class Decoder(srd.Decoder): sync, pid, addr, ep, crc5 = pinfo self.transaction_data = [] - self.transaction_ss = ss - self.transaction_es = es + self.ss_transaction = ss + self.es_transaction = es self.transaction_state = 'TOKEN RECEIVED' self.transaction_ep = ep self.transaction_addr = addr @@ -347,7 +347,7 @@ class Decoder(srd.Decoder): self.handshake = pname self.transaction_state = 'IDLE' - self.transaction_es = es + self.es_transaction = es self.handle_transfer() elif pname == 'PRE': -- cgit v1.2.3-70-g09d2