Skip to content

Commit f619b8f

Browse files
committed
Improved docstring of readDtcInformation calls
1 parent c22d437 commit f619b8f

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

udsoncan/client.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,8 @@ def write_memory_by_address(self, memory_location, data):
11051105
# ==== ReadDTCInformation
11061106
def get_dtc_by_status_mask(self, status_mask):
11071107
"""
1108+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCByStatusMask``
1109+
11081110
Reads all the Diagnostic Trouble Codes that have a status matching the given mask.
11091111
The server will check all of its DTCs and if (Dtc.status & status_mask) != 0, then the DTCs match the filter and are sent back to the client.
11101112
@@ -1120,6 +1122,8 @@ def get_dtc_by_status_mask(self, status_mask):
11201122

11211123
def get_user_defined_memory_dtc_by_status_mask(self, status_mask, memory_selection):
11221124
"""
1125+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportUserDefMemoryDTCByStatusMask``
1126+
11231127
Reads Diagnostic Trouble Codes that have a status matching the given mask in a user defined memory .
11241128
The server will check all of its DTCs inside the user defined memory region and if (Dtc.status & status_mask) != 0,
11251129
then the DTCs match the filter and are sent back to the client.
@@ -1142,6 +1146,8 @@ def get_user_defined_memory_dtc_by_status_mask(self, status_mask, memory_selecti
11421146

11431147
def get_emission_dtc_by_status_mask(self, status_mask):
11441148
"""
1149+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportEmissionsRelatedOBDDTCByStatusMask``
1150+
11451151
Reads the emission-related Diagnostic Trouble Codes that have a status matching the given mask.
11461152
The server will check its emission-related DTCs and if (Dtc.status & status_mask) != 0, then the DTCs match the filter and are sent back to the client.
11471153
@@ -1157,6 +1163,8 @@ def get_emission_dtc_by_status_mask(self, status_mask):
11571163

11581164
def get_mirrormemory_dtc_by_status_mask(self, status_mask):
11591165
"""
1166+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportMirrorMemoryDTCByStatusMask``
1167+
11601168
Reads all the Diagnostic Trouble Codes stored in mirror memory that have a status matching the given mask.
11611169
The server will check all of its DTCs and if (Dtc.status & status_mask) != 0, then the DTCs match the filter and are sent back to the client.
11621170
@@ -1172,6 +1180,8 @@ def get_mirrormemory_dtc_by_status_mask(self, status_mask):
11721180

11731181
def get_dtc_by_status_severity_mask(self, status_mask, severity_mask):
11741182
"""
1183+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCBySeverityMaskRecord``
1184+
11751185
Reads all the Diagnostic Trouble Codes that have a status and a severity matching the given masks.
11761186
The server will check all of its DTCs and if ( (Dtc.status & status_mask) != 0 && (Dtc.severity & severity) !=0), then the DTCs match the filter and are sent back to the client.
11771187
@@ -1190,6 +1200,8 @@ def get_dtc_by_status_severity_mask(self, status_mask, severity_mask):
11901200

11911201
def get_number_of_dtc_by_status_mask(self, status_mask):
11921202
"""
1203+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportNumberOfDTCByStatusMask``
1204+
11931205
Gets the number of DTCs that match the specified status mask.
11941206
11951207
:Effective configuration: ``exception_on_<type>_response``
@@ -1204,6 +1216,8 @@ def get_number_of_dtc_by_status_mask(self, status_mask):
12041216

12051217
def get_mirrormemory_number_of_dtc_by_status_mask(self, status_mask):
12061218
"""
1219+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportNumberOfMirrorMemoryDTCByStatusMask``
1220+
12071221
Gets the number of DTCs that match the specified status mask in mirror memory.
12081222
12091223
:Effective configuration: ``exception_on_<type>_response``
@@ -1218,6 +1232,8 @@ def get_mirrormemory_number_of_dtc_by_status_mask(self, status_mask):
12181232

12191233
def get_number_of_emission_dtc_by_status_mask(self, status_mask):
12201234
"""
1235+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportNumberOfEmissionsRelatedOBDDTCByStatusMask``
1236+
12211237
Gets the number of emission-related DTCs that match the specified status mask.
12221238
12231239
:Effective configuration: ``exception_on_<type>_response``
@@ -1232,6 +1248,8 @@ def get_number_of_emission_dtc_by_status_mask(self, status_mask):
12321248

12331249
def get_number_of_dtc_by_status_severity_mask(self, status_mask, severity_mask):
12341250
"""
1251+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportNumberOfDTCBySeverityMaskRecord``
1252+
12351253
Gets the number of DTCs that match the specified status mask and severity mask.
12361254
12371255
:Effective configuration: ``exception_on_<type>_response``
@@ -1249,6 +1267,8 @@ def get_number_of_dtc_by_status_severity_mask(self, status_mask, severity_mask):
12491267

12501268
def get_dtc_severity(self, dtc):
12511269
"""
1270+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportSeverityInformationOfDTC``
1271+
12521272
Requests the server for a specific DTC severity level.
12531273
12541274
:Effective configuration: ``exception_on_<type>_response``
@@ -1263,6 +1283,8 @@ def get_dtc_severity(self, dtc):
12631283

12641284
def get_supported_dtc(self):
12651285
"""
1286+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportSupportedDTCs``
1287+
12661288
Requests the list of supported DTCs by the server.
12671289
12681290
:Effective configuration: ``exception_on_<type>_response`` ``tolerate_zero_padding`` ``ignore_all_zero_dtc``
@@ -1274,6 +1296,8 @@ def get_supported_dtc(self):
12741296

12751297
def get_first_test_failed_dtc(self):
12761298
"""
1299+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportFirstTestFailedDTC``
1300+
12771301
Reads a single DTC. Requests the server for the first DTC that set its ``Dtc.Status.test_failed`` bit.
12781302
12791303
:Effective configuration: ``exception_on_<type>_response`` ``tolerate_zero_padding`` ``ignore_all_zero_dtc``
@@ -1285,6 +1309,8 @@ def get_first_test_failed_dtc(self):
12851309

12861310
def get_first_confirmed_dtc(self):
12871311
"""
1312+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportFirstConfirmedDTC``
1313+
12881314
Reads a single DTC. Requests the server for the first DTC that set its ``Dtc.Status.confirmed`` bit.
12891315
12901316
:Effective configuration: ``exception_on_<type>_response`` ``tolerate_zero_padding`` ``ignore_all_zero_dtc``
@@ -1296,6 +1322,8 @@ def get_first_confirmed_dtc(self):
12961322

12971323
def get_most_recent_test_failed_dtc(self):
12981324
"""
1325+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportMostRecentTestFailedDTC``
1326+
12991327
Reads a single DTC. Requests the server for the last DTC that set its ``Dtc.Status.test_failed`` bit.
13001328
13011329
:Effective configuration: ``exception_on_<type>_response`` ``tolerate_zero_padding`` ``ignore_all_zero_dtc``
@@ -1307,6 +1335,8 @@ def get_most_recent_test_failed_dtc(self):
13071335

13081336
def get_most_recent_confirmed_dtc(self):
13091337
"""
1338+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportMostRecentConfirmedDTC``
1339+
13101340
Reads a single DTC. Requests the server for the last DTC that set its ``Dtc.Status.confirmed`` bit.
13111341
13121342
:Effective configuration: ``exception_on_<type>_response`` ``tolerate_zero_padding`` ``ignore_all_zero_dtc``
@@ -1318,6 +1348,8 @@ def get_most_recent_confirmed_dtc(self):
13181348

13191349
def get_dtc_with_permanent_status(self):
13201350
"""
1351+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCWithPermanentStatus``
1352+
13211353
Returns all DTCs that the server marked as `permanent`.
13221354
13231355
A permanent DTC is a DTC stored in Non-Volatile memory and that cannot be erased by test equipment or by power-cycling the ECU.
@@ -1331,6 +1363,8 @@ def get_dtc_with_permanent_status(self):
13311363

13321364
def get_dtc_fault_counter(self):
13331365
"""
1366+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCFaultDetectionCounter``
1367+
13341368
Requests the server for all DTCs that are `prefailed` along with their fault detection counter.
13351369
13361370
A prefailed DTC is a DTC for which the detection condition is met, but has not been identified as `pending` or `confirmed` yet.
@@ -1347,6 +1381,8 @@ def get_dtc_fault_counter(self):
13471381

13481382
def get_dtc_snapshot_identification(self):
13491383
"""
1384+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCSnapshotIdentification``
1385+
13501386
Requests the server to return an index of all the DTC snapshots available. The server will respond with a list of DTCs and a list of snapshot record numbers for each DTC.
13511387
13521388
:Effective configuration: ``exception_on_<type>_response`` ``tolerate_zero_padding`` ``ignore_all_zero_dtc``
@@ -1358,6 +1394,8 @@ def get_dtc_snapshot_identification(self):
13581394

13591395
def get_dtc_snapshot_by_dtc_number(self, dtc, record_number=0xFF):
13601396
"""
1397+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCSnapshotRecordByDTCNumber``
1398+
13611399
Requests the server for one or many specific DTC snapshots associated with a single DTC.
13621400
Each snapshot has a data identifier associated with it. The data will be decoded using the associated :ref:`DidCodec<DidCodec>` defined in ``config['data_identifiers']``.
13631401
@@ -1377,6 +1415,8 @@ def get_dtc_snapshot_by_dtc_number(self, dtc, record_number=0xFF):
13771415

13781416
def get_user_defined_dtc_snapshot_by_dtc_number(self, dtc, memory_selection, record_number=0xFF):
13791417
"""
1418+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportUserDefMemoryDTCSnapshotRecordByDTCNumber``
1419+
13801420
Requests the server for one or many specific DTC snapshots associated with a single DTC in a user defined memory.
13811421
Each snapshot has a data identifier associated with it. The data will be decoded using the associated :ref:`DidCodec<DidCodec>` defined in ``config['data_identifiers']``.
13821422
@@ -1401,6 +1441,8 @@ def get_user_defined_dtc_snapshot_by_dtc_number(self, dtc, memory_selection, rec
14011441

14021442
def get_dtc_snapshot_by_record_number(self, record_number=0xFF):
14031443
"""
1444+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCSnapshotRecordByRecordNumber``
1445+
14041446
Requests the server for one or many DTC snapshots by specifying a record number. This functionality can exist only if the server assigns globally unique record_numbers to DTC snapshots, regardless of the DTC ID.
14051447
14061448
Each snapshot has a data identifier associated with it. The data will be decoded using the associated :ref:`DidCodec<DidCodec>` defined in ``config['data_identifiers']``.
@@ -1417,6 +1459,8 @@ def get_dtc_snapshot_by_record_number(self, record_number=0xFF):
14171459

14181460
def get_dtc_extended_data_by_dtc_number(self, dtc, record_number=0xFF, data_size = None):
14191461
"""
1462+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCExtendedDataRecordByDTCNumber``
1463+
14201464
Requests the server for one or many DTC **extended data** by specifying a DTC and an record number. This mehtod may return a single DTC containing multiple records of extended data
14211465
14221466
The DTC extended data is an ECU specific set of data that is not associated with a data identifier. Given as ``bytes``
@@ -1440,6 +1484,8 @@ def get_dtc_extended_data_by_dtc_number(self, dtc, record_number=0xFF, data_size
14401484

14411485
def get_dtc_extended_data_by_record_number(self, record_number, data_size = None):
14421486
"""
1487+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportDTCExtDataRecordByRecordNumber``
1488+
14431489
Requests the server for one or many DTC **extended data** by specifying a record number only. This method may return multiple DTC containing each a single record of extended data.
14441490
14451491
The DTC extended data is an ECU specific set of data that is not associated with a data identifier. Given as ``bytes``
@@ -1465,6 +1511,8 @@ def get_dtc_extended_data_by_record_number(self, record_number, data_size = None
14651511

14661512
def get_user_defined_dtc_extended_data_by_dtc_number(self, dtc, memory_selection, record_number=0xFF, data_size = None):
14671513
"""
1514+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportUserDefMemoryDTCExtDataRecordByDTCNumber``
1515+
14681516
Requests the server for one or many DTC **extended data** by specifying a DTC and an optional record number in a user defined memory.
14691517
This mehtod may return a single DTC containing multiple records of extended data
14701518
The DTC extended data is an ECU specific set of data that is not associated with a data identifier. Given as ``bytes``
@@ -1492,6 +1540,8 @@ def get_user_defined_dtc_extended_data_by_dtc_number(self, dtc, memory_selection
14921540

14931541
def get_mirrormemory_dtc_extended_data_by_dtc_number(self, dtc, record_number=0xFF, data_size = None):
14941542
"""
1543+
Performs a ``ReadDTCInformation`` service request with subfunction ``reportMirrorMemoryDTCExtendedDataRecordByDTCNumber``
1544+
14951545
Requests the server for one or many DTC **extended data** stored in mirror memory by specifying a record number.
14961546
14971547
The DTC extended data is an ECU specific set of data that is not associated with a data identifier. Given as ``bytes``

udsoncan/services/ReadDTCInformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class Subfunction(BaseSubfunction):
3636
reportEmissionsRelatedOBDDTCByStatusMask = 0x13
3737
reportDTCFaultDetectionCounter = 0x14
3838
reportDTCWithPermanentStatus = 0x15
39+
reportDTCExtDataRecordByRecordNumber = 0x16
3940
reportUserDefMemoryDTCByStatusMask = 0x17
4041
reportUserDefMemoryDTCSnapshotRecordByDTCNumber = 0x18
4142
reportUserDefMemoryDTCExtDataRecordByDTCNumber = 0x19
42-
reportDTCExtDataRecordByRecordNumber = 0x16
4343

4444
#todo
4545
reportSupportedDTCExtDataRecord = 0x1A

0 commit comments

Comments
 (0)