]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Fixes for polite COM-stack and cleanup of PduR.
authorMattias Ekberg <mattias.ekberg@arccore.com>
Tue, 20 Apr 2010 14:00:08 +0000 (16:00 +0200)
committerMattias Ekberg <mattias.ekberg@arccore.com>
Tue, 20 Apr 2010 14:00:08 +0000 (16:00 +0200)
19 files changed:
communication/CanIf/CanIf.c
communication/Com/Com.c
communication/Com/Com_Sched.c
communication/PduR/PduR.c
communication/PduR/PduR_CanIf.c
communication/PduR/PduR_CanIf.h
communication/PduR/PduR_CanTp.c
communication/PduR/PduR_CanTp.h
communication/PduR/PduR_Com.c
communication/PduR/PduR_Com.h
communication/PduR/PduR_Dcm.c
communication/PduR/PduR_Dcm.h
communication/PduR/PduR_Ipdum.c [deleted file]
communication/PduR/PduR_Ipdum.h [deleted file]
communication/PduR/PduR_LinIf.c
communication/PduR/PduR_Test.c [deleted file]
communication/PduR/PduR_Test.h [deleted file]
include/Com_Types.h
include/PduR.h

index c72e450292e65a6d80ace4ed7f5e9f8127a53dc9..60caaa33b7528e176b87ad30c4832470b42ffe44 100644 (file)
@@ -664,7 +664,7 @@ void CanIf_TxConfirmation(PduIdType canTxPduId)
         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;
