@@ -152,7 +152,7 @@ class UDS_DSCPR(Packet):
152152
153153 def answers (self , other ):
154154 return isinstance (other , UDS_DSC ) and \
155- other .diagnosticSessionType == self .diagnosticSessionType
155+ other .diagnosticSessionType == self .diagnosticSessionType
156156
157157
158158bind_layers (UDS , UDS_DSCPR , service = 0x50 )
@@ -218,7 +218,7 @@ class UDS_SAPR(Packet):
218218
219219 def answers (self , other ):
220220 return isinstance (other , UDS_SA ) \
221- and other .securityAccessType == self .securityAccessType
221+ and other .securityAccessType == self .securityAccessType
222222
223223
224224bind_layers (UDS , UDS_SAPR , service = 0x67 )
@@ -273,7 +273,7 @@ class UDS_CCPR(Packet):
273273
274274 def answers (self , other ):
275275 return isinstance (other , UDS_CC ) \
276- and other .controlType == self .controlType
276+ and other .controlType == self .controlType
277277
278278
279279bind_layers (UDS , UDS_CCPR , service = 0x68 )
@@ -429,7 +429,7 @@ class UDS_AUTHPR(Packet):
429429
430430 def answers (self , other ):
431431 return isinstance (other , UDS_AUTH ) \
432- and other .subFunction == self .subFunction
432+ and other .subFunction == self .subFunction
433433
434434
435435bind_layers (UDS , UDS_AUTHPR , service = 0x69 )
@@ -491,8 +491,7 @@ class UDS_ATPPR(Packet):
491491
492492 def answers (self , other ):
493493 return isinstance (other , UDS_ATP ) \
494- and other .timingParameterAccessType == \
495- self .timingParameterAccessType
494+ and other .timingParameterAccessType == self .timingParameterAccessType
496495
497496
498497bind_layers (UDS , UDS_ATPPR , service = 0xC3 )
@@ -605,7 +604,7 @@ class UDS_ROEPR(Packet):
605604
606605 def answers (self , other ):
607606 return isinstance (other , UDS_ROE ) \
608- and other .eventType == self .eventType
607+ and other .eventType == self .eventType
609608
610609
611610bind_layers (UDS , UDS_ROEPR , service = 0xC6 )
@@ -644,7 +643,7 @@ class UDS_LCPR(Packet):
644643
645644 def answers (self , other ):
646645 return isinstance (other , UDS_LC ) \
647- and other .linkControlType == self .linkControlType
646+ and other .linkControlType == self .linkControlType
648647
649648
650649bind_layers (UDS , UDS_LCPR , service = 0xC7 )
@@ -673,7 +672,7 @@ class UDS_RDBIPR(Packet):
673672
674673 def answers (self , other ):
675674 return isinstance (other , UDS_RDBI ) \
676- and self .dataIdentifier in other .identifiers
675+ and self .dataIdentifier in other .identifiers
677676
678677
679678bind_layers (UDS , UDS_RDBIPR , service = 0x62 )
@@ -743,7 +742,7 @@ class UDS_RSDBIPR(Packet):
743742
744743 def answers (self , other ):
745744 return isinstance (other , UDS_RSDBI ) \
746- and other .dataIdentifier == self .dataIdentifier
745+ and other .dataIdentifier == self .dataIdentifier
747746
748747
749748bind_layers (UDS , UDS_RSDBIPR , service = 0x64 )
@@ -780,7 +779,7 @@ class UDS_RDBPIPR(Packet):
780779
781780 def answers (self , other ):
782781 return isinstance (other , UDS_RDBPI ) \
783- and other .periodicDataIdentifier == self .periodicDataIdentifier
782+ and other .periodicDataIdentifier == self .periodicDataIdentifier
784783
785784
786785bind_layers (UDS , UDS_RDBPIPR , service = 0x6A )
@@ -812,7 +811,7 @@ class UDS_DDDIPR(Packet):
812811
813812 def answers (self , other ):
814813 return isinstance (other , UDS_DDDI ) \
815- and other .subFunction == self .subFunction
814+ and other .subFunction == self .subFunction
816815
817816
818817bind_layers (UDS , UDS_DDDIPR , service = 0x6C )
@@ -839,7 +838,7 @@ class UDS_WDBIPR(Packet):
839838
840839 def answers (self , other ):
841840 return isinstance (other , UDS_WDBI ) \
842- and other .dataIdentifier == self .dataIdentifier
841+ and other .dataIdentifier == self .dataIdentifier
843842
844843
845844bind_layers (UDS , UDS_WDBIPR , service = 0x6E )
@@ -900,8 +899,8 @@ class UDS_WMBAPR(Packet):
900899
901900 def answers (self , other ):
902901 return isinstance (other , UDS_WMBA ) \
903- and other .memorySizeLen == self .memorySizeLen \
904- and other .memoryAddressLen == self .memoryAddressLen
902+ and other .memorySizeLen == self .memorySizeLen \
903+ and other .memoryAddressLen == self .memoryAddressLen
905904
906905
907906bind_layers (UDS , UDS_WMBAPR , service = 0x7D )
@@ -1013,8 +1012,10 @@ class UDS_RDTCI(Packet):
10131012class DTC (Packet ):
10141013 name = 'DTC and status record'
10151014 fields_desc = [
1016- BitEnumField ("system" , 0 , 2 , {0 : "Powertrain" , 1 : "Chassis" , 2 : "Body" , 3 : "Network" }),
1017- BitEnumField ("type" , 0 , 2 , {0 : "Generic" , 1 : "ManufacturerSpecific" , 2 : "Generic" , 3 : "Generic" }),
1015+ BitEnumField ("system" , 0 , 2 , {
1016+ 0 : "Powertrain" , 1 : "Chassis" , 2 : "Body" , 3 : "Network" }),
1017+ BitEnumField ("type" , 0 , 2 , {
1018+ 0 : "Generic" , 1 : "ManufacturerSpecific" , 2 : "Generic" , 3 : "Generic" }),
10181019 BitField ("numeric_value_code" , 0 , 12 ),
10191020 ByteField ("additional_information_code" , 0 ),
10201021 FlagsField ("status" , 0 , 8 , UDS_RDTCI .dtcStatus )
@@ -1028,7 +1029,8 @@ class UDS_RDTCIPR(Packet):
10281029 name = 'ReadDTCInformationPositiveResponse'
10291030 fields_desc = [
10301031 ByteEnumField ('reportType' , 0 , UDS_RDTCI .reportTypes ),
1031- ConditionalField (FlagsField ('DTCStatusAvailabilityMask' , 0 , 8 , UDS_RDTCI .dtcStatus ),
1032+ ConditionalField (FlagsField ('DTCStatusAvailabilityMask' , 0 , 8 ,
1033+ UDS_RDTCI .dtcStatus ),
10321034 lambda pkt : pkt .reportType in [0x01 , 0x07 , 0x11 ,
10331035 0x12 , 0x02 , 0x0A ,
10341036 0x0B , 0x0C , 0x0D ,
@@ -1056,7 +1058,7 @@ class UDS_RDTCIPR(Packet):
10561058
10571059 def answers (self , other ):
10581060 return isinstance (other , UDS_RDTCI ) \
1059- and other .reportType == self .reportType
1061+ and other .reportType == self .reportType
10601062
10611063
10621064bind_layers (UDS , UDS_RDTCIPR , service = 0x59 )
@@ -1091,8 +1093,8 @@ class UDS_RCPR(Packet):
10911093
10921094 def answers (self , other ):
10931095 return isinstance (other , UDS_RC ) \
1094- and other .routineControlType == self .routineControlType \
1095- and other .routineIdentifier == self .routineIdentifier
1096+ and other .routineControlType == self .routineControlType \
1097+ and other .routineIdentifier == self .routineIdentifier
10961098
10971099
10981100bind_layers (UDS , UDS_RCPR , service = 0x71 )
@@ -1211,7 +1213,7 @@ class UDS_TDPR(Packet):
12111213
12121214 def answers (self , other ):
12131215 return isinstance (other , UDS_TD ) \
1214- and other .blockSequenceCounter == self .blockSequenceCounter
1216+ and other .blockSequenceCounter == self .blockSequenceCounter
12151217
12161218
12171219bind_layers (UDS , UDS_TDPR , service = 0x76 )
@@ -1351,7 +1353,7 @@ class UDS_IOCBIPR(Packet):
13511353
13521354 def answers (self , other ):
13531355 return isinstance (other , UDS_IOCBI ) \
1354- and other .dataIdentifier == self .dataIdentifier
1356+ and other .dataIdentifier == self .dataIdentifier
13551357
13561358
13571359bind_layers (UDS , UDS_IOCBIPR , service = 0x6F )
@@ -1416,8 +1418,8 @@ class UDS_NR(Packet):
14161418
14171419 def answers (self , other ):
14181420 return self .requestServiceId == other .service and \
1419- (self .negativeResponseCode != 0x78 or
1420- conf .contribs ['UDS' ]['treat-response-pending-as-answer' ])
1421+ (self .negativeResponseCode != 0x78 or
1422+ conf .contribs ['UDS' ]['treat-response-pending-as-answer' ])
14211423
14221424
14231425bind_layers (UDS , UDS_NR , service = 0x7f )
0 commit comments