| module UnifiedDiagnosticServices_Template { |
| |
| import from UnifiedDiagnosticServices all |
| import from General_Types all |
| |
| // DiagnosticSessionControlRequest |
| |
| template DefaultSessionRequest t_DefaultSessionRequest := { |
| diagnosticSessionType := '0000001'B |
| } |
| |
| template ProgrammingSessionRequest t_ProgrammingSessionRequest := { |
| diagnosticSessionType := '0000010'B |
| } |
| |
| template ExtendedDiagnosticSessionRequest t_ExtendedDiagnosticSessionRequest := { |
| diagnosticSessionType := '0000011'B |
| } |
| |
| template SafetySystemDiagnosticSessionRequest t_SafetySystemDiagnosticSessionRequest := { |
| diagnosticSessionType := '0000100'B |
| } |
| |
| template TopLevelMessage_UDS_requests t_diagnosticSessionControlRequestSID ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template DiagnosticSessionRequestType p_diagnosticSessionType) := |
| { |
| diagnosticSessionControlRequestSID := |
| { |
| sid := '10'O, |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| diagnosticSessionType := p_diagnosticSessionType |
| } |
| } |
| |
| // DiagnosticSessionControlResponse |
| template DefaultSessionResponse t_DefaultSessionResponse(OCT2 p_p2ServerMax, OCT2 p_p2StarServerMax) := { |
| diagnosticSessionType := '0000001'B, |
| p2ServerMax := p_p2ServerMax, |
| p2StarServerMax := p_p2StarServerMax |
| } |
| |
| template ProgrammingSessionResponse t_ProgrammingSessionResponse(OCT2 p_p2ServerMax, OCT2 p_p2StarServerMax) := { |
| diagnosticSessionType := '0000010'B, |
| p2ServerMax := p_p2ServerMax, |
| p2StarServerMax := p_p2StarServerMax |
| } |
| |
| template ExtendedDiagnosticSessionResponse t_ExtendedDiagnosticSessionResponse(OCT2 p_p2ServerMax, OCT2 p_p2StarServerMax) := { |
| diagnosticSessionType := '0000011'B, |
| p2ServerMax := p_p2ServerMax, |
| p2StarServerMax := p_p2StarServerMax |
| } |
| |
| template SafetySystemDiagnosticSessionResponse t_SafetySystemDiagnosticSessionResponse(OCT2 p_p2ServerMax, OCT2 p_p2StarServerMax) := { |
| diagnosticSessionType := '0000100'B, |
| p2ServerMax := p_p2ServerMax, |
| p2StarServerMax := p_p2StarServerMax |
| } |
| |
| template TopLevelMessage_UDS_responses t_diagnosticSessionControlResponseSID ( |
| template DiagnosticSessionResponseType p_diagnosticSessionType) := |
| { |
| diagnosticSessionControlResponseSID := |
| { |
| sid := '50'O, |
| reserved := '0'B, |
| diagnosticSessionType := p_diagnosticSessionType |
| } |
| } |
| |
| // ECUResetRequest |
| |
| template HardResetRequest t_HardResetRequest := { |
| resetType := '0000001'B |
| } |
| |
| template KeyOffOnResetRequest t_KeyOffOnResetRequest := { |
| resetType := '0000010'B |
| } |
| |
| template SoftResetRequest t_SoftResetRequest := { |
| resetType := '0000011'B |
| } |
| |
| template EnableRapidPowerShutDownRequest t_EnableRapidPowerShutDownRequest := { |
| resetType := '0000100'B |
| } |
| |
| template DisableRapidPowerShutDownRequest t_DisableRapidPowerShutDownRequest := { |
| resetType := '0000101'B |
| } |
| |
| template TopLevelMessage_UDS_requests t_ecuResetRequestTypeSID ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template ECUResetRequestType p_resetType) := |
| { |
| ecuResetRequestSID := |
| { |
| sid := '11'O, |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| resetType := p_resetType |
| } |
| } |
| |
| // ECUResetResponse |
| |
| template HardResetResponse t_HardResetResponse := { |
| resetType := '0000001'B |
| } |
| |
| template KeyOffOnResetResponse t_KeyOffOnResetResponse := { |
| resetType := '0000010'B |
| } |
| |
| template SoftResetResponse t_SoftResetResponse := { |
| resetType := '0000011'B |
| } |
| |
| template EnableRapidPowerShutDownResponse t_EnableRapidPowerShutDownResponse (PowerDownTime p_powerDownTime) := { |
| resetType := '0000100'B, |
| powerDownTime := p_powerDownTime |
| } |
| |
| template DisableRapidPowerShutDownResponse t_DisableRapidPowerShutDownResponse := { |
| resetType := '0000101'B |
| } |
| |
| template TopLevelMessage_UDS_responses t_ecuResetResponseTypeSID ( |
| template ECUResetResponseType p_resetType) := |
| { |
| ecuResetResponseSID := |
| { |
| sid := '51'O, |
| reserved := '0'B, |
| resetType := p_resetType |
| } |
| } |
| |
| // SecurityAccessRequest |
| |
| template RequestSeedRequest0 t_requestSeedRequest0 (octetstring p_securityAccessDataRecord):= { |
| securityAccessType := '0000001'B, |
| securityAccessDataRecord := p_securityAccessDataRecord |
| } |
| |
| template SendKeyRequest0 t_sendKeyRequest0 (octetstring p_securityKey):= { |
| securityAccessType := '0000010'B, |
| securityKey := p_securityKey |
| } |
| |
| template RequestSeedRequest1 t_requestSeedRequest1 (octetstring p_securityAccessDataRecord):= { |
| securityAccessType := '0000011'B, |
| securityAccessDataRecord := p_securityAccessDataRecord |
| } |
| |
| template SendKeyRequest1 t_sendKeyRequest1 (octetstring p_securityKey):= { |
| securityAccessType := '0000100'B, |
| securityKey := p_securityKey |
| } |
| |
| template TopLevelMessage_UDS_requests t_securityAccessRequest ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template SecurityAccessRequestType p_securityAccessType) := |
| { |
| securityAccessRequestSID := |
| { |
| sid := '27'O, |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| securityAccessType := p_securityAccessType |
| } |
| } |
| |
| // SecurityAccessResponse |
| |
| template RequestSeedResponse0 t_requestSeedResponse0 (octetstring p_securitySeed) := { |
| securityAccessType := '0000001'B, |
| securitySeed := p_securitySeed |
| } |
| |
| template SendKeyResponse0 t_sendKeyResponse0 := { |
| securityAccessType := '0000010'B |
| } |
| |
| template RequestSeedResponse1 t_requestSeedResponse1 (octetstring p_securitySeed):= { |
| securityAccessType := '0000011'B, |
| securitySeed := p_securitySeed |
| } |
| |
| template SendKeyResponse1 t_sendKeyResponse1 := { |
| securityAccessType := '0000100'B |
| } |
| |
| template TopLevelMessage_UDS_responses t_SecurityAccessResponseSID ( |
| template SecurityAccessResponseType p_securityAccessType) := |
| { |
| securityAccessResponseSID := |
| { |
| sid := '67'O, |
| reserved := '0'B, |
| securityAccessType := p_securityAccessType |
| } |
| } |
| |
| // CommunicationControlRequest |
| template CommunicationType t_communicationType( |
| e_DisableEnable p_disableEnable, |
| e_CommunicationMessages p_communicationMessages) := |
| { |
| disableEnable := p_disableEnable, |
| reserved := '00'B, |
| communicationMessages := p_communicationMessages |
| } |
| |
| |
| template CommunicationControlRequestType t_EnableRxAndTxRequest ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template CommunicationType p_communicationType) := |
| { enableRxAndTxRequest := { |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| controlType := '0000000'B, |
| communicationType := p_communicationType |
| } |
| } |
| |
| template CommunicationControlRequestType t_EnableRxAndDisableTxRequest ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template CommunicationType p_communicationType) := |
| { enableRxAndDisableTxRequest := { |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| controlType := '0000001'B, |
| communicationType := p_communicationType |
| } |
| } |
| |
| template CommunicationControlRequestType t_DisableRxAndEnableTxRequest ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template CommunicationType p_communicationType) := |
| { disableRxAndEnableTxRequest := { |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| controlType := '0000010'B, |
| communicationType := p_communicationType |
| } |
| } |
| |
| template CommunicationControlRequestType t_DisableRxAndTxRequest ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit, |
| template CommunicationType p_communicationType) := |
| { disableRxAndTxRequest := { |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| controlType := '0000011'B, |
| communicationType := p_communicationType |
| } |
| } |
| |
| template TopLevelMessage_UDS_requests t_communicationControlRequest ( |
| template CommunicationControlRequestType p_communicationControlRequestType) := |
| { |
| communicationControlRequestSID := |
| { |
| sid := '28'O, |
| communicationControlRequestType := p_communicationControlRequestType |
| } |
| } |
| |
| // CommunicationControlResponse |
| |
| template TopLevelMessage_UDS_responses t_communicationControlResponse ( |
| template e_ControlType p_controlType) := |
| { |
| communicationControlResponseSID := |
| { |
| sid := '68'O, |
| reserved := '0'B, |
| controlType := p_controlType |
| } |
| } |
| |
| // TesterPresentRequest |
| template TopLevelMessage_UDS_requests t_testerPresentRequest ( |
| SuppressPosRspMsgIndicationBitType p_suppressPosRspMsgIndicationBit) := |
| { |
| testerPresentRequestSID := |
| { |
| sid := '3E'O, |
| suppressPosRspMsgIndicationBit := p_suppressPosRspMsgIndicationBit, |
| zero := '0000000'B |
| } |
| } |
| |
| // ReadDataByIdentifierRequest |
| |
| template ReadDataByIdentifierRequest1 t_ReadDataByIdentifierRequest1 := |
| { |
| identifier := '8000'O |
| } |
| |
| template ReadDataByIdentifierRequest2 t_ReadDataByIdentifierRequest2 := |
| { |
| identifier := '8001'O |
| } |
| |
| template ReadDataByIdentifierRequest3 t_ReadDataByIdentifierRequest3 := |
| { |
| identifier := '8002'O |
| } |
| |
| template TopLevelMessage_UDS_requests t_ReadDataByIdentifierRequestSID ( |
| template ReadDataByIdentifierRequest p_readDataByIdentifierRequest):= |
| { |
| readDataByIdentifierRequestSID := { |
| sid := '22'O, |
| readDataByIdentifierRequest := p_readDataByIdentifierRequest |
| } |
| } |
| |
| // ReadDataByIdentifierResponse |
| |
| template ReadDataByIdentifierResponse1 t_ReadDataByIdentifierResponse1(octetstring p_readDataByIdentifierResponse) := { |
| identifier := '8000'O, |
| readDataByIdentifierResponse := p_readDataByIdentifierResponse |
| } |
| |
| template ReadDataByIdentifierResponse2 t_ReadDataByIdentifierResponse2(octetstring p_readDataByIdentifierResponse) := { |
| identifier := '8001'O, |
| readDataByIdentifierResponse := p_readDataByIdentifierResponse |
| } |
| |
| template ReadDataByIdentifierResponse3 t_ReadDataByIdentifierResponse3(octetstring p_readDataByIdentifierResponse) := { |
| identifier := '8002'O, |
| readDataByIdentifierResponse := p_readDataByIdentifierResponse |
| } |
| |
| template TopLevelMessage_UDS_responses t_ReadDataByIdentifierResponseSID(template ReadDataByIdentifierResponse p_readDataByIdentifierResponse) :={ |
| readDataByIdentifierResponseSID := { |
| sid :='62'O, |
| readDataByIdentifierResponse := p_readDataByIdentifierResponse |
| } |
| } |
| |
| |
| // WriteDataByIdentifierRequest |
| |
| template WriteDataByIdentifierRequest1 t_WriteDataByIdentifierRequest1(octetstring p_dataRecord) := { |
| identifier := '8000'O, |
| dataRecord := p_dataRecord |
| } |
| |
| template WriteDataByIdentifierRequest2 t_WriteDataByIdentifierRequest2(octetstring p_dataRecord) := { |
| identifier := '8001'O, |
| dataRecord := p_dataRecord |
| } |
| |
| template WriteDataByIdentifierRequest3 t_WriteDataByIdentifierRequest3(octetstring p_dataRecord) := { |
| identifier := '8002'O, |
| dataRecord := p_dataRecord |
| } |
| |
| template TopLevelMessage_UDS_requests t_WriteDataByIdentifierRequestSID |
| (template WriteDataByIdentifierRequest p_writeDataByIdentifierRequest) := |
| { writeDataByIdentifierRequestSID := { |
| sid := '2E'O, |
| writeDataByIdentifierRequest := p_writeDataByIdentifierRequest |
| } |
| } |
| |
| // WriteDataByIdentifierResponse |
| |
| template WriteDataByIdentifierResponse1 t_WriteDataByIdentifierResponse1 := |
| { |
| identifier := '8000'O |
| } |
| |
| template WriteDataByIdentifierResponse2 t_WriteDataByIdentifierResponse2 := |
| { |
| identifier := '8001'O |
| } |
| |
| template WriteDataByIdentifierResponse3 t_WriteDataByIdentifierResponse3 := |
| { |
| identifier := '8002'O |
| } |
| |
| template TopLevelMessage_UDS_responses t_WriteDataByIdentifierResponseSID |
| (template WriteDataByIdentifierResponse p_writeDataByIdentifierResponse) := |
| { writeDataByIdentifierResponseSID :={ |
| sid := '6E'O, |
| writeDataByIdentifierResponse := p_writeDataByIdentifierResponse |
| } |
| } |
| // NegativeResponseCode |
| |
| template TopLevelMessage_UDS_responses t_NegativeResponseCodeSID |
| (e_RequestSID p_requestSID, e_ResponseCode p_responseCode) := |
| { negativeResponseCodeSID :={ |
| sid := '7f'O, |
| requestSID := p_requestSID, |
| responseCode := p_responseCode |
| } |
| } |
| |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |