PduLengthType bytesCopiedToPdurRxBuffer = 0;\r
BufReq_ReturnType ret = BUFREQ_NOT_OK;\r
\r
- if (rxConfig->CanTpAddressingFormant == CANTP_EXTENDED) {\r
- extendedAddress = rxPduData->SduDataPtr[indexCount++];\r
- // TODO: Should we validate the extended address ?\r
- }\r
- segmentNumber = rxPduData->SduDataPtr[indexCount++] & SEGMENT_NUMBER_MASK;\r
- if (segmentNumber != (rxRuntime->iso15765.framesHandledCount\r
- & SEGMENT_NUMBER_MASK)) {\r
- DEBUG(DEBUG_MEDIUM,"Segmentation number error detected - is the sending"\r
- "unit too fast? Increase STmin (cofig) to slow it down!\n");\r
- PduR_CanTpRxIndication(rxConfig->PduR_PduId, NTFRSLT_E_WRONG_SN); /** @req CANTP084 */\r
- rxRuntime->iso15765.state = IDLE;\r
- rxRuntime->mode = CANTP_RX_WAIT;\r
- } else {\r
- currentSegmentMaxSize = CANIF_PDU_MAX_LENGTH - indexCount;\r
- bytesLeftToCopy = rxRuntime->transferTotal\r
- - rxRuntime->transferCount;\r
- if (bytesLeftToCopy < currentSegmentMaxSize) {\r
- currentSegmentSize = bytesLeftToCopy; // 1-5.\r
- } else {\r
- currentSegmentSize = currentSegmentMaxSize; // 6 or 7, depends on addressing format used.\r
+\r
+ if (rxRuntime->iso15765.state == RX_WAIT_CONSECUTIVE_FRAME) {\r
+ if (rxConfig->CanTpAddressingFormant == CANTP_EXTENDED) {\r
+ extendedAddress = rxPduData->SduDataPtr[indexCount++];\r
}\r
- // Copy received data to buffer provided by SDUR.\r
- ret = copySegmentToPduRRxBuffer(rxConfig, rxRuntime,\r
- &rxPduData->SduDataPtr[indexCount],\r
- currentSegmentSize,\r
- &bytesCopiedToPdurRxBuffer);\r
- if (ret == BUFREQ_NOT_OK) {\r
- PduR_CanTpRxIndication(rxConfig->PduR_PduId, NTFRSLT_E_NO_BUFFER); /** @req CANTP084 */\r
+ segmentNumber = rxPduData->SduDataPtr[indexCount++] & SEGMENT_NUMBER_MASK;\r
+ if (segmentNumber != (rxRuntime->iso15765.framesHandledCount\r
+ & SEGMENT_NUMBER_MASK)) {\r
+ DEBUG(DEBUG_MEDIUM,"Segmentation number error detected - is the sending"\r
+ "unit too fast? Increase STmin (cofig) to slow it down!\n");\r
+ PduR_CanTpRxIndication(rxConfig->PduR_PduId, NTFRSLT_E_WRONG_SN); /** @req CANTP084 */\r
rxRuntime->iso15765.state = IDLE;\r
rxRuntime->mode = CANTP_RX_WAIT;\r
- } else if (ret == BUFREQ_BUSY) {\r
- boolean dataCopyFailure = FALSE;\r
- PduLengthType bytesNotCopiedToPdurRxBuffer =\r
- currentSegmentSize - bytesCopiedToPdurRxBuffer;\r
- if (rxConfig->CanTpAddressingFormant == CANTP_STANDARD) {\r
- if ( copySegmentToLocalRxBuffer(rxRuntime, /** @req CANTP067 */\r
- &rxPduData->SduDataPtr[1 + bytesCopiedToPdurRxBuffer],\r
- bytesNotCopiedToPdurRxBuffer ) != TRUE ) {\r
- rxRuntime->iso15765.state = IDLE;\r
- rxRuntime->mode = CANTP_RX_WAIT;\r
- dataCopyFailure = TRUE;\r
- DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' "\r
- "data to local buffer!\n");\r
- }\r
+ } else {\r
+ currentSegmentMaxSize = CANIF_PDU_MAX_LENGTH - indexCount;\r
+ bytesLeftToCopy = rxRuntime->transferTotal\r
+ - rxRuntime->transferCount;\r
+ if (bytesLeftToCopy < currentSegmentMaxSize) {\r
+ currentSegmentSize = bytesLeftToCopy; // 1-5.\r
} else {\r
- if ( copySegmentToLocalRxBuffer(rxRuntime, /** @req CANTP067 */\r
- &rxPduData->SduDataPtr[2 + bytesCopiedToPdurRxBuffer],\r
- bytesNotCopiedToPdurRxBuffer) != TRUE ) {\r
- rxRuntime->iso15765.state = IDLE;\r
- rxRuntime->mode = CANTP_RX_WAIT;\r
- dataCopyFailure = TRUE;\r
- DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' "\r
- "data to local buffer!\n");\r
- }\r
- }\r
- if ( dataCopyFailure == FALSE ) {\r
- rxRuntime->iso15765.framesHandledCount++;\r
- rxRuntime->iso15765.stateTimeoutCount = CANTP_CONVERT_MS_TO_MAIN_CYCLES(rxConfig->CanTpNbr);\r
- rxRuntime->iso15765.state = RX_WAIT_SDU_BUFFER;\r
- rxRuntime->mode = CANTP_RX_PROCESSING;\r
- sendFlowControlFrame(rxConfig, rxRuntime, ret); /** @req CANTP082 */\r
+ currentSegmentSize = currentSegmentMaxSize; // 6 or 7, depends on addressing format used.\r
}\r
- } else if (ret == BUFREQ_OK) {\r
- bytesLeftToTransfer = rxRuntime->transferTotal - rxRuntime->transferCount;\r
- if (bytesLeftToTransfer > 0) {\r
- rxRuntime->iso15765.framesHandledCount++;\r
- COUNT_DECREMENT(rxRuntime->iso15765.nextFlowControlCount);\r
- if (rxRuntime->iso15765.nextFlowControlCount == 0) {\r
- sendFlowControlFrame(rxConfig, rxRuntime, BUFREQ_OK);\r
- }\r
- } else {\r
- DEBUG( DEBUG_MEDIUM,"ISO15765-Rx session finished, going back to IDLE!\n");\r
+ // Copy received data to buffer provided by SDUR.\r
+ ret = copySegmentToPduRRxBuffer(rxConfig, rxRuntime,\r
+ &rxPduData->SduDataPtr[indexCount],\r
+ currentSegmentSize,\r
+ &bytesCopiedToPdurRxBuffer);\r
+ if (ret == BUFREQ_NOT_OK) {\r
+ PduR_CanTpRxIndication(rxConfig->PduR_PduId, NTFRSLT_E_NO_BUFFER); /** @req CANTP084 */\r
rxRuntime->iso15765.state = IDLE;\r
rxRuntime->mode = CANTP_RX_WAIT;\r
- PduR_CanTpRxIndication(rxConfig->PduR_PduId, NTFRSLT_OK); /** @req CANTP084 */\r
+ } else if (ret == BUFREQ_BUSY) {\r
+ boolean dataCopyFailure = FALSE;\r
+ PduLengthType bytesNotCopiedToPdurRxBuffer =\r
+ currentSegmentSize - bytesCopiedToPdurRxBuffer;\r
+ if (rxConfig->CanTpAddressingFormant == CANTP_STANDARD) {\r
+ if ( copySegmentToLocalRxBuffer(rxRuntime, /** @req CANTP067 */\r
+ &rxPduData->SduDataPtr[1 + bytesCopiedToPdurRxBuffer],\r
+ bytesNotCopiedToPdurRxBuffer ) != TRUE ) {\r
+ rxRuntime->iso15765.state = IDLE;\r
+ rxRuntime->mode = CANTP_RX_WAIT;\r
+ dataCopyFailure = TRUE;\r
+ DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' "\r
+ "data to local buffer!\n");\r
+ }\r
+ } else {\r
+ if ( copySegmentToLocalRxBuffer(rxRuntime, /** @req CANTP067 */\r
+ &rxPduData->SduDataPtr[2 + bytesCopiedToPdurRxBuffer],\r
+ bytesNotCopiedToPdurRxBuffer) != TRUE ) {\r
+ rxRuntime->iso15765.state = IDLE;\r
+ rxRuntime->mode = CANTP_RX_WAIT;\r
+ dataCopyFailure = TRUE;\r
+ DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' "\r
+ "data to local buffer!\n");\r
+ }\r
+ }\r
+ if ( dataCopyFailure == FALSE ) {\r
+ rxRuntime->iso15765.framesHandledCount++;\r
+ rxRuntime->iso15765.stateTimeoutCount = CANTP_CONVERT_MS_TO_MAIN_CYCLES(rxConfig->CanTpNbr);\r
+ rxRuntime->iso15765.state = RX_WAIT_SDU_BUFFER;\r
+ rxRuntime->mode = CANTP_RX_PROCESSING;\r
+ sendFlowControlFrame(rxConfig, rxRuntime, ret); /** @req CANTP082 */\r
+ }\r
+ } else if (ret == BUFREQ_OK) {\r
+ bytesLeftToTransfer = rxRuntime->transferTotal - rxRuntime->transferCount;\r
+ if (bytesLeftToTransfer > 0) {\r
+ rxRuntime->iso15765.framesHandledCount++;\r
+ COUNT_DECREMENT(rxRuntime->iso15765.nextFlowControlCount);\r
+ if (rxRuntime->iso15765.nextFlowControlCount == 0) {\r
+ sendFlowControlFrame(rxConfig, rxRuntime, BUFREQ_OK);\r
+ }\r
+ } else {\r
+ DEBUG( DEBUG_MEDIUM,"ISO15765-Rx session finished, going back to IDLE!\n");\r
+ rxRuntime->iso15765.state = IDLE;\r
+ rxRuntime->mode = CANTP_RX_WAIT;\r
+ PduR_CanTpRxIndication(rxConfig->PduR_PduId, NTFRSLT_OK); /** @req CANTP084 */\r
+ }\r
}\r
}\r
}\r
uint8 extendedAddress = 0;\r
Std_ReturnType ret;\r
\r
- if (txConfig->CanTpAddressingMode == CANTP_EXTENDED) { /** @req CANTP094 *//** @req CANTP095 */\r
- extendedAddress = txPduData->SduDataPtr[indexCount++];\r
- }\r
- switch (txPduData->SduDataPtr[indexCount++] & ISO15765_TPCI_FS_MASK) {\r
- case ISO15765_FLOW_CONTROL_STATUS_CTS:\r
- txRuntime->iso15765.BS = txPduData->SduDataPtr[indexCount++];\r
- txRuntime->iso15765.nextFlowControlCount = txRuntime->iso15765.BS;\r
- txRuntime->iso15765.STmin = txPduData->SduDataPtr[indexCount++];\r
- DEBUG( DEBUG_MEDIUM, "txRuntime->iso15765.STmin = %d\n", txRuntime->iso15765.STmin);\r
- ret = sendConsecutiveFrame(txConfig, txRuntime);\r
- if (ret == E_OK) {\r
- handleConsecutiveFrameSent(txConfig, txRuntime);\r
- } else {\r
- PduR_CanTpRxIndication(txConfig->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP177 */ /** @req CANTP084 */\r
+\r
+ if ( txRuntime->iso15765.state == TX_WAIT_FLOW_CONTROL ) {\r
+ if (txConfig->CanTpAddressingMode == CANTP_EXTENDED) { /** @req CANTP094 *//** @req CANTP095 */\r
+ extendedAddress = txPduData->SduDataPtr[indexCount++];\r
+ }\r
+ switch (txPduData->SduDataPtr[indexCount++] & ISO15765_TPCI_FS_MASK) {\r
+ case ISO15765_FLOW_CONTROL_STATUS_CTS:\r
+ txRuntime->iso15765.BS = txPduData->SduDataPtr[indexCount++];\r
+ txRuntime->iso15765.nextFlowControlCount = txRuntime->iso15765.BS;\r
+ txRuntime->iso15765.STmin = txPduData->SduDataPtr[indexCount++];\r
+ DEBUG( DEBUG_MEDIUM, "txRuntime->iso15765.STmin = %d\n", txRuntime->iso15765.STmin);\r
+ ret = sendConsecutiveFrame(txConfig, txRuntime);\r
+ if (ret == E_OK) {\r
+ handleConsecutiveFrameSent(txConfig, txRuntime);\r
+ } else {\r
+ PduR_CanTpRxIndication(txConfig->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP177 */ /** @req CANTP084 */\r
+ txRuntime->iso15765.state = IDLE;\r
+ txRuntime->mode = CANTP_TX_WAIT;\r
+ }\r
+ break;\r
+ case ISO15765_FLOW_CONTROL_STATUS_WAIT:\r
+ txRuntime->iso15765.stateTimeoutCount =\r
+ CANTP_CONVERT_MS_TO_MAIN_CYCLES(txConfig->CanTpNbs); /*CanTp: 264*/\r
+ txRuntime->iso15765.state = TX_WAIT_FLOW_CONTROL;\r
+ break;\r
+ case ISO15765_FLOW_CONTROL_STATUS_OVFLW:\r
+ PduR_CanTpRxIndication(txConfig->PduR_PduId, NTFRSLT_E_NOT_OK);\r
txRuntime->iso15765.state = IDLE;\r
txRuntime->mode = CANTP_TX_WAIT;\r
+ break;\r
}\r
- break;\r
- case ISO15765_FLOW_CONTROL_STATUS_WAIT:\r
- txRuntime->iso15765.stateTimeoutCount =\r
- CANTP_CONVERT_MS_TO_MAIN_CYCLES(txConfig->CanTpNbs); /*CanTp: 264*/\r
- txRuntime->iso15765.state = TX_WAIT_FLOW_CONTROL;\r
- break;\r
- case ISO15765_FLOW_CONTROL_STATUS_OVFLW:\r
- PduR_CanTpRxIndication(txConfig->PduR_PduId, NTFRSLT_E_NOT_OK);\r
- txRuntime->iso15765.state = IDLE;\r
- txRuntime->mode = CANTP_TX_WAIT;\r
- break;\r
+ } else {\r
+ DEBUG( DEBUG_MEDIUM, "Ignoring flow control, we do not expect it!");\r
}\r
}\r
\r
if ( txRuntime->iso15765.stateTimeoutCount == 0 ) {\r
DEBUG( DEBUG_MEDIUM, "WARNING! Too low CanTpNbs timeout!\n" );\r
}\r
- txRuntime->iso15765.state = TX_WAIT_FLOW_CONTROL;\r
+ txRuntime->iso15765.state = TX_WAIT_FLOW_CONTROL; // We will always expect a flow control at this stage.\r
res = sendFirstFrame(txConfig, txRuntime); /** @req CANTP231 */\r
if (res == E_OK) {\r
txRuntime->mode = CANTP_TX_PROCESSING;\r
txConfig = (CanTp_TxNSduType*)&CanTpConfig.CanTpNSduList[CanTpTxSduId].configData;\r
\r
txRuntime = &CanTpRunTimeData.runtimeDataList[txConfig->CanTpTxChannel]; // Runtime data.\r
- if (txRuntime->mode != CANTP_TX_PROCESSING) {\r
+ if (txRuntime->iso15765.state == IDLE) {\r
txRuntime->pdurBufferCount = 0;\r
txRuntime->pdurBufferCount = 0;\r
txRuntime->transferCount = 0;\r
break;\r
}\r
} else {\r
+ DEBUG( DEBUG_MEDIUM, "CanTp can't transmit, it is already occupied!\n", CanTpTxSduId);\r
ret = E_NOT_OK; /** @req CANTP123 *//** @req CANTP206 */\r
}\r
return ret; // CAN level error code.\r
handleSingleFrame(rxConfigParams, runtimeParams, CanTpRxPduPtr);\r
}\r
else\r
- DEBUG( DEBUG_MEDIUM, "Single frame received on ISO15765-Tx flow control - is ignored!\n");\r
+ DEBUG( DEBUG_MEDIUM, "Single frame received on ISO15765-Tx - is ignored!\n");\r
break;\r
}\r
case FIRST_FRAME: {\r
DEBUG( DEBUG_MEDIUM, "calling handleFirstFrame!\n");\r
handleFirstFrame(rxConfigParams, runtimeParams, CanTpRxPduPtr);\r
} else\r
- DEBUG( DEBUG_MEDIUM, "First frame received on ISO15765-Tx flow control - is ignored!\n");\r
+ DEBUG( DEBUG_MEDIUM, "First frame received on ISO15765-Tx - is ignored!\n");\r
break;\r
}\r
case CONSECUTIVE_FRAME: {\r
DEBUG( DEBUG_MEDIUM, "calling handleConsecutiveFrame!\n");\r
handleConsecutiveFrame(rxConfigParams, runtimeParams, CanTpRxPduPtr);\r
} else\r
- DEBUG( DEBUG_MEDIUM, "Consecutive frame received on ISO15765-Tx flow control - is ignored!\n");\r
+ DEBUG( DEBUG_MEDIUM, "Consecutive frame received on ISO15765-Tx - is ignored!\n");\r
break;\r
}\r
case FLOW_CONTROL_CTS_FRAME: {\r
DEBUG( DEBUG_MEDIUM, "calling handleFlowControlFrame!\n");\r
handleFlowControlFrame(txConfigParams, runtimeParams, CanTpRxPduPtr);\r
} else\r
- DEBUG( DEBUG_MEDIUM, "Flow control frame received on ISO15765-RX flow control - is ignored!\n");\r
+ DEBUG( DEBUG_MEDIUM, "Flow control frame received on ISO15765-Rx - is ignored!\n");\r
break;\r
}\r
case INVALID_FRAME: {\r
- DEBUG( DEBUG_MEDIUM, "INVALID_FRAME recived, doing nothing!!\n");\r
+ DEBUG( DEBUG_MEDIUM, "INVALID_FRAME received - is ignored!\n!\n");\r
break;\r
}\r
default:\r
handleConsecutiveFrameSent(txConfigListItem, txRuntimeListItem);\r
} else {\r
DEBUG( DEBUG_MEDIUM, "ERROR: Consecutive frame could not be sent!\n");\r
- PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId,\r
- NTFRSLT_E_NOT_OK); /** @req CANTP204 */\r
txRuntimeListItem->iso15765.state = IDLE;\r
txRuntimeListItem->mode = CANTP_TX_WAIT;\r
+ PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId,\r
+ NTFRSLT_E_NOT_OK); /** @req CANTP204 */\r
}\r
} else {\r
DEBUG( DEBUG_MEDIUM, "Waiting for STmin timer to expire!\n");\r
//DEBUG( DEBUG_MEDIUM, "Waiting for flow control!\n");\r
if (txRuntimeListItem->iso15765.stateTimeoutCount == 0) {\r
DEBUG( DEBUG_MEDIUM, "State TX_WAIT_FLOW_CONTROL timed out!\n");\r
+ txRuntimeListItem->iso15765.state = IDLE;\r
+ txRuntimeListItem->mode = CANTP_TX_WAIT;\r
PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId,\r
NTFRSLT_E_NOT_OK); /** @req CANTP204 */ /** @req CANTP185 */\r
- txRuntimeListItem->iso15765.state = IDLE;\r
}\r
break;\r
default:\r
* to send a flow-control clear to send (CTS).\r
*/\r
if (rxRuntimeListItem->iso15765.stateTimeoutCount == 0) { /** @req CANTP223 */\r
- PduR_CanTpTxConfirmation(rxConfigListItem->PduR_PduId,\r
+ PduR_CanTpRxIndication(rxConfigListItem->PduR_PduId,\r
NTFRSLT_E_NOT_OK); /** @req CANTP204 */\r
rxRuntimeListItem->iso15765.state = IDLE;\r
rxRuntimeListItem->mode = CANTP_RX_WAIT;\r
} else if (ret == BUFREQ_NOT_OK ) {\r
rxRuntimeListItem->iso15765.state = IDLE;\r
rxRuntimeListItem->mode = CANTP_RX_WAIT;\r
- PduR_CanTpTxConfirmation(rxConfigListItem->PduR_PduId,\r
+ PduR_CanTpRxIndication(rxConfigListItem->PduR_PduId,\r
NTFRSLT_E_NOT_OK); /** @req CANTP205 */\r
} else if ( ret == BUFREQ_BUSY ) {\r
DEBUG( DEBUG_MEDIUM, "Still busy!\n");\r
#include "ComM_Dcm.h"\r
#include "PduR_Dcm.h"\r
#include "ComStack_Types.h"\r
-//#define USE_DEBUG_PRINTF\r
+#define USE_DEBUG_PRINTF\r
#include "debug.h"\r
\r
#define DECREMENT(timer) { if (timer > 0) timer--; }\r
\r
typedef struct {\r
boolean initRun;\r
+ //boolean diagnosticRequestPending; // This is a "semaphore" because DSD and DCM can handle multiple/parallel request at the moment.\r
const Dcm_DslProtocolRowType *preemptedProtocol; // Points to the currently active protocol.\r
const Dcm_DslProtocolRowType *activeProtocol; // Points to the currently active protocol.\r
Dcm_DslRunTimeProtocolParametersType\r
protocolList[MAX_PARALLEL_PROTOCOLS_ALLOWED];\r
} DcmDsl_RunTimeDataType;\r
\r
-DcmDsl_RunTimeDataType DcmDslRunTimeData = { .initRun = FALSE,\r
- .preemptedProtocol = NULL, .activeProtocol = NULL };\r
+DcmDsl_RunTimeDataType DcmDslRunTimeData = {\r
+ .initRun = FALSE,\r
+ .preemptedProtocol = NULL,\r
+ .activeProtocol = NULL };\r
\r
// ################# DUMMIES START #################\r
\r
runtime->externalTxBufferStatus = DSD_PENDING_RESPONSE_SIGNALED; /** @req DCM114 **/\r
break;\r
case DSD_TX_RESPONSE_SUPPRESSED:\r
+ DEBUG( DEBUG_MEDIUM, "DslDsdProcessingDone called with DSD_TX_RESPONSE_SUPPRESSED.\n");\r
releaseExternalRxTxBuffersHelper(rxPduIdRef);\r
break;\r
default:\r
= BUFFER_AVAILABLE;\r
listEntry++;\r
};\r
+ //DcmDslRunTimeData.diagnosticRequestPending = FALSE;\r
DcmDslRunTimeData.initRun = TRUE;\r
}\r
\r
protocolRow->DslProtocolRxBufferID;\r
if (externalRxBuffer->pduInfo.SduLength >= tpSduLength) { /** @req DCM443 **/\r
if ((runtime->externalRxBufferStatus == NOT_IN_USE)\r
- && (externalRxBuffer->externalBufferRuntimeData->status\r
- == BUFFER_AVAILABLE)) {\r
+ && (externalRxBuffer->externalBufferRuntimeData->status == BUFFER_AVAILABLE)) {\r
DEBUG( DEBUG_MEDIUM, "External buffer available!\n");\r
// ### EXTERNAL BUFFER IS AVAILABLE; GRAB IT AND REMEBER THAT WE OWN IT! ###\r
externalRxBuffer->externalBufferRuntimeData->status\r
runtime->diagnosticRequestFromTester.SduDataPtr\r
= externalRxBuffer->pduInfo.SduDataPtr;\r
runtime->diagnosticRequestFromTester.SduLength = tpSduLength;\r
- //*pduInfoPtr = &(externalRxBuffer->pduInfo);\r
*pduInfoPtr = &(runtime->diagnosticRequestFromTester);\r
runtime->externalRxBufferStatus = PROVIDED_TO_PDUR; /** @req DCM342 **/\r
ret = BUFREQ_OK;\r
= tpSduLength;\r
*pduInfoPtr = &(runtime->localRxBuffer.PduInfo);\r
ret = BUFREQ_OK;\r
+ } else {\r
+ ret = BUFREQ_BUSY;\r
}\r
}\r
} else {\r
ComM_DCM_ActivateDiagnostic(); /* @DCM163 */\r
runtime->diagnosticActiveComM = TRUE;\r
}\r
+ timeParams = protocolRow->DslProtocolTimeLimit;\r
runtime->stateTimeoutCount = DCM_CONVERT_MS_TO_MAIN_CYCLES(\r
timeParams->TimStrP2ServerMax); /* See 9.2.2. */\r
runtime->externalRxBufferStatus = PROVIDED_TO_DSD; /** @req DCM241 **/\r
+ if (runtime->externalTxBufferStatus == NOT_IN_USE) {\r
+ DEBUG( DEBUG_MEDIUM, "External Tx buffer available, we can pass it to DSD.\n");\r
+ } else {\r
+ DEBUG( DEBUG_MEDIUM, "External buffer not available, a response is being transmitted?\n");\r
+ }\r
runtime->externalTxBufferStatus = PROVIDED_TO_DSD; /** @req DCM241 **/\r
- timeParams = protocolRow->DslProtocolTimeLimit;\r
- //runtime->stateTimeoutCount = DCM_CONVERT_MS_TO_MAIN_CYCLES(\r
- // timeParams->TimStrP2ServerMax); /* Reinitiate timer, see 9.2.2. */\r
runtime->responsePendingCount = DCM_Config.Dsl->DslDiagResp->DslDiagRespMaxNumRespPend;\r
runtime->diagnosticResponseFromDsd.SduDataPtr\r
= protocolRow->DslProtocolTxBufferID->pduInfo.SduDataPtr;\r
DEBUG( DEBUG_MEDIUM, "DsdDslDataIndication(DcmDslProtocolTxPduId=%d, dcmRxPduId=%d)\n",\r
mainConnection->DslProtocolTx->DcmDslProtocolTxPduId, dcmRxPduId);\r
runtime->diagReqestRxPduId = dcmRxPduId;\r
- DsdDslDataIndication( // qqq: We are inside a critical section, how much time will this consume?\r
+ DsdDslDataIndication( // qqq: We are inside a critical section.\r
&(runtime->diagnosticRequestFromTester),\r
protocolRow->DslProtocolSIDTable,\r
protocolRx->DslProtocolAddrType,\r
const Dcm_DslProtocolRowType *protocolRow = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
\r
- DEBUG( DEBUG_MEDIUM, "DslProvideTxBuffer (dcmTxPduId=%d)\n", dcmTxPduId);\r
+ DEBUG( DEBUG_MEDIUM, "DslProvideTxBuffer=%d\n", dcmTxPduId);\r
if (findTxPduIdParentConfigurationLeafs(dcmTxPduId, &protocolTx, &mainConnection,\r
&connection, &protocolRow, &runtime)) {\r
switch (runtime->externalTxBufferStatus) { // ### EXTERNAL TX BUFFER ###\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
imask_t state;\r
\r
- DEBUG( DEBUG_MEDIUM, "DslTxConfirmation=%d\n", dcmTxPduId);\r
+ DEBUG( DEBUG_MEDIUM, "DslTxConfirmation=%d, result=%d\n", dcmTxPduId, result);\r
if (findTxPduIdParentConfigurationLeafs(dcmTxPduId, &protocolTx, &mainConnection,\r
&connection, &protocolRow, &runtime)) {\r
boolean externalBufferReleased = FALSE;\r