# Diag Routine Control Service - [API reference](https://docs.qualcomm.com/doc/80-41102-2/topic/_doxygen_rst_file__doxygen_sources_taf_diagRoutineCtrl_interface_h.html#file-taf-diagroutinectrl-interface-h) The Diag Routine Control service APIs are used by applications to handle routine control(0x31) requests from UDS clients. ## IPC interfaces binding All functions of this API are provided by the **tafDiagSvc** platform service. The following example illustrates how to bind to the diag routine control service. bindings: { clientExe.clientComponent.taf_diagRoutineCtrl -> tafDiagSvc.taf_diagRoutineCtrl } Copy to clipboard ## Routine control A diag routine control service reference can be retrieved using [taf\_diagRoutineCtrl\_GetService()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00404_1a2f667027ded2caa7127ea45078e27b8f.html#Documentationa00404_1a2f667027ded2caa7127ea45078e27b8f) with the identifier passed as a parameter. diagRoutineCtrlSvcRef = taf_diagRoutineCtrl_GetService(identifier); if (diagRoutineCtrlSvcRef == NULL) { LE_ERROR("Fail to get routine control reference."); return; } Copy to clipboard ## Set/get VLAN ID After getting a service reference, an application can set the VLAN ID to the service to filter routine control requests using [taf\_diagRoutineCtrl\_SetVlanId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00404_1a47b9779f420ab17537bed0c8b845b34a.html#Documentationa00404_1a47b9779f420ab17537bed0c8b845b34a). It shall be called before registering the handler for the RoutineControl(0x31) request message. An application can get the VLAN ID of the request message using [taf\_diagRoutineCtrl\_GetVlanIdFromMsg()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00404_1a71f2d7d50c6acfca8e4fee0b975a724d.html#Documentationa00404_1a71f2d7d50c6acfca8e4fee0b975a724d). - [taf\_diagRoutineCtrl\_SetVlanId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00404_1a47b9779f420ab17537bed0c8b845b34a.html#Documentationa00404_1a47b9779f420ab17537bed0c8b845b34a) — Sets the VLAN ID. - [taf\_diagRoutineCtrl\_GetVlanIdFromMsg()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00404_1a71f2d7d50c6acfca8e4fee0b975a724d.html#Documentationa00404_1a71f2d7d50c6acfca8e4fee0b975a724d) — Gets the VLAN ID of the request message. Last Published: Jul 29, 2026 [Previous Topic Diag Reset Service](https://docs.qualcomm.com/bundle/publicresource/80-41102-2/topics/page_c_tafDiagReset.md) [Next Topic Diag Security Service](https://docs.qualcomm.com/bundle/publicresource/80-41102-2/topics/page_c_tafDiagSecurity.md)