Are the Knock sensor and Oxygen sensor the same thing? on 2005 Cadillac STS

I was told I need a Knock Sensor. When I went to look it up, all I find is the Mass airflow and Oxygen sensor. I know its not the Mass airflow, so what is it?

Asked by for the 2005 Cadillac STS
A trouble code would be much more helpful.