if ((mode == CANIF_GET_TX_ONLINE) || (mode == CANIF_GET_ONLINE)
|| (mode == CANIF_GET_OFFLINE_ACTIVE) || (mode == CANIF_GET_OFFLINE_ACTIVE_RX_ONLINE) )
{
- entry->CanIfUserTxConfirmation(canTxPduId); /* CANIF053 */
+ entry->CanIfUserTxConfirmation(entry->CanIfTxPduId); /* CANIF053 */
}
}
return;
// Set pointer to shadow buffer\r
Arc_GroupSignal->Com_Arc_ShadowBuffer = Arc_Signal->Com_Arc_ShadowBuffer;\r
// Initialize group signal data.
- // TODO: CopyData\r
- // Com_CopyData(Arc_IPdu->ComIPduDataPtr, &GroupSignal->ComSignalInitValue, GroupSignal->ComBitSize, GroupSignal->ComBitPosition, 0);
- Com_WriteGroupSignalDataToPdu(Signal->ComHandleId, GroupSignal->ComHandleId, &GroupSignal->ComSignalInitValue);\r
+ Com_WriteGroupSignalDataToPdu(Signal->ComHandleId, GroupSignal->ComHandleId, GroupSignal->ComSignalInitValue);\r
}\r
\r
} else {\r
// Initialize signal data.
- // TODO: CopyData\r
- // Com_CopyData(Arc_IPdu->ComIPduDataPtr, &Signal->ComSignalInitValue, Signal->ComBitSize, Signal->ComBitPosition, 0);
- Com_WriteSignalDataToPdu(Signal->ComHandleId, &Signal->ComSignalInitValue);\r
+ Com_WriteSignalDataToPdu(Signal->ComHandleId, Signal->ComSignalInitValue);\r
}\r
\r
// Check filter configuration\r
// Check if a timeout has occurred.\r
if (Arc_Signal->Com_Arc_DeadlineCounter == 0) {\r
if (signal->ComRxDataTimeoutAction == COM_TIMEOUT_DATA_ACTION_REPLACE) {\r
- // Replace signal data.\r
- uint32 signalInitData;\r
- memset(&signalInitData, signal->ComSignalInitValue, sizeof(uint32));\r
-
- // TODO: CopyData\r
- // Com_CopyData(Arc_IPdu->ComIPduDataPtr, &signalInitData, signal->ComBitSize, signal->ComBitPosition, 0);
- Com_WriteSignalDataToPdu(signal->ComHandleId, &signalInitData);\r
+ // Replace signal data.
+ Com_WriteSignalDataToPdu(signal->ComHandleId, signal->ComSignalInitValue);\r
\r
}\r
\r
#include "Dem.h"\r
#endif
#include "PduR.h"\r
-#include "PduR_Com.h"\r
-#include "PduR_CanIf.h"\r
-#include "PduR_LinIf.h"\r
-#include "PduR_Ipdum.h"\r
#include "Mcu.h"\r
#include "debug.h"\r
\r
\r
uint8 failed = 0;\r
\r
- // TODO Initialize DestPduIds!!!!!\r
-\r
- // TODO Initialize NRoutingPaths.\r
-\r
// Initialize buffers.\r
int bufferNr = 0;\r
int i = 0;\r
- PduRRoutingPath_type *path;\r
+ PduRRoutingPath_type *path;
+ PduRConfig->PduRRoutingTable->NRoutingPaths = 0;\r
for (i = 0; !PduRConfig->PduRRoutingTable->PduRRoutingPath[i].PduR_Arc_EOL && !failed; i++) {\r
PduRConfig->PduRRoutingTable->NRoutingPaths++;\r
path = &PduRConfig->PduRRoutingTable->PduRRoutingPath[i];\r
}\r
\r
\r
-#ifdef PDUR_VERSION_INFO_API\r
+#if PDUR_VERSION_INFO_API == STD_ON\r
void PduR_GetVersionInfo (Std_VersionInfoType* versionInfo){\r
versionInfo->moduleID = (uint16)MODULE_ID_PDUR;\r
versionInfo->vendorID = (uint16)1;\r
#endif // End of not Zero Cost Operation Mode\r
\r
Std_ReturnType PduR_CancelTransmitRequest(PduR_CancelReasonType PduCancelReason, PduIdType PduId) {\r
- Enter(PduId,E_NOT_OK);\r
// TODO Implement!\r
-\r
- Exit();\r
return E_NOT_OK;\r
}\r
\r
void PduR_ChangeParameterRequest(PduR_ParameterValueType PduParameterValue, PduIdType PduId) {\r
- Enter(0);\r
// TODO Implement!\r
\r
}\r
-\r
-\r
-// If we are using the simulator CANIF and LINIF are not available.\r
-// Therefore the functions needed by the functions pointer tables below needs to be stubbed.\r
-#if !defined(USE_CANIF)\r
-Std_ReturnType CanIf_Transmit(PduIdType CanTxPduId, const PduInfoType *PduInfoPtr) {\r
- // Just a stub\r
- return E_OK;\r
-}\r
-\r
-// If CAN are available we include these functions directly\r
-#else\r
-#include "CanIf.h"\r
-#endif\r
-\r
-\r
-#if !defined(USE_LINIF)\r
-Std_ReturnType LinIf_Transmit(PduIdType LinTxPduId,const PduInfoType* PduInfoPtr) {\r
- // Just a stub\r
- return E_OK;\r
-}\r
-\r
-// If LIN are available we include these functions directly\r
-#else\r
-#include "LinIf.h"\r
-#endif\r
-
-#if (PDUR_ZERO_COST_OPERATION == STD_OFF)
-#include "Com.h"
-\r
-PduR_FctPtrType PduR_StdLinFctPtrs = {\r
- .TargetIndicationFctPtr = Com_RxIndication,\r
- .TargetTransmitFctPtr = LinIf_Transmit,\r
- .TargetConfirmationFctPtr = Com_TxConfirmation,\r
- .TargetTriggerTransmitFctPtr = Com_TriggerTransmit,\r
-};
-
-
-\r
-PduR_FctPtrType PduR_StdCanFctPtrs = {\r
- .TargetIndicationFctPtr = Com_RxIndication,\r
- .TargetTransmitFctPtr = CanIf_Transmit,\r
- .TargetConfirmationFctPtr = Com_TxConfirmation,\r
- .TargetTriggerTransmitFctPtr = Com_TriggerTransmit,\r
-};\r
-#endif
#include "PduR_If.h"\r
#include "debug.h"\r
\r
-#if PDUR_ZERO_COST_OPERATION == STD_OFF\r
-#if PDUR_CANIF_SUPPORT == STD_ON\r
+#if PDUR_ZERO_COST_OPERATION == STD_OFF && PDUR_CANIF_SUPPORT == STD_ON\r
\r
\r
void PduR_CanIfRxIndication(PduIdType CanRxPduId,const uint8* CanSduPtr) {\r
- Enter(CanRxPduId);\r
DevCheck(CanRxPduId,CanSduPtr,0x0e);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
PduR_LoIfRxIndication(CanRxPduId, CanSduPtr);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
void PduR_CanIfTxConfirmation(PduIdType CanTxPduId) {\r
- Enter(CanTxPduId);\r
DevCheck(CanTxPduId,1,0x0f);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
PduR_LoIfTxConfirmation(CanTxPduId);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
#endif\r
-#endif\r
#include "PduR.h"\r
\r
#if PDUR_CANIF_SUPPORT == STD_ON\r
-#if PDUR_ZERO_COST_OPERATION == STD_OFF\r
+ #if PDUR_ZERO_COST_OPERATION == STD_OFF\r
void PduR_CanIfRxIndication (PduIdType CanRxPduId, const uint8 *CanSudPtr );\r
void PduR_CanIfTxConfirmation(PduIdType CanTxPduId);\r
#else // Zero cost operation active\r
- #if PDUR_SINGLE_IF == CAN_IF && defined(PDUR_COM_SUPPORT)
+ #if PDUR_COM_SUPPORT == STD_ON
#include "Com_Com.h"
* -------------------------------- Arctic Core ------------------------------*/\r
\r
\r
-#if (PDUR_CANTP_SUPPORT == STD_ON)\r
+#if PDUR_CANTP_SUPPORT == STD_ON && PDUR_ZERO_COST_OPERATION == STD_OFF\r
\r
#include "PduR_CanTp.h"\r
\r
\r
\r
void PduR_CanTpRxIndication(PduIdType CanTpRxPduId, NotifResultType Result) {\r
- Enter(CanTpRxPduId);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
DEBUG(DEBUG_LOW,"PduR_CanTpRxIndication: received indication with id %d and data %d\n", CanTpRxPduId);\r
Dcm_RxIndication(CanTpRxPduId, Result);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
\r
\r
}\r
void PduR_CanTpTxConfirmation(PduIdType CanTpTxPduId, NotifResultType Result) {\r
- Enter(CanTxPduId);\r
DevCheck(CanTxPduId,1,0x0f);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
Dcm_TxConfirmation(CanTpTxPduId, Result);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
\r
\r
#else // Zero cost operation active\r
\r
- #if PDUR_SINGLE_TP == CAN_TP && defined(PDUR_DCM_SUPPORT)\r
+ #if PDUR_DCM_SUPPORT == STD_ON\r
\r
#include "Dcm_Cbk.h"\r
\r
* Called by the COM-layer in order to send a PDU through a protocol interface.
*/\r
Std_ReturnType PduR_ComTransmit(PduIdType ComTxPduId, const PduInfoType* PduInfoPtr) {\r
- Enter(ComTxPduId, E_NOT_OK);\r
DevCheck(ComTxPduId,PduInfoPtr,0x15, E_NOT_OK);\r
\r
//DEBUG(DEBUG_LOW,"PduR_ComTransmit: received transmit request with id %d and data %d\n", ComTxPduId, *PduInfoPtr->SduDataPtr);\r
PduRRoutingPath_type *route = &PduRConfig->PduRRoutingTable->PduRRoutingPath[ComTxPduId];\r
Std_ReturnType retVal = route->FctPtrs.TargetTransmitFctPtr(route->PduRDestPdu.DestPduId, PduInfoPtr);\r
- Exit();\r
return retVal;\r
}\r
\r
#include "PduR.h"\r
\r
#if PDUR_COM_SUPPORT == STD_ON\r
-#if PDUR_ZERO_COST_OPERATION == STD_OFF\r
+ #if PDUR_ZERO_COST_OPERATION == STD_OFF\r
\r
-Std_ReturnType PduR_ComTransmit(PduIdType ComTxPduId, const PduInfoType* PduInfoPtr);\r
+ Std_ReturnType PduR_ComTransmit(PduIdType ComTxPduId, const PduInfoType* PduInfoPtr);\r
\r
-#else\r
+ #else\r
\r
-#if PDUR_SINGLE_IF == CAN_IF\r
+ #if PDUR_SINGLE_IF == CAN_IF\r
\r
-#define PduR_ComTransmit CanIf_Transmit\r
+ #define PduR_ComTransmit CanIf_Transmit\r
\r
-#elif PDUR_SINGLE_IF == LIN_IF\r
+ #elif PDUR_SINGLE_IF == LIN_IF\r
\r
-#define PduR_ComTransmit LinIf_Transmit\r
+ #define PduR_ComTransmit LinIf_Transmit\r
\r
-#endif\r
+ #endif\r
+\r
+ #endif
+
+#else
+
+#define PduR_ComTransmit (void)
\r
-#endif\r
#endif\r
\r
#endif /* PDUR_COM_H_ */\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
\r
-#if (PDUR_DCM_SUPPORT == STD_ON)\r
+#if PDUR_DCM_SUPPORT == STD_ON && PDUR_ZERO_COST_OPERATION\r
\r
#include "PduR_Dcm.h"\r
\r
Std_ReturnType PduR_DcmTransmit(PduIdType DcmTxPduId, const PduInfoType* PduInfoPtr) {\r
- Enter(DcmTxPduId, E_NOT_OK);\r
DevCheck(DcmTxPduId,PduInfoPtr,0x15, E_NOT_OK);\r
\r
//DEBUG(DEBUG_LOW,"PduR_ComTransmit: received transmit request with id %d and data %d\n", ComTxPduId, *PduInfoPtr->SduDataPtr);\r
PduRRoutingPath_type *route = &PduRConfig->PduRRoutingTable->PduRRoutingPath[ComTxPduId];\r
Std_ReturnType retVal = CanTp_Transmit(route->PduRDestPdu.DestPduId, PduInfoPtr);\r
\r
- Exit();\r
return retVal;\r
}\r
\r
\r
#endif\r
\r
-#endif\r
+#else\r
\r
+#define PduR_DcmTransmit (void)\r
\r
+#endif\r
\r
\r
#endif /*PDUR_DCM_H_*/\r
+++ /dev/null
-/* -------------------------------- Arctic Core ------------------------------
- * Arctic Core - the open source AUTOSAR platform http://arccore.com
- *
- * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
- *
- * This source code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- * -------------------------------- Arctic Core ------------------------------*/
-
-
-
-
-
-
-
-
-#include "PduR_Ipdum.h"\r
-\r
-#ifdef PDUR_IPDUM_SUPPORT\r
-\r
-Std_ReturnType PduR_IpdumTransmit(PduIdType IpdumTxPduId, const PduInfoType* PduInfoPtr) {\r
-\r
-#ifdef PDUR_DEV_ERROR_DETECT\r
- DevCheck(IpdumTxPduId,PduInfoPtr,0x19);\r
-#endif\r
-\r
-}\r
-\r
-void PduR_IpdumTxConfirmation(PduIdType IpdumLoTxPduId) {\r
-\r
-#ifdef PDUR_DEV_ERROR_DETECT\r
- DevCheck(IpdumLoTxPduId,0,0x1a);\r
-#endif\r
-\r
-}\r
-\r
-void PduR_IpdumRxIndication(PduIdType IpdumLoRxPduId, const uint8* IpdumSduPtr) {\r
-\r
-#ifdef PDUR_DEV_ERROR_DETECT\r
- DevCheck(IpdumLoRxPduId,IpdumSduPtr,0x1b);\r
-#endif\r
-\r
-}\r
-\r
-#endif\r
+++ /dev/null
-/* -------------------------------- Arctic Core ------------------------------
- * Arctic Core - the open source AUTOSAR platform http://arccore.com
- *
- * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
- *
- * This source code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- * -------------------------------- Arctic Core ------------------------------*/
-
-
-
-
-
-
-
-
-#ifndef PDUR_IPDUM_H_\r
-#define PDUR_IPDUM_H_\r
-\r
-#include "PduR.h"\r
-\r
-#ifdef PDUR_IPDUM_SUPPORT\r
-\r
-Std_ReturnType PduR_IpdumTransmit(PduIdType IpdumTxPduId, const PduInfoType* PduInfoPtr);\r
-\r
-void PduR_IpdumTxConfirmation(PduIdType IpdumLoTxPduId);\r
-\r
-void PduR_IpdumRxIndication(PduIdType IpdumLoRxPduId, const uint8* IpdumSduPtr);\r
-\r
-#endif\r
-\r
-#endif /* PDUR_IPDUM_H_ */\r
#include "PduR_If.h"\r
#include "debug.h"\r
\r
-#if PDUR_ZERO_COST_OPERATION == STD_OFF\r
-#if PDUR_LINIF_SUPPORT == STD_ON\r
+#if PDUR_ZERO_COST_OPERATION == STD_OFF && PDUR_LINIF_SUPPORT == STD_ON\r
\r
void PduR_LinIfRxIndication(PduIdType LinRxPduId, const uint8* LinSduPtr) {\r
- Enter(LinRxPduId);\r
DevCheck(LinRxPduId,LinSduPtr,0x0e);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
PduR_LoIfRxIndication(LinRxPduId, LinSduPtr);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
void PduR_LinIfTxConfirmation(PduIdType LinTxPduId) {\r
- Enter(LinTxPduId);\r
DevCheck(LinTxPduId,1,0x0f);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
PduR_LoIfTxConfirmation(LinTxPduId);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
void PduR_LinIfTriggerTransmit(PduIdType LinTxPduId, uint8* LinSduPtr) {\r
- Enter(LinTxPduId);\r
DevCheck(LinTxPduId,LinSduPtr,0x10);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
PduR_LoIfTriggerTransmit(LinTxPduId, LinSduPtr);\r
\r
DEBUG(DEBUG_LOW,"----------------------\n");\r
- Exit();\r
}\r
\r
#endif\r
-#endif\r
+++ /dev/null
-/* -------------------------------- Arctic Core ------------------------------
- * Arctic Core - the open source AUTOSAR platform http://arccore.com
- *
- * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
- *
- * This source code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- * -------------------------------- Arctic Core ------------------------------*/
-
-
-
-
-
-
-
-
-#include "PduR.h"\r
-\r
-PduIdType LOIf_ReceivedPduId;\r
-uint8 LOIf_ReceivedData[] = {9,9,9,9,9,9,9,9};\r
-uint8 LOIf_TriggerMode = 0; // 1 => TriggerTransmit mode. 0 => Ordinary mode.\r
-uint8 LOIf_SendConfirmation = 1; // 0 => No confirmation.\r
-Std_ReturnType LOIf_Transmit_TEST(PduIdType LOTxPduId,const PduInfoType* PduInfoPtr)\r
-{\r
- //debug("LinIf_Transmit_TEST: Received data with id %d\n", LinTxPduId);\r
- LOIf_ReceivedPduId = LOTxPduId;\r
-\r
- if (LOIf_TriggerMode) {\r
- PduR_LinIfTriggerTransmit(LOTxPduId, LOIf_ReceivedData);\r
- } else {\r
- memcpy(&LOIf_ReceivedData, PduInfoPtr->SduDataPtr, PduInfoPtr->SduLength * (sizeof (uint8)));\r
- }\r
-\r
- if (LOIf_SendConfirmation) {\r
- PduR_LinIfTxConfirmation(LOTxPduId);\r
- }\r
-\r
- return E_OK;\r
-}\r
-\r
-Std_ReturnType LOIf_ErroneousTransmit_TEST(PduIdType LOTxPduId,const PduInfoType* PduInfoPtr) {\r
- return E_NOT_OK;\r
-}\r
-\r
-PduIdType UP_ReceivedPduId;\r
-const uint8 UP_ReceivedData[] = {9,9,9,9,9,9,9,9};\r
-Std_ReturnType UP_RxIndication_TEST(PduIdType UPRxPduId, const uint8* PduInfoPtr)\r
-{\r
- //debug("Com_RxIndication_TEST: received indication with id %d and data %d\n", ComRxPduId, *PduInfoPtr);\r
- UP_ReceivedPduId = UPRxPduId;\r
-\r
- memcpy(&UP_ReceivedData, PduInfoPtr, PduR_RTable_LoIf.RoutingTable[UPRxPduId].SduLength * (sizeof (uint8)));\r
- return E_OK;\r
-}\r
-\r
-Std_ReturnType UP_TxConfirmation_TEST(PduIdType PduId) {\r
- //debug("Com_TxConfirmation_TEST: Received confirmation with id %d\n", PduId);\r
- UP_ReceivedPduId = PduId;\r
- return E_OK;\r
-}\r
-\r
-Std_ReturnType UP_TriggerTransmit_TEST(PduIdType PduId, uint8 *PduInfoPtr) {\r
- //debug("Com_TriggerTransmit: Received trigger with id %d and data %d\n", PduId, *PduInfoPtr);\r
- UP_ReceivedPduId = PduId;\r
- memcpy(PduInfoPtr, &CanSduPtr, PduR_RTable_LoIf.RoutingTable[PduId].SduLength * (sizeof (uint8)));\r
- return E_OK;\r
-}\r
-\r
-PduR_FctPtrType PduR_Callbacks_TEST = {\r
- .TargetIndicationFctPtr = UP_RxIndication_TEST,\r
- .TargetTransmitFctPtr = LOIf_Transmit_TEST,\r
- .TargetConfirmationFctPtr = UP_TxConfirmation_TEST,\r
- .TargetTriggerTransmitFctPtr = UP_TriggerTransmit_TEST,\r
-};\r
-\r
-PduR_FctPtrType PduR_ErroneousCallbacks_TEST = {\r
- //.TargetIndicationFctPtr = UP_RxIndication_TEST,\r
- .TargetTransmitFctPtr = LOIf_ErroneousTransmit_TEST,\r
- //.TargetConfirmationFctPtr = UP_TxConfirmation_TEST,\r
- //.TargetTriggerTransmitFctPtr = UP_TriggerTransmit_TEST,\r
-};\r
-\r
-\r
-// DET_REPORTERROR(PDUR_MODULE_ID, PDUR_INSTANCE_ID, 0x00, PDUR_E_CONFIG_PTR_INVALID);\r
-\r
-void PduRclearError(void)\r
-{\r
- error.ApiId=0;\r
- error.ErrorId=0;\r
- error.InstanceId=0;\r
- error.ModuleId=0;\r
-\r
- UP_ReceivedPduId = -1;\r
- memset(&UP_ReceivedData, 9, sizeof(uint8) * 8);\r
-\r
- LOIf_ReceivedPduId = -1;\r
- memset(&LOIf_ReceivedData, 9, sizeof(uint8) * 8);\r
-}\r
+++ /dev/null
-/* -------------------------------- Arctic Core ------------------------------
- * Arctic Core - the open source AUTOSAR platform http://arccore.com
- *
- * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
- *
- * This source code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- * -------------------------------- Arctic Core ------------------------------*/
-
-
-
-
-
-
-
-
-/*\r
- * PduR_Test.h\r
- *\r
- * Created on: 2008-nov-05\r
- * Author: Mattias\r
- */\r
-\r
-#ifndef PDUR_TEST_H_\r
-#define PDUR_TEST_H_\r
-\r
-\r
-#endif /* PDUR_TEST_H_ */\r
const ComSignalEndianess_type ComSignalEndianess;\r
\r
/** Value used to initialize this signal. */
- const uint32 ComSignalInitValue;\r
+ const void *ComSignalInitValue;\r
\r
/** Defines the type of the signal. */
const Com_SignalType ComSignalType;\r
const ComSignalEndianess_type ComSignalEndianess;\r
\r
/** Value used to initialized this signal. */
- const uint32 ComSignalInitValue;\r
+ const void *ComSignalInitValue;\r
\r
/** The number of bytes if the signal has type UINT8_N;
* Range 1 to 8.
#include "PduR_Cfg.h"
#include "PduR_Types.h"
-
-// #if (PDUR_ZERO_COST_OPERATION == STD_OFF)
#include "PduR_PbCfg.h"
-// #endif
#include "PduR_Com.h"
#include "PduR_CanIf.h"
extern const PduR_PBConfigType *PduRConfig;
-#ifdef PDUR_PRINT_DEBUG_STATEMENTS
-/* A simple debug macro to be used instead of printf(). This way all print
- * statements are turned off if PDUR_PRINT_DEBUG_STATEMENTS is undefined.
- */
-//#include <stdio.h>
-#define debug(...) printf(__VA_ARGS__)
-
-#else
-#define debug(...)
-
-#endif
-
-#ifdef PDUR_REENTRANCY_CHECK
-/*
- * The macros Enter and Exit performs the ReEntrancy check of the PDU router functions.
- * Enter shall be called at the beginning of the function with the current PduId and the wanted
- * return value (possibly nothing for void methods).
- * Exit should be called at the end of the function where reentrancy is desirable.
- */
-#define Enter(PduId,...) \
- static uint8 entered;\
- static PduIdType enteredId;\
- if (entered && enteredId == PduId) { \
- debug("Function already entered. EnteredId: %d, CurrentId: %d. Exiting.\n", enteredId, PduId); \
- return __VA_ARGS__; \
- } else { \
- entered = 1; \
- enteredId = PduId; \
- } \
-
-
-#define Exit() \
- entered = 0; \
-
-#else
-#define Enter(...)
-#define Exit()
-#endif
-
-#ifdef PDUR_DEV_ERROR_DETECT
+#if PDUR_DEV_ERROR_DETECT == STD_ON
#undef DET_REPORTERROR
#define DET_REPORTERROR(_x,_y,_z,_q) Det_ReportError(_x,_y,_z,_q)
#define PduR_GetConfigurationId(...) 0
#else // Not zero cost operation
-#error fail
+//#error fail
void PduR_Init(const PduR_PBConfigType* ConfigPtr);
void PduR_GetVersionInfo(Std_VersionInfoType* versionInfo);
uint32 PduR_GetConfigurationId();