1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
20 * General requirements
\r
22 /** @req DCM075 */ /** @req DCM076 */
\r
25 #include "ComStack_Types.h"
\r
26 #include "Dcm_Types.h"
\r
28 // TODO: Where to place these definitions?
\r
29 typedef uint8 Dcm_ProtocolTransTypeType;
\r
30 #define DCM_PROTOCOL_TRANS_TYPE_1 1
\r
31 #define DCM_PROTOCOL_TRANS_TYPE_2 2
\r
33 typedef uint8 Dcm_ProtocolAddrTypeType;
\r
34 #define DCM_PROTOCOL_FUNCTIONAL_ADDR_TYPE 1
\r
35 #define DCM_PROTOCOL_PHYSICAL_ADDR_TYPE 2
\r
37 #define DCM_PROTOCAL_TP_MAX_LENGTH 0x1000
\r
40 * Callback function prototypes
\r
44 typedef Std_ReturnType (*Dcm_CallbackGetSesChgPermissionFncType)(Dcm_SesCtrlType sesCtrlTypeActive, Dcm_SesCtrlType sesCtrlTypeNew);
\r
45 typedef Std_ReturnType (*Dcm_CallbackChangeIndicationFncType)(Dcm_SesCtrlType sesCtrlTypeOld, Dcm_SesCtrlType sesCtrlTypeNew);
\r
46 typedef Std_ReturnType (*Dcm_CallbackConfirmationRespPendFncType)(Dcm_ConfirmationStatusType status);
\r
48 // SecurityAccess_<LEVEL>
\r
49 typedef Std_ReturnType (*Dcm_CallbackGetSeedFncType)(uint8 *securityAccessDataRecord, uint8 *seed, Dcm_NegativeResponseCodeType *errorCode);
\r
50 typedef Std_ReturnType (*Dcm_CallbackCompareKeyFncType)(uint8 *key);
\r
52 // PidServices_<PID>
\r
53 typedef Std_ReturnType (*Dcm_CallbackGetPIDValueFncType)(uint8 *dataValueBuffer);
\r
55 // DidServices_<DID>
\r
56 typedef Std_ReturnType (*Dcm_CallbackReadDataFncType)(uint8 *data);
\r
57 typedef Std_ReturnType (*Dcm_CallbackWriteDataFncType)(uint8 *data, uint16 dataLength, Dcm_NegativeResponseCodeType *errorCode);
\r
58 typedef Std_ReturnType (*Dcm_CallbackReadDataLengthFncType)(uint16 *didLength);
\r
59 typedef Std_ReturnType (*Dcm_CallbackConditionCheckReadFncType)(Dcm_NegativeResponseCodeType *errorCode);
\r
60 typedef Std_ReturnType (*Dcm_CallbackConditionCheckWriteFncType)(Dcm_NegativeResponseCodeType *errorCode);
\r
61 typedef Std_ReturnType (*Dcm_CallbackReturnControlToECUFncType)(uint8 *controlOptionRecord, uint8 *controlEnableMaskRecord, uint8 *controlStatusRecord, Dcm_NegativeResponseCodeType *errorCode);
\r
62 typedef Std_ReturnType (*Dcm_CallbackResetToDefaultFncType)(uint8 *controlOptionRecord, uint8 *controlEnableMaskRecord, uint8 *controlStatusRecord, Dcm_NegativeResponseCodeType *errorCode);
\r
63 typedef Std_ReturnType (*Dcm_CallbackFreezeCurrentStateFncType)(uint8 *controlOptionRecord, uint8 *controlEnableMaskRecord, uint8 *controlStatusRecord, Dcm_NegativeResponseCodeType *errorCode);
\r
64 typedef Std_ReturnType (*Dcm_CallbackShortTermAdjustmentFncType)(uint8 *controlOptionRecord, uint8 *controlEnableMaskRecord, uint8 *controlStatusRecord, Dcm_NegativeResponseCodeType *errorCode);
\r
65 typedef Std_ReturnType (*Dcm_CallbackGetScalingInformationFncType)(uint8 *scalingInfo, Dcm_NegativeResponseCodeType *errorCode);
\r
67 // InfoTypeServices_<INFOTYPENUMBER>
\r
68 typedef Std_ReturnType (*Dcm_CallbackGetInfoTypeValueFncType)(uint8 *dataValueBuffer);
\r
71 typedef Std_ReturnType (*Dcm_CallbackGgetDTRValueFncType)(uint16 *testval, uint16 *minlimit, uint16 *maxlimit, uint8 *status);
\r
73 // RoutineServices_<ROUTINENAME>
\r
74 typedef Std_ReturnType (*Dcm_CallbackStartRoutineFncType)(uint8 *inBuffer, uint8 *outBuffer, Dcm_NegativeResponseCodeType *errorCode);
\r
75 typedef Std_ReturnType (*Dcm_CallbackStopRoutineFncType)(uint8 *inBuffer, uint8 *outBuffer, Dcm_NegativeResponseCodeType *errorCode);
\r
76 typedef Std_ReturnType (*Dcm_CallbackRequestResultRoutineFncType)(uint8 *outBuffer, Dcm_NegativeResponseCodeType *errorCode);
\r
78 // RequestControlServices_<TID>
\r
79 typedef Std_ReturnType (*Dcm_CallbackRequestControlType)(uint8 *outBuffer, uint8 *inBuffer);
\r
81 // CallBackDCMRequestServices
\r
82 typedef Std_ReturnType (*Dcm_CallbackStartProtocolFncType)(Dcm_ProtocolType protocolID);
\r
83 typedef Std_ReturnType (*Dcm_CallbackStopProtocolFncType)(Dcm_ProtocolType protocolID);
\r
85 // ServiceRequestIndication
\r
86 typedef Std_ReturnType (*Dcm_CallbackIndicationFncType)(uint8 *requestData, uint16 dataSize);
\r
89 typedef Std_ReturnType (*Dcm_CallbackEcuResetType)(uint8 resetType, Dcm_NegativeResponseCodeType *errorCode);
\r
93 * DCM configurations
\r
102 Dcm_SesCtrlType DspSessionLevel; // (1)
\r
103 uint16 DspSessionP2ServerMax; // (1)
\r
104 uint16 DspSessionP2StarServerMax; // (1)
\r
106 } Dcm_DspSessionRowType; /** @req DCM072 */
\r
110 Dcm_SecLevelType DspSecurityLevel; // (1)
\r
111 uint16 DspSecurityDelayTimeOnBoot; // (1)
\r
112 uint8 DspSecurityNumAttDelay; // (1)
\r
113 uint16 DspSecurityDelayTime; // (1)
\r
114 uint8 DspSecurityNumAttLock; // (1)
\r
115 uint8 DspSecurityADRSize; // (0..1)
\r
116 uint8 DspSecuritySeedSize; // (1)
\r
117 uint8 DspSecurityKeySize; // (1)
\r
118 Dcm_CallbackGetSeedFncType GetSeed;
\r
119 Dcm_CallbackCompareKeyFncType CompareKey;
\r
121 } Dcm_DspSecurityRowType; /** @req DCM073 */
\r
125 uint8 DspDidControlRecordSize; // (1)
\r
126 uint8 DspDidControlOptionRecordSize; // (1)
\r
127 uint8 DspDidControlStatusRecordSize; // (1)
\r
128 } Dcm_DspDidControlRecordSizesType;
\r
132 const Dcm_DspSessionRowType **DspDidControlSessionRef; // (1..*) /** @req DCM621 */
\r
133 const Dcm_DspSecurityRowType **DspDidControlSecurityLevelRef; // (1..*) /** @req DCM620 */
\r
134 const Dcm_DspDidControlRecordSizesType *DspDidFreezeCurrentState; // (0..1) /** @req DCM624 */
\r
135 const Dcm_DspDidControlRecordSizesType *DspDidResetToDefault; // (0..1) /** @req DCM623 */
\r
136 const Dcm_DspDidControlRecordSizesType *DspDidReturnControlToEcu; // (0..1) /** @req DCM622 */
\r
137 const Dcm_DspDidControlRecordSizesType *DspDidShortTermAdjustment; // (0..1) /** @req DCM625 */
\r
138 } Dcm_DspDidControlType; /** @req DCM619 */
\r
142 const Dcm_DspSessionRowType **DspDidReadSessionRef; // (1..*) /** @req DCM615 */
\r
143 const Dcm_DspSecurityRowType **DspDidReadSecurityLevelRef; // (1..*) /** @req DCM614 */
\r
144 } Dcm_DspDidReadType; /** @req DCM613 */
\r
148 const Dcm_DspSessionRowType **DspDidWriteSessionRef; // (1..*) /** @req DCM618 */
\r
149 const Dcm_DspSecurityRowType **DspDidWriteSecurityLevelRef; // (1..*) /** @req DCM617 */
\r
150 } Dcm_DspDidWriteType; /** @req DCM616 */
\r
155 const Dcm_DspDidReadType *DspDidRead; // (0..1)
\r
156 const Dcm_DspDidWriteType *DspDidWrite; // (0..1)
\r
157 const Dcm_DspDidControlType *DspDidControl; // (0..1)
\r
158 } Dcm_DspDidAccessType; /** @req DCM609 */
\r
162 boolean DspDidDynamicllyDefined; // (1) /** @req DCM612 */
\r
163 boolean DspDidFixedLength; // (1) /** @req DCM608 */
\r
164 uint8 DspDidScalingInfoSize; // (0..1) /** @req DCM611 */
\r
166 Dcm_DspDidAccessType DspDidAccess; // (1)
\r
167 } Dcm_DspDidInfoType; /** @req DCM607 */
\r
170 typedef struct Dcm_DspDidType {
\r
171 boolean DspDidUsePort; // (1)
\r
172 uint16 DspDidIdentifier; // (1) /** @req DCM602 */
\r
173 const Dcm_DspDidInfoType *DspDidInfoRef; // (1) /** @req DCM604 */
\r
174 const struct Dcm_DspDidType **DspDidRef; // (0..*) /** @req DCM606 */
\r
175 uint16 DspDidSize; // (1) /** @req DCM605 */
\r
176 Dcm_CallbackReadDataLengthFncType DspDidReadDataLengthFnc; // (0..1) /** @req DCM671 */
\r
177 Dcm_CallbackConditionCheckReadFncType DspDidConditionCheckReadFnc; // (0..1) /** @req DCM677 */
\r
178 Dcm_CallbackReadDataFncType DspDidReadDataFnc; // (0..1) /** @req DCM669 */
\r
179 Dcm_CallbackConditionCheckWriteFncType DspDidConditionCheckWriteFnc; // (0..1) /** @req DCM678 */
\r
180 Dcm_CallbackWriteDataFncType DspDidWriteDataFnc; // (0..1) /** @req DCM670 */
\r
181 Dcm_CallbackGetScalingInformationFncType DspDidGetScalingInfoFnc; // (0..1) /** @req DCM676 */
\r
182 Dcm_CallbackFreezeCurrentStateFncType DspDidFreezeCurrentStateFnc; // (0..1) /** @req DCM674 */
\r
183 Dcm_CallbackResetToDefaultFncType DspDidResetToDeaultFnc; // (0..1) /** @req DCM673 */
\r
184 Dcm_CallbackReturnControlToECUFncType DspDidReturnControlToEcuFnc; // (0..1) /** @req DCM672 */
\r
185 Dcm_CallbackShortTermAdjustmentFncType DspDidShortTermAdjustmentFnc; // (0..1) /** @req DCM675 */
\r
187 const Dcm_DspDidControlRecordSizesType *DspDidControlRecordSize; // (0..*)
\r
189 } Dcm_DspDidType; /** @req DCM601 */
\r
193 const Dcm_DspSessionRowType **DspEcuResetSessionRef; // (1..*)
\r
194 const Dcm_DspSecurityRowType **DspEcuResetSecurityLevelRef; // (1..*)
\r
195 } Dcm_DspEcuResetType; /** @req DCM657 */
\r
199 boolean DspPidUsePort; // (1)
\r
200 uint8 DspPidIdentifier; // (1) /** @req DCM627 */
\r
201 uint8 DspPidSize; // (1) /** @req DCM628 */
\r
202 Dcm_CallbackGetPIDValueFncType DspGetPidValFnc; // (1) /** @req DCM629 */
\r
203 } Dcm_DspPidType; /** @req DCM626 */
\r
207 boolean DspDTCInfoSubFuncSupp; // (1)
\r
208 uint8 DspDTCInfoSubFuncLevel; // (1)
\r
209 const Dcm_DspSecurityRowType **DspDTCInfoSecLevelRef; // (1..*)
\r
210 } Dcm_DspReadDTCRowType; /** @req DCM073 */
\r
215 Dcm_DspReadDTCRowType *DspReadDTCRow; // (0..*)
\r
216 } Dcm_DspReadDTCType; /** @req DCM074 */
\r
220 uint8 DspRequestControl; // (1)
\r
221 uint8 DspRequestControlOutBufferSize; // (1)
\r
222 uint8 DspRequestControlTestId; // (1) /** @req DCM656 */
\r
223 } Dcm_DspRequestControlType; /** @req DCM637 */
\r
227 const Dcm_DspSessionRowType **DspRoutineSessionRef; // (1..*) /** @req DCM649 */
\r
228 const Dcm_DspSecurityRowType **DspRoutineSecurityLevelRef; // (1..*) /** @req DCM648 */
\r
229 } Dcm_DspRoutineAuthorizationType; /** @req DCM644 */
\r
233 uint8 DspReqResRtnCtrlOptRecSize; // (1) /** @req DCM652 */
\r
234 } Dcm_DspRoutineRequestResType; /** @req DCM646 */
\r
238 uint8 DspStopRoutineCtrlOptRecSize; // (1) /** @req DCM650 */
\r
239 uint8 DspStopRoutineStsOptRecSize; // (1) /** @req DCM651 */
\r
240 } Dcm_DspRoutineStopType; /** @req DCM645 */
\r
244 uint8 DspStartRoutineCtrlOptRecSize; // (1) /** @req DCM654 */
\r
245 uint8 DspStartRoutineStsOptRecSize; // (1) /** @req DCM655 */
\r
246 } Dcm_DspStartRoutineType; /** @req DCM647 */
\r
251 const Dcm_DspRoutineAuthorizationType DspRoutineAuthorization; // (1)
\r
252 const Dcm_DspStartRoutineType *DspStartRoutine; // (1)
\r
253 const Dcm_DspRoutineStopType *DspRoutineStop; // (0..1)
\r
254 const Dcm_DspRoutineRequestResType *DspRoutineRequestRes; // (0..1)
\r
255 } Dcm_DspRoutineInfoType; /** @req DCM643 */
\r
259 boolean DspRoutineUsePort; // (1)
\r
260 uint16 DspRoutineIdentifier; // (1) /** @req DCM641 */
\r
261 const Dcm_DspRoutineInfoType *DspRoutineInfoRef; // (1) /** @req DCM642 */
\r
262 Dcm_CallbackStartRoutineFncType DspStartRoutineFnc; // (0..1) /** @req DCM664 */
\r
263 Dcm_CallbackStopRoutineFncType DspStopRoutineFnc; // (0..1) /** @req DCM665 */
\r
264 Dcm_CallbackRequestResultRoutineFncType DspRequestResultRoutineFnc; // (0..1) /** @req DCM665 */
\r
266 } Dcm_DspRoutineType; /** @req DCM640 */
\r
271 const Dcm_DspSecurityRowType *DspSecurityRow; // (0..31)
\r
272 } Dcm_DspSecurityType; /** @req DCM073 */
\r
277 const Dcm_DspSessionRowType *DspSessionRow; // (0..31)
\r
278 } Dcm_DspSessionType; /** @req DCM072 */
\r
282 uint8 DspTestResultTestId; // (1) /** @req DCM635 */
\r
283 uint8 DspTestResultUaSid; // (1) /** @req DCM686 */
\r
284 } Dcm_DspTestResultTidType; /** @req DCM634 */
\r
288 uint8 DspTestResultObdmid; // (1) /** @req DCM684 */
\r
289 const Dcm_DspTestResultTidType **DspTestResultObdmidTidRef; // (1..*) /** @req DCM685 */
\r
290 } Dcm_DspTestResultObdmidTidType; /** @req DCM683 */
\r
295 const Dcm_DspTestResultObdmidTidType *DspTestResultObdmidTid; // (0..*)
\r
296 const Dcm_DspTestResultTidType *DspTestResultTid; // (0..*)
\r
297 } Dcm_DspTestResultByObdmidType; /** @req DCM682 */
\r
301 boolean DspVehInfoUsePort; // (1)
\r
302 uint8 DspVehInfoType; // (1) /** @req DCM631 */
\r
303 uint8 DspVehInfoSize; // (1) /** @req DCM632 */
\r
304 Dcm_CallbackGetInfoTypeValueFncType DspGetVehInfoTypeFnc; // (1) /** @req DCM633 */
\r
305 } Dcm_DspVehInfoType; /** @req DCM630 */
\r
309 uint32 MemoryAddressHigh;
\r
310 uint32 MemoryAddressLow;
\r
311 /*DcmDspMemoryRangeRuleRef * pRule;*/
\r
312 const Dcm_DspSecurityRowType **pSecurityLevel;
\r
313 } Dcm_DspMemoryRangeInfo;
\r
316 uint8 MemoryIdValue;
\r
317 const Dcm_DspMemoryRangeInfo *pReadMemoryInfo;
\r
318 const Dcm_DspMemoryRangeInfo *pWriteMemoryInfo;
\r
320 } Dcm_DspMemoryIdInfo;
\r
324 boolean DcmDspUseMemoryId;
\r
325 const Dcm_DspMemoryIdInfo *DspMemoryIdInfo;
\r
327 }Dcm_DspMemoryType;
\r
331 uint8 DspMaxDidToRead; // (0..1) /** @req DCM638 */
\r
333 const Dcm_DspDidType *DspDid; // (0..*)
\r
334 const Dcm_DspDidInfoType *DspDidInfo; // (0..*)
\r
335 const Dcm_DspEcuResetType *DspEcuReset; // (0..*)
\r
336 const Dcm_DspPidType *DspPid; // (0..*)
\r
337 const Dcm_DspReadDTCType *DspReadDTC; // (1)
\r
338 const Dcm_DspRequestControlType *DspRequestControl; // (0..*)
\r
339 const Dcm_DspRoutineType *DspRoutine; // (0..*)
\r
340 const Dcm_DspRoutineInfoType *DspRoutineInfo; // (0..*)
\r
341 const Dcm_DspSecurityType *DspSecurity; // (0..*)
\r
342 const Dcm_DspSessionType *DspSession; // (1)
\r
343 const Dcm_DspTestResultByObdmidType *DspTestResultByObdmid; // (0..*)
\r
344 const Dcm_DspVehInfoType *DspVehInfo;
\r
345 const Dcm_DspMemoryType *DspMemory;
\r
351 // 10.2.4 DcmDsdService
\r
353 uint8 DsdSidTabServiceId; // (1)
\r
354 boolean DsdSidTabSubfuncAvail; // (1)
\r
355 const Dcm_DspSecurityRowType **DsdSidTabSecurityLevelRef; // (1..*)
\r
356 const Dcm_DspSessionRowType **DsdSidTabSessionLevelRef; // (1..*)
\r
359 } Dcm_DsdServiceType;
\r
361 // 10.2.3 DcmDsdServiceTable
\r
363 uint8 DsdSidTabId; // (1)
\r
365 const Dcm_DsdServiceType *DsdService; // (1..*)
\r
367 } Dcm_DsdServiceTableType; /** @req DCM071 */
\r
372 const Dcm_DsdServiceTableType *DsdServiceTable; // (1..256)
\r
383 }Dcm_DslBufferStatusType;
\r
388 NOT_IN_USE, // The buffer is not used (it is available).
\r
390 PROVIDED_TO_PDUR, // The buffer is currently in use by PDUR.
\r
391 DSD_PENDING_RESPONSE_SIGNALED, // Signals have been received saying the buffer contain valid data.
\r
392 DCM_TRANSMIT_SIGNALED, // The DCM has been asked to transfer the response, system is now waiting for TP layer to reqest Tx buffer.
\r
393 PROVIDED_TO_DSD, // The buffer is currently in use by DSD.
\r
395 }Dcm_DslBufferUserType;
\r
398 Dcm_DslBufferStatusType status; // Flag for buffer in use.
\r
399 } Dcm_DslBufferRuntimeType;
\r
403 uint8 DslBufferID; // (1) // Kept for reference, will be removed (polite calls will be made).
\r
404 uint16 DslBufferSize; // (1)
\r
405 PduInfoType pduInfo;
\r
406 Dcm_DslBufferRuntimeType *externalBufferRuntimeData;
\r
407 } Dcm_DslBufferType; /** @req DCM032 */
\r
411 Dcm_CallbackStartProtocolFncType StartProtocol;
\r
412 Dcm_CallbackStopProtocolFncType StopProtocol;
\r
414 } Dcm_DslCallbackDCMRequestServiceType; /** @req DCM679 */
\r
418 boolean DslDiagRespForceRespPendEn; // (1)
\r
419 uint8 DslDiagRespMaxNumRespPend; // (1)
\r
420 } Dcm_DslDiagRespType;
\r
424 uint16 TimStrP2ServerMax; // (1)
\r
425 uint16 TimStrP2ServerMin; // (1)
\r
426 uint16 TimStrP2StarServerMax; // (1)
\r
427 uint16 TimStrP2StarServerMin; // (1)
\r
428 uint16 TimStrS3Server; // (1)
\r
429 const boolean Arc_EOL;
\r
430 } Dcm_DslProtocolTimingRowType;
\r
434 const Dcm_DslProtocolTimingRowType *DslProtocolTimingRow; // (0..*)
\r
435 } Dcm_DslProtocolTimingType; /** @req DCM031 */
\r
439 // TODO: Add this? (only needed for type2 periodic transmission configuration)
\r
440 } Dcm_DslPeriodicTransmissionType;
\r
444 // TODO: Add this? (only needed for type2 periodic transmission configuration)
\r
445 } Dcm_DslResponseOnEventType;
\r
447 /* Makes it possible to cross-reference structures. */
\r
448 typedef struct Dcm_DslMainConnectionType_t Dcm_DslMainConnectionType;
\r
449 typedef struct Dcm_DslProtocolRxType_t Dcm_DslProtocolRxType;
\r
452 struct Dcm_DslProtocolRxType_t {
\r
453 const Dcm_DslMainConnectionType *DslMainConnectionParent; // (1) /* Cross reference. */
\r
454 const Dcm_ProtocolAddrTypeType DslProtocolAddrType; // (1)
\r
455 const PduIdType DcmDslProtocolRxPduId; // (1)
\r
456 const uint32 DcmDslProtocolRxTesterSourceAddr_v4; // (1)
\r
457 const uint8 DcmDslProtocolRxChannelId_v4; // (1)
\r
458 const boolean Arc_EOL;
\r
461 /* Makes it possible to cross-reference structures. */
\r
462 //typedef struct Dcm_DslMainConnectionType_t Dcm_DslMainConnectionType;
\r
463 typedef struct Dcm_DslProtocolTxType_t Dcm_DslProtocolTxType;
\r
466 struct Dcm_DslProtocolTxType_t {
\r
467 const Dcm_DslMainConnectionType *DslMainConnectionParent; // (1) /* Cross reference. */
\r
468 const PduIdType DcmDslProtocolTxPduId; // (1) /* Will be removed (polite), kept for reference. */
\r
469 const boolean Arc_EOL;
\r
479 const uint32 PduR_DcmDslTxPduId; // Polite PDUID ("list index") to be used when writing to PduR.
\r
480 // TODO: Add ref to PDU.
\r
481 const boolean Arc_EOL;
\r
482 } Dcm_DslProtocolTxType;
\r
486 /* Make it possible to cross reference. */
\r
487 typedef struct Dcm_DslConnectionType_t Dcm_DslConnectionType;
\r
490 struct Dcm_DslMainConnectionType_t { // Cross referenced from Dcm_DslProtocolRxType_t.
\r
491 const Dcm_DslConnectionType *DslConnectionParent; // Cross reference.
\r
492 const Dcm_DslPeriodicTransmissionType *DslPeriodicTransmissionConRef; // (0..1)
\r
493 const Dcm_DslResponseOnEventType *DslROEConnectionRef; // (0..*)
\r
495 const Dcm_DslProtocolRxType *DslProtocolRx; // (1..*) Remove?
\r
496 const Dcm_DslProtocolTxType *DslProtocolTx; // (1)
\r
499 /* Make it possible to cross reference. */
\r
500 typedef struct Dcm_DslProtocolRowType_t Dcm_DslProtocolRowType;
\r
503 struct Dcm_DslConnectionType_t {
\r
505 const Dcm_DslProtocolRowType *DslProtocolRow; // Cross reference.
\r
506 const Dcm_DslMainConnectionType *DslMainConnection; // (1)
\r
507 const Dcm_DslPeriodicTransmissionType *DslPeriodicTransmission; // (0..1)
\r
508 const Dcm_DslResponseOnEventType *DslResponseOnEvent; // (0..1)
\r
513 DCM_IDLE = 0, /* Not in use. */
\r
514 DCM_WAITING_DIAGNOSTIC_RESPONSE, /* A diagnostic request has been forwarded to the DSD, and DSL is waiting for response. */
\r
515 DCM_DIAGNOSTIC_RESPONSE_PENDING, /* A diagnostic response has been deployed to the external buffer and is waiting to be transmitted. */
\r
516 DCM_TRANSMITTING_EXTERNAL_BUFFER_DATA_TO_PDUR, /* We are in the process of transmitting a diagnostic response most likely that reside in the external buffer, from DSD to PDUR. */
\r
517 DCM_TRANSMITTING_LOCAL_BUFFER_DATA_TO_PDUR /* */
\r
518 } Dcm_DslProtocolStateType;
\r
521 DCM_DSL_PDUR_DCM_IDLE = 0,
\r
523 DCM_DSL_PDUR_TRANSMIT_INDICATED = 1,
\r
524 DCM_DSL_PDUR_TRANSMIT_TX_BUFFER_PROVIDED = 2,
\r
526 DCM_DSL_RECEPTION_INDICATED = 3,
\r
527 DCM_DSL_RX_BUFFER_PROVIDED = 4
\r
528 } Dcm_DslPdurCommuncationState;
\r
531 // This buffer is used for implement 7.2.4.3 (Concurrent "tester present").
\r
533 #define DCM_DSL_LOCAL_BUFFER_LENGTH 8
\r
536 Dcm_DslBufferUserType status;
\r
537 uint8 buffer[DCM_DSL_LOCAL_BUFFER_LENGTH];
\r
538 PduLengthType messageLenght;
\r
539 PduInfoType PduInfo;
\r
540 } Dcm_DslLocalBufferType;
\r
544 PduIdType diagReqestRxPduId; // Tester request PduId.
\r
545 uint32 stateTimeoutCount; // Counter for timeout.
\r
546 Dcm_DslBufferUserType externalRxBufferStatus;
\r
547 PduInfoType diagnosticRequestFromTester;
\r
548 PduInfoType diagnosticResponseFromDsd;
\r
549 Dcm_DslBufferUserType externalTxBufferStatus;
\r
550 boolean protocolStarted; // Has the protocol been started?
\r
551 Dcm_DslLocalBufferType localRxBuffer;
\r
552 Dcm_DslLocalBufferType localTxBuffer;
\r
553 boolean diagnosticActiveComM; //
\r
554 uint16 S3ServerTimeoutCount;
\r
555 uint8 responsePendingCount;
\r
556 Dcm_SecLevelType securityLevel;
\r
557 Dcm_SesCtrlType sessionControl;
\r
558 Dcm_DslLocalBufferType PeriodicTxBuffer;
\r
559 } Dcm_DslRunTimeProtocolParametersType;
\r
562 struct Dcm_DslProtocolRowType_t { // Cross referenced from Dcm_DslConnectionType_t.
\r
563 Dcm_ProtocolType DslProtocolID; // (1)
\r
564 boolean DslProtocolIsParallelExecutab; // (1)
\r
565 uint16 DslProtocolPreemptTimeout; // (1)
\r
566 uint8 DslProtocolPriority; // (1)
\r
567 Dcm_ProtocolTransTypeType DslProtocolTransType; // (1)
\r
568 const Dcm_DslBufferType *DslProtocolRxBufferID; // (1)
\r
569 const Dcm_DslBufferType *DslProtocolTxBufferID; // (1)
\r
570 const Dcm_DsdServiceTableType *DslProtocolSIDTable; // (1)
\r
571 const Dcm_DslProtocolTimingRowType *DslProtocolTimeLimit; // (0..1)
\r
573 const Dcm_DslConnectionType *DslConnection; // (1..*)
\r
574 // Reference to runtime parameters to this protocol.
\r
575 Dcm_DslRunTimeProtocolParametersType *DslRunTimeProtocolParameters; // Maybe this needs to change to index.
\r
582 const Dcm_DslProtocolRxType *DslProtocolRxGlobalList; // (1..*) A polite list for all RX protocol configurations.
\r
583 const Dcm_DslProtocolTxType *DslProtocolTxGlobalList; // (1..*) A polite list for all TX protocol configurations.
\r
584 const Dcm_DslProtocolRowType *DslProtocolRowList; // (1..*)
\r
585 } Dcm_DslProtocolType;
\r
589 Dcm_CallbackIndicationFncType Indication;
\r
591 } Dcm_DslServiceRequestIndicationType; /** @req DCM681 */
\r
595 Dcm_CallbackGetSesChgPermissionFncType GetSesChgPermission;
\r
596 Dcm_CallbackChangeIndicationFncType ChangeIndication;
\r
597 Dcm_CallbackConfirmationRespPendFncType ConfirmationRespPend;
\r
599 } Dcm_DslSessionControlType; /** @req DCM680 */
\r
604 const Dcm_DslBufferType *DslBuffer; // (1..256)
\r
605 const Dcm_DslCallbackDCMRequestServiceType *DslCallbackDCMRequestService; // (1..*)
\r
606 const Dcm_DslDiagRespType *DslDiagResp; // (1)
\r
607 const Dcm_DslProtocolType *DslProtocol; // (1)
\r
608 const Dcm_DslProtocolTimingType *DslProtocolTiming; // (1)
\r
609 const Dcm_DslServiceRequestIndicationType *DslServiceRequestIndication; // (0..*)
\r
610 const Dcm_DslSessionControlType *DslSessionControl; // (1..*)
\r
616 const Dcm_DspType *Dsp; // (1)
\r
617 const Dcm_DsdType *Dsd; // (1)
\r
618 const Dcm_DslType *Dsl; // (1)
\r
622 * Make the DCM_Config visible for others.
\r
626 extern const Dcm_ConfigType DCM_Config;
\r
629 #endif /*DCM_LCFG_H_*/
\r