Retrieve and record diagnostic trouble codes (DTC), on-board diagnostics monitor status, and freeze frame data, and clear codes when applicable.