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
23 /** @req CANTP157 */
\r
28 #define CANTP_MODULE_ID MODULE_ID_CANTP /** @req CANTP115 */
\r
29 #define CANTP_VENDOR_ID 1
\r
31 #define CANTP_SW_MAJOR_VERSION 1
\r
32 #define CANTP_SW_MINOR_VERSION 0
\r
33 #define CANTP_SW_PATCH_VERSION 0
\r
34 #define CANTP_AR_MAJOR_VERSION 3
\r
35 #define CANTP_AR_MINOR_VERSION 0
\r
36 #define CANTP_AR_PATCH_VERSION 1
\r
39 #include "ComStack_Types.h"
\r
40 #include "Std_Types.h"
\r
41 #include "CanTp_Cfg.h" /** @req CANTP221 */
\r
46 * Errors described by CanTp 7.4 Error classification.
\r
48 ****************************/
\r
49 /** @req CANTP101 */
\r
50 #define CANTP_E_PARAM_CONFIG 0x01
\r
51 #define CANTP_E_PARAM_ID 0x02
\r
52 #define CANTP_E_PARAM_ADDRESS 0x04
\r
54 #define CANTP_E_UNINIT 0x20
\r
55 #define CANTP_E_INVALID_TX_ID 0x30
\r
56 #define CANTP_E_INVALID_RX_ID 0x40
\r
57 #define CANTP_E_INVALID_TX_BUFFER 0x50
\r
58 #define CANTP_E_INVALID_RX_BUFFER 0x60
\r
59 #define CANTP_E_INVALID_TX_LENGHT 0x70
\r
60 #define CANTP_E_INVALID_RX_LENGTH 0x80
\r
61 #define CANTP_E_INVALID_TATYPE 0x90
\r
64 * Service IDs for CanTP function definitions.
\r
67 #define SERVICE_ID_CANTP_INIT 0x01
\r
68 #define SERVICE_ID_CANTP_GET_VERSION_INFO 0x07
\r
69 #define SERVICE_ID_CANTP_SHUTDOWN 0x02
\r
70 #define SERVICE_ID_CANTP_TRANSMIT 0x03
\r
71 #define SERVICE_ID_CANTP_CANCEL_TRANSMIT_REQUEST 0x03
\r
72 #define SERVICE_ID_CANTP_MAIN_FUNCTION 0x06
\r
73 #define SERVICE_ID_CANTP_RX_INDICATION 0x04
\r
74 #define SERVICE_ID_CANTP_TX_CONFIRMATION 0x05
\r
79 ****************************/
\r
85 } FrTp_CancelReasonType;
\r
90 * Implemented functions
\r
91 ****************************/
\r
93 void CanTp_Init(void); /** @req CANTP208 **/
\r
95 #if ( CANTP_VERSION_INFO_API == STD_ON ) /** @req CANTP162 *//** @req CANTP163 */
\r
96 #define CanTp_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,CANTP) /** @req CANTP210 */ /* @req CANTP218 */
\r
97 #endif /* CANTP_VERSION_INFO_API */
\r
99 void CanTp_Shutdown(void); /** @req CANTP211 */
\r
101 Std_ReturnType CanTp_Transmit( PduIdType CanTpTxSduId, const PduInfoType * CanTpTxInfoPtr ); /** @req CANTP212 */
\r
103 Std_ReturnType FrTp_CancelTransmitRequest( PduIdType FrTpTxPduId, FrTp_CancelReasonType FrTpCancelReason ); /** @req CANTP246 */
\r
105 void CanTp_MainFunction(void); /** @req CANTP213 */
\r
108 #endif /* CANTP_H_ */
\r