@@ -152,7 +152,7 @@ class UDS_DSCPR(Packet):
152
152
153
153
def answers (self , other ):
154
154
return isinstance (other , UDS_DSC ) and \
155
- other .diagnosticSessionType == self .diagnosticSessionType
155
+ other .diagnosticSessionType == self .diagnosticSessionType
156
156
157
157
158
158
bind_layers (UDS , UDS_DSCPR , service = 0x50 )
@@ -218,7 +218,7 @@ class UDS_SAPR(Packet):
218
218
219
219
def answers (self , other ):
220
220
return isinstance (other , UDS_SA ) \
221
- and other .securityAccessType == self .securityAccessType
221
+ and other .securityAccessType == self .securityAccessType
222
222
223
223
224
224
bind_layers (UDS , UDS_SAPR , service = 0x67 )
@@ -273,7 +273,7 @@ class UDS_CCPR(Packet):
273
273
274
274
def answers (self , other ):
275
275
return isinstance (other , UDS_CC ) \
276
- and other .controlType == self .controlType
276
+ and other .controlType == self .controlType
277
277
278
278
279
279
bind_layers (UDS , UDS_CCPR , service = 0x68 )
@@ -429,7 +429,7 @@ class UDS_AUTHPR(Packet):
429
429
430
430
def answers (self , other ):
431
431
return isinstance (other , UDS_AUTH ) \
432
- and other .subFunction == self .subFunction
432
+ and other .subFunction == self .subFunction
433
433
434
434
435
435
bind_layers (UDS , UDS_AUTHPR , service = 0x69 )
@@ -491,8 +491,7 @@ class UDS_ATPPR(Packet):
491
491
492
492
def answers (self , other ):
493
493
return isinstance (other , UDS_ATP ) \
494
- and other .timingParameterAccessType == \
495
- self .timingParameterAccessType
494
+ and other .timingParameterAccessType == self .timingParameterAccessType
496
495
497
496
498
497
bind_layers (UDS , UDS_ATPPR , service = 0xC3 )
@@ -605,7 +604,7 @@ class UDS_ROEPR(Packet):
605
604
606
605
def answers (self , other ):
607
606
return isinstance (other , UDS_ROE ) \
608
- and other .eventType == self .eventType
607
+ and other .eventType == self .eventType
609
608
610
609
611
610
bind_layers (UDS , UDS_ROEPR , service = 0xC6 )
@@ -644,7 +643,7 @@ class UDS_LCPR(Packet):
644
643
645
644
def answers (self , other ):
646
645
return isinstance (other , UDS_LC ) \
647
- and other .linkControlType == self .linkControlType
646
+ and other .linkControlType == self .linkControlType
648
647
649
648
650
649
bind_layers (UDS , UDS_LCPR , service = 0xC7 )
@@ -673,7 +672,7 @@ class UDS_RDBIPR(Packet):
673
672
674
673
def answers (self , other ):
675
674
return isinstance (other , UDS_RDBI ) \
676
- and self .dataIdentifier in other .identifiers
675
+ and self .dataIdentifier in other .identifiers
677
676
678
677
679
678
bind_layers (UDS , UDS_RDBIPR , service = 0x62 )
@@ -743,7 +742,7 @@ class UDS_RSDBIPR(Packet):
743
742
744
743
def answers (self , other ):
745
744
return isinstance (other , UDS_RSDBI ) \
746
- and other .dataIdentifier == self .dataIdentifier
745
+ and other .dataIdentifier == self .dataIdentifier
747
746
748
747
749
748
bind_layers (UDS , UDS_RSDBIPR , service = 0x64 )
@@ -780,7 +779,7 @@ class UDS_RDBPIPR(Packet):
780
779
781
780
def answers (self , other ):
782
781
return isinstance (other , UDS_RDBPI ) \
783
- and other .periodicDataIdentifier == self .periodicDataIdentifier
782
+ and other .periodicDataIdentifier == self .periodicDataIdentifier
784
783
785
784
786
785
bind_layers (UDS , UDS_RDBPIPR , service = 0x6A )
@@ -812,7 +811,7 @@ class UDS_DDDIPR(Packet):
812
811
813
812
def answers (self , other ):
814
813
return isinstance (other , UDS_DDDI ) \
815
- and other .subFunction == self .subFunction
814
+ and other .subFunction == self .subFunction
816
815
817
816
818
817
bind_layers (UDS , UDS_DDDIPR , service = 0x6C )
@@ -839,7 +838,7 @@ class UDS_WDBIPR(Packet):
839
838
840
839
def answers (self , other ):
841
840
return isinstance (other , UDS_WDBI ) \
842
- and other .dataIdentifier == self .dataIdentifier
841
+ and other .dataIdentifier == self .dataIdentifier
843
842
844
843
845
844
bind_layers (UDS , UDS_WDBIPR , service = 0x6E )
@@ -900,8 +899,8 @@ class UDS_WMBAPR(Packet):
900
899
901
900
def answers (self , other ):
902
901
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
905
904
906
905
907
906
bind_layers (UDS , UDS_WMBAPR , service = 0x7D )
@@ -1013,8 +1012,10 @@ class UDS_RDTCI(Packet):
1013
1012
class DTC (Packet ):
1014
1013
name = 'DTC and status record'
1015
1014
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" }),
1018
1019
BitField ("numeric_value_code" , 0 , 12 ),
1019
1020
ByteField ("additional_information_code" , 0 ),
1020
1021
FlagsField ("status" , 0 , 8 , UDS_RDTCI .dtcStatus )
@@ -1028,7 +1029,8 @@ class UDS_RDTCIPR(Packet):
1028
1029
name = 'ReadDTCInformationPositiveResponse'
1029
1030
fields_desc = [
1030
1031
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 ),
1032
1034
lambda pkt : pkt .reportType in [0x01 , 0x07 , 0x11 ,
1033
1035
0x12 , 0x02 , 0x0A ,
1034
1036
0x0B , 0x0C , 0x0D ,
@@ -1056,7 +1058,7 @@ class UDS_RDTCIPR(Packet):
1056
1058
1057
1059
def answers (self , other ):
1058
1060
return isinstance (other , UDS_RDTCI ) \
1059
- and other .reportType == self .reportType
1061
+ and other .reportType == self .reportType
1060
1062
1061
1063
1062
1064
bind_layers (UDS , UDS_RDTCIPR , service = 0x59 )
@@ -1091,8 +1093,8 @@ class UDS_RCPR(Packet):
1091
1093
1092
1094
def answers (self , other ):
1093
1095
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
1096
1098
1097
1099
1098
1100
bind_layers (UDS , UDS_RCPR , service = 0x71 )
@@ -1211,7 +1213,7 @@ class UDS_TDPR(Packet):
1211
1213
1212
1214
def answers (self , other ):
1213
1215
return isinstance (other , UDS_TD ) \
1214
- and other .blockSequenceCounter == self .blockSequenceCounter
1216
+ and other .blockSequenceCounter == self .blockSequenceCounter
1215
1217
1216
1218
1217
1219
bind_layers (UDS , UDS_TDPR , service = 0x76 )
@@ -1351,7 +1353,7 @@ class UDS_IOCBIPR(Packet):
1351
1353
1352
1354
def answers (self , other ):
1353
1355
return isinstance (other , UDS_IOCBI ) \
1354
- and other .dataIdentifier == self .dataIdentifier
1356
+ and other .dataIdentifier == self .dataIdentifier
1355
1357
1356
1358
1357
1359
bind_layers (UDS , UDS_IOCBIPR , service = 0x6F )
@@ -1416,8 +1418,8 @@ class UDS_NR(Packet):
1416
1418
1417
1419
def answers (self , other ):
1418
1420
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' ])
1421
1423
1422
1424
1423
1425
bind_layers (UDS , UDS_NR , service = 0x7f )
0 commit comments