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
16 /** Global requirements */
\r
17 /** @req J1939TP0005*/
\r
22 #include "Std_Types.h"
\r
23 /** @req J1939TP0016 */
\r
24 #include "ComStack_Types.h"
\r
25 #include "J1939Tp_ConfigTypes.h"
\r
26 /** @req J1939TP0009 */
\r
30 #define J1939TP_VENDOR_ID 1
\r
31 #define J1939TP_MODULE_ID MODULE_ID_J1939TP
\r
33 #define J1939TP_AR_MAJOR_VERSION 1
\r
34 #define J1939TP_AR_MINOR_VERSION 0
\r
35 #define J1939TP_AR_PATCH_VERSION 0
\r
37 #define J1939TP_SW_MAJOR_VERSION 1
\r
38 #define J1939TP_SW_MINOR_VERSION 0
\r
39 #define J1939TP_SW_PATCH_VERSION 0
\r
41 #include "J1939Tp_Cfg.h"
\r
43 typedef int TPParameterType;
\r
45 #if (J1939TP_VERSION_INFO_API == STD_ON)
\r
46 #define J1939TP_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,J1939TP)
\r
49 /** Initializes the module */
\r
50 void J1939Tp_Init(const J1939Tp_ConfigType* ConfigPtr);
\r
52 /** Close down communication, usually called by EcuM */
\r
53 void J1939Tp_Shutdown(void);
\r
55 /** Returns the version info of J1939Tp */
\r
56 void J1939Tp_GetVersionInfo(Std_VersionInfoType* VersionInfo);
\r
58 /** Used to request the transfer of a J1939Tp N-SDU*/
\r
59 Std_ReturnType J1939Tp_Transmit(PduIdType TxSduId, const PduInfoType* TxInfoPtr);
\r
61 /** Used to cancel the ongoing transmission of a J1939Tp N-SDU */
\r
62 Std_ReturnType J1939Tp_CancelTransmitRequest(PduIdType TxSduId);
\r
64 /** Used to cancel the ongoing reception of a J1939Tp N-SDU */
\r
65 Std_ReturnType J1939Tp_CancelReceiveRequest(PduIdType RxSduId);
\r
67 /** Used to change reception or transmission parameters of J1939Tp for a specific N-SDU */
\r
68 Std_ReturnType J1939Tp_ChangeParameterRequest(PduIdType SduId, TPParameterType Parameter, uint16 value);
\r
70 /** Main function, used for scheduling purpose and timeout supervision */
\r
71 void J1939Tp_MainFunction(void);
\r