@@ -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 )
@@ -1048,7 +1049,8 @@ class UDS_RDTCIPR(Packet):
10481049 name = 'ReadDTCInformationPositiveResponse'
10491050 fields_desc = [
10501051 ByteEnumField ('reportType' , 0 , UDS_RDTCI .reportTypes ),
1051- ConditionalField (FlagsField ('DTCStatusAvailabilityMask' , 0 , 8 , UDS_RDTCI .dtcStatus ),
1052+ ConditionalField (FlagsField ('DTCStatusAvailabilityMask' , 0 , 8 ,
1053+ UDS_RDTCI .dtcStatus ),
10521054 lambda pkt : pkt .reportType in [0x01 , 0x07 , 0x11 ,
10531055 0x12 , 0x02 , 0x0A ,
10541056 0x0B , 0x0C , 0x0D ,
@@ -1078,7 +1080,7 @@ class UDS_RDTCIPR(Packet):
10781080
10791081 def answers (self , other ):
10801082 return isinstance (other , UDS_RDTCI ) \
1081- and other .reportType == self .reportType
1083+ and other .reportType == self .reportType
10821084
10831085
10841086bind_layers (UDS , UDS_RDTCIPR , service = 0x59 )
@@ -1113,8 +1115,8 @@ class UDS_RCPR(Packet):
11131115
11141116 def answers (self , other ):
11151117 return isinstance (other , UDS_RC ) \
1116- and other .routineControlType == self .routineControlType \
1117- and other .routineIdentifier == self .routineIdentifier
1118+ and other .routineControlType == self .routineControlType \
1119+ and other .routineIdentifier == self .routineIdentifier
11181120
11191121
11201122bind_layers (UDS , UDS_RCPR , service = 0x71 )
@@ -1233,7 +1235,7 @@ class UDS_TDPR(Packet):
12331235
12341236 def answers (self , other ):
12351237 return isinstance (other , UDS_TD ) \
1236- and other .blockSequenceCounter == self .blockSequenceCounter
1238+ and other .blockSequenceCounter == self .blockSequenceCounter
12371239
12381240
12391241bind_layers (UDS , UDS_TDPR , service = 0x76 )
@@ -1373,7 +1375,7 @@ class UDS_IOCBIPR(Packet):
13731375
13741376 def answers (self , other ):
13751377 return isinstance (other , UDS_IOCBI ) \
1376- and other .dataIdentifier == self .dataIdentifier
1378+ and other .dataIdentifier == self .dataIdentifier
13771379
13781380
13791381bind_layers (UDS , UDS_IOCBIPR , service = 0x6F )
@@ -1438,8 +1440,8 @@ class UDS_NR(Packet):
14381440
14391441 def answers (self , other ):
14401442 return self .requestServiceId == other .service and \
1441- (self .negativeResponseCode != 0x78 or
1442- conf .contribs ['UDS' ]['treat-response-pending-as-answer' ])
1443+ (self .negativeResponseCode != 0x78 or
1444+ conf .contribs ['UDS' ]['treat-response-pending-as-answer' ])
14431445
14441446
14451447bind_layers (UDS , UDS_NR , service = 0x7f )
0 commit comments