index 9cc50941ae9d95ad16b2a88b00ae97b342968b87..db193508c546189d9d470253fb0cb7b199b81a65 100644 (file)
@@ -156,16 +156,12 @@ void Com_Init(const Com_ConfigType *config ) {
                                        // 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
index 1753485814cd35493f08c6afd43a20d6e83e5bd5..c971736853f72d74771206185707c8d1228138b4 100644 (file)
@@ -47,13 +47,8 @@ void Com_MainFunctionRx() {
                        // 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
index 6bb5de5f4bfaeec66dcc8c76f087d8d6f16653c3..c9978a12b4a9d0b722e4be862b353ba70055af5f 100644 (file)
 #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
@@ -77,14 +73,11 @@ void PduR_Init (const PduR_PBConfigType* ConfigPtr) {
 \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
@@ -206,7 +199,7 @@ uint8 PduR_BufferIsFull(PduRTxBuffer_type *Buffer) {
 }\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
@@ -222,61 +215,11 @@ uint32 PduR_GetConfigurationId () {
 #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
index a8241429e51a06d49076bf7876cd7f9fc2e65af4..444b2908e024112e26ca100b033f45acbb3ce91e 100644 (file)
 #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
@@ -39,11 +37,9 @@ void PduR_CanIfRxIndication(PduIdType CanRxPduId,const uint8* CanSduPtr) {
        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
@@ -52,8 +48,6 @@ void PduR_CanIfTxConfirmation(PduIdType CanTxPduId) {
        PduR_LoIfTxConfirmation(CanTxPduId);\r
 \r
        DEBUG(DEBUG_LOW,"----------------------\n");\r
-       Exit();\r
 }\r
 \r
 #endif\r
-#endif\r
index b7753146c7facf329f35a048783a15e96f7ad39f..4e77d0daedc28798ce6c26f2024d445ad4747ca2 100644 (file)
 #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"
 
index 9499b9054747598f9c372c8376dd62b47c0d7e19..79d13e1c7e5f1c2d4b7e438dcc36c90ac81bec1e 100644 (file)
@@ -14,7 +14,7 @@
  * -------------------------------- 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
@@ -26,7 +26,6 @@ BufReq_ReturnType PduR_CanTpProvideRxBuffer(PduIdType CanTpRxPduId, PduLengthTyp
 \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
@@ -35,7 +34,6 @@ void PduR_CanTpRxIndication(PduIdType CanTpRxPduId, NotifResultType Result) {
        Dcm_RxIndication(CanTpRxPduId, Result);\r
 \r
        DEBUG(DEBUG_LOW,"----------------------\n");\r
-       Exit();\r
 }\r
 \r
 \r
@@ -45,7 +43,6 @@ BufReq_ReturnType PduR_CanTpProvideTxBuffer(PduIdType CanTpTxPduId, PduInfoType*
 \r
 }\r
 void PduR_CanTpTxConfirmation(PduIdType CanTpTxPduId, NotifResultType Result) {\r
-       Enter(CanTxPduId);\r
        DevCheck(CanTxPduId,1,0x0f);\r
 \r
        DEBUG(DEBUG_LOW,"----------------------\n");\r
@@ -54,7 +51,6 @@ void PduR_CanTpTxConfirmation(PduIdType CanTpTxPduId, NotifResultType Result) {
        Dcm_TxConfirmation(CanTpTxPduId, Result);\r
 \r
        DEBUG(DEBUG_LOW,"----------------------\n");\r
-       Exit();\r
 }\r
 \r
 \r
index 3b05e631b1b5be29d8397aadded0fe1e8a75941e..6298b32e0e6d471191d371056a7b2f7b1eb0f03f 100644 (file)
@@ -31,7 +31,7 @@
 \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
index c82fc45d90919fa8412b51c5b1b5ee8279ed7cb3..3f966688363ce274d126ea78f4cdace5242e936f 100644 (file)
  * 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
index 64d38491f92c57aa6c59a7db3627c57c31ad35d6..9672707e8f3e5fb0890b293371cca2b922816b0b 100644 (file)
 #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
index 3d19386b65307185888361a1daec5785ad1ecdb2..dc9b6821190cf7ffa25a983856f7fa7cec7d542e 100644 (file)
  * -------------------------------- 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
index b17084d8047f16388b7d94d042c79ca830432808..370121d5c92efe4967b9b54a6b0ac61e141e43c9 100644 (file)
 \r
        #endif\r
 \r
-#endif\r
+#else\r
 \r
+#define PduR_DcmTransmit (void)\r
 \r
+#endif\r
 \r
 \r
 #endif /*PDUR_DCM_H_*/\r
diff --git a/communication/PduR/PduR_Ipdum.c b/communication/PduR/PduR_Ipdum.c
deleted file mode 100644 (file)
index 1d3d78b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -------------------------------- 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
diff --git a/communication/PduR/PduR_Ipdum.h b/communication/PduR/PduR_Ipdum.h
deleted file mode 100644 (file)
index d8f529e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -------------------------------- 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
index fff6a2ba2d6cf04ec6dddcf797cc3a3e36867b5f..334b9f0497ec98b099b6e5227a2708ea36f2f5be 100644 (file)
 #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
@@ -38,11 +36,9 @@ void PduR_LinIfRxIndication(PduIdType LinRxPduId, const uint8* LinSduPtr) {
        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
@@ -51,11 +47,9 @@ void PduR_LinIfTxConfirmation(PduIdType LinTxPduId) {
        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
@@ -64,8 +58,6 @@ void PduR_LinIfTriggerTransmit(PduIdType LinTxPduId, uint8* LinSduPtr) {
        PduR_LoIfTriggerTransmit(LinTxPduId, LinSduPtr);\r
 \r
        DEBUG(DEBUG_LOW,"----------------------\n");\r
-       Exit();\r
 }\r
 \r
 #endif\r
-#endif\r
diff --git a/communication/PduR/PduR_Test.c b/communication/PduR/PduR_Test.c
deleted file mode 100644 (file)
index 702f633..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -------------------------------- 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
diff --git a/communication/PduR/PduR_Test.h b/communication/PduR/PduR_Test.h
deleted file mode 100644 (file)
index 14f54f7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -------------------------------- 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
index 4f900172130d6126dd64e27f7f433f6c87c64800..dfec87413d8d1a77329bbc150a388dfa21ebf972 100644 (file)
@@ -165,7 +165,7 @@ typedef struct {
        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
@@ -233,7 +233,7 @@ typedef struct {
        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.
index fdc474965330f25e901137e6c6c15d984d2942fd..c0ea13038df4a40b27cbbc5fd299122706a9dbd9 100644 (file)
 
 #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"
@@ -67,46 +64,7 @@ PduR_StateType PduRState;
 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)
@@ -153,7 +111,7 @@ void PduR_ChangeParameterRequest(PduR_ParameterValueType PduParameterValue,
 #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();