# Diag DTC Service - [API reference](https://docs.qualcomm.com/doc/80-41102-2/topic/_doxygen_rst_file__doxygen_sources_taf_diagDTC_interface_h.html#file-taf-diagdtc-interface-h) Diag DTC Service provides APIs for applications to manage DTC. ## IPC interfaces binding The functions of this API are provided by the **tafDiagSvc** platform service. The following example illustrates how to bind to the diag DTC service. bindings: { clientExe.clientComponent.taf_diagDTC -> tafDiagSvc.taf_diagDTC } Copy to clipboard ## Server-service APIs A diag DTC service reference should be got using [taf\_diagDTC\_GetService()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a77e534c463d8164a94bd7f0ce20c337c.html#Documentationa00359_1a77e534c463d8164a94bd7f0ce20c337c) or [taf\_diagDTC\_GetAllService()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a9db98e5b3e9ba19adf0d08d78b00ca57.html#Documentationa00359_1a9db98e5b3e9ba19adf0d08d78b00ca57). Use the returned reference for subsequent operations. The following example illustrates how to set up a diag DTC server-service-instance for single DTC. taf_diagDTC_ServiceRef_t singleSvcRef; // Service reference for single DTC // Get the service reference for single DTC. singleSvcRef = taf_diagDTC_GetService(dtcCode); LE_ASSERT(singleSvcRef != NULL); Copy to clipboard The following example illustrates how to set up a diag DTC server-service-instance for all DTC. taf_diagDTC_AllServiceRef_t allSvcRef; // Service reference for all DTC // Get the service reference for all DTC. allSvcRef = taf_diagDTC_GetAllService(); LE_ASSERT(allSvcRef != NULL); Copy to clipboard After getting the service reference, an application can call [taf\_diagDTC\_AddStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1acdb481c24dfae545f2a154f4b9cb75c8.html#Documentationa00359_1acdb481c24dfae545f2a154f4b9cb75c8) or [taf\_diagDTC\_GetAllService()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a9db98e5b3e9ba19adf0d08d78b00ca57.html#Documentationa00359_1a9db98e5b3e9ba19adf0d08d78b00ca57) to register a status change handler. The following example illustrates how to register a status change handler for single DTC. dtcStatusRef = taf_diagDTC_AddStatusHandler(singleSvcRef, (taf_diagDTC_StatusHandlerFunc_t)dtcStatusChangeHandler, NULL); Copy to clipboard The following example illustrates how to register a status change handler for all DTC. allDtcStatusRef = taf_diagDTC_AddAllStatusHandler(allSvcRef, (taf_diagDTC_AllStatusHandlerFunc_t)allDtcStatusChangeHandler, NULL); Copy to clipboard The following example illustrates how to register a clear DTC status change handler for single DTC. clearDtcStatusRef = taf_diagDTC_AddClearStatusHandler(singleSvcRef, (taf_diagDTC_ClearStatusHandlerFunc_t)clearDtcStatusChangeHandler, NULL); Copy to clipboard The following example illustrates how to register a clear all DTC status change handler for all DTC. clearAllDtcStatusRef = taf_diagDTC_AddClearAllStatusHandler(allSvcRef, (taf_diagDTC_ClearAllStatusHandlerFunc_t)clearAllDtcStatusChangeHandler, NULL); Copy to clipboard An application can call [taf\_diagDTC\_AddActivationStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a43d2c66a876008d9f9c8e1632d8e51bb.html#Documentationa00359_1a43d2c66a876008d9f9c8e1632d8e51bb) to register an activation status change handler. The following example illustrates how to register an activation status change handler for the single DTC. dtcActStatusRef = taf_diagDTC_AddActivationStatusHandler(singleSvcRef, (taf_diagDTC_ActivationStatusHandlerFunc_t)dtcActStatusChangeHandler, NULL); Copy to clipboard The following APIs are supported for single DTC: - [taf\_diagDTC\_GetService()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a77e534c463d8164a94bd7f0ce20c337c.html#Documentationa00359_1a77e534c463d8164a94bd7f0ce20c337c) — Gets service reference for single DTC. - [taf\_diagDTC\_GetCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a42a73836a7f9e0ead02a673de311fc81.html#Documentationa00359_1a42a73836a7f9e0ead02a673de311fc81) — Gets the DTC code for the given DTC reference. - [taf\_diagDTC\_ReadStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1af871e36c6850b62859a038c23224453c.html#Documentationa00359_1af871e36c6850b62859a038c23224453c) — Reads DTC status. - [taf\_diagDTC\_SetActivationStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a56668dbd116dcffb72b1d33fc54177e4.html#Documentationa00359_1a56668dbd116dcffb72b1d33fc54177e4) — Sets activation status. - [taf\_diagDTC\_GetActivationStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a635db8c0836bd525c8c8dbace45cc015.html#Documentationa00359_1a635db8c0836bd525c8c8dbace45cc015) — Gets activation status. - [taf\_diagDTC\_SetSuppression()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1af37f1bb1758d5ee6999353a68231104c.html#Documentationa00359_1af37f1bb1758d5ee6999353a68231104c) — Sets DTC suppression status. - [taf\_diagDTC\_GetSuppression()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ada2f2d2fabfdb2426b1f3ea011e9939d.html#Documentationa00359_1ada2f2d2fabfdb2426b1f3ea011e9939d) — Gets DTC suppression status. - [taf\_diagDTC\_ClearInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ae997bc3fcdfbe8991cb5126843a1e250.html#Documentationa00359_1ae997bc3fcdfbe8991cb5126843a1e250) — Clears DTC information. - [taf\_diagDTC\_AddStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1acdb481c24dfae545f2a154f4b9cb75c8.html#Documentationa00359_1acdb481c24dfae545f2a154f4b9cb75c8) — Adds handler function for EVENT ‘taf\_diagDTC\_Status’ - [taf\_diagDTC\_RemoveStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a53bdb897178f281f1e5e0396c7120b64.html#Documentationa00359_1a53bdb897178f281f1e5e0396c7120b64) — Removes handler function. - [taf\_diagDTC\_AddClearStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ac8d7e8139822718e8d17e16b2cd66f99.html#Documentationa00359_1ac8d7e8139822718e8d17e16b2cd66f99) — Adds handler function for EVENT ‘taf\_diagDTC\_ClearDTCStatus’ - [taf\_diagDTC\_RemoveClearStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a10a35bcfe1875a26c390b5b1ce2c9a1d.html#Documentationa00359_1a10a35bcfe1875a26c390b5b1ce2c9a1d) — Removes handler function. - [taf\_diagDTC\_AddActivationStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a43d2c66a876008d9f9c8e1632d8e51bb.html#Documentationa00359_1a43d2c66a876008d9f9c8e1632d8e51bb) — Adds handler function for EVENT ‘taf\_diagDTC\_ActivationStatus’. - [taf\_diagDTC\_RemoveActivationStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1adc34f4945aacf0e057425b04a219b773.html#Documentationa00359_1adc34f4945aacf0e057425b04a219b773) — Removes handler function. - [taf\_diagDTC\_GetDataList()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ac124483ed7e197235adb5773c4458f3d.html#Documentationa00359_1ac124483ed7e197235adb5773c4458f3d) — Gets DTC data list. - [taf\_diagDTC\_GetFirstData()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ae19093ff4fd3229cf94ebc4f559ade5f.html#Documentationa00359_1ae19093ff4fd3229cf94ebc4f559ade5f) — Gets the first DTC data reference. - [taf\_diagDTC\_GetNextData()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a410b958a457be00101d3b791d3c9164b.html#Documentationa00359_1a410b958a457be00101d3b791d3c9164b) — Gets the next DTC data reference. - [taf\_diagDTC\_DeleteDataList()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a29213186dd78806a4e1520705a6bc4a5.html#Documentationa00359_1a29213186dd78806a4e1520705a6bc4a5) — Deletes the DTC data list. - [taf\_diagDTC\_GetDataDtcCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1aa74bbf2e7c2950c4f505f7ada8d9d7a0.html#Documentationa00359_1aa74bbf2e7c2950c4f505f7ada8d9d7a0) — Gets DTC code by the DTC data reference. - [taf\_diagDTC\_GetDataType()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1af8088a37025b41bddf3029fa1a2c6971.html#Documentationa00359_1af8088a37025b41bddf3029fa1a2c6971) — Gets data type. - [taf\_diagDTC\_GetRecordNumber()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1af1d2da54ccfe7447a010381661a70172.html#Documentationa00359_1af1d2da54ccfe7447a010381661a70172) — Gets record number. - [taf\_diagDTC\_GetDataId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ac6f47cdc9cd05a39abb623abe805b245.html#Documentationa00359_1ac6f47cdc9cd05a39abb623abe805b245) — Gets data Id. - [taf\_diagDTC\_GetDataValue()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ae951d2d63eaf80329715c7f1e6be5f0d.html#Documentationa00359_1ae951d2d63eaf80329715c7f1e6be5f0d) — Gets data value. - [taf\_diagDTC\_RemoveSvc()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a15b4dae58a355e64ea4aa44bb5ed5549.html#Documentationa00359_1a15b4dae58a355e64ea4aa44bb5ed5549) — Removes the DTC service. The following APIs are supported for all DTC: - [taf\_diagDTC\_GetAllService()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a9db98e5b3e9ba19adf0d08d78b00ca57.html#Documentationa00359_1a9db98e5b3e9ba19adf0d08d78b00ca57) — Gets service reference for all DTC. - [taf\_diagDTC\_SetAllSuppression()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a2a9bf0caa34a2a4f15c020055734921f.html#Documentationa00359_1a2a9bf0caa34a2a4f15c020055734921f) — Sets all DTC suppression status. - [taf\_diagDTC\_ClearAllInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a926286f56b426c6d946f5e026c4e1343.html#Documentationa00359_1a926286f56b426c6d946f5e026c4e1343) — Clears all DTC information. - [taf\_diagDTC\_AddAllStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ad10480ed1f2ecf7416b35779a877ee44.html#Documentationa00359_1ad10480ed1f2ecf7416b35779a877ee44) — Adds handler function for EVENT ‘taf\_diagDTC\_AllStatus’ - [taf\_diagDTC\_RemoveAllStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a7ca0448ff26ec5c6ded49ad88ad02c12.html#Documentationa00359_1a7ca0448ff26ec5c6ded49ad88ad02c12) — Removes handler function. - [taf\_diagDTC\_AddClearAllStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a0b46a479462f661ae4cbacae765cb067.html#Documentationa00359_1a0b46a479462f661ae4cbacae765cb067) — Adds handler function for EVENT ‘taf\_diagDTC\_ClearAllDTCStatus’ - [taf\_diagDTC\_RemoveClearAllStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1ae5bb5c63b575562cd46db0c54a5bce04.html#Documentationa00359_1ae5bb5c63b575562cd46db0c54a5bce04) — Removes handler function. - [taf\_diagDTC\_RemoveAllSvc()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00359_1a8422b52c4c4ac85fee9f1fec96733f39.html#Documentationa00359_1a8422b52c4c4ac85fee9f1fec96733f39) — Removes the all DTC service. Last Published: Jul 29, 2026 [Previous Topic Diag DoIP Service](https://docs.qualcomm.com/bundle/publicresource/80-41102-2/topics/page_c_tafDiagDoIP.md) [Next Topic Diag Event Management Service](https://docs.qualcomm.com/bundle/publicresource/80-41102-2/topics/page_c_tafDiagEvent.md)