]> rtime.felk.cvut.cz Git - arc.git/blob - include/J1939Tp.h
Correct Vendor id for all modules and upstep to AR3.1.5
[arc.git] / include / J1939Tp.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\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
9  *\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
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 /** Global requirements */\r
17 /** @req J1939TP0005*/\r
18 \r
19 #ifndef J1939TP_H_\r
20 #define J1939TP_H_\r
21 \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
27 #include "CanIf.h"\r
28 #include "Modules.h"\r
29 \r
30 \r
31 #define J1939TP_VENDOR_ID                       VENDOR_ID_ARCCORE\r
32 #define J1939TP_MODULE_ID                       MODULE_ID_J1939TP\r
33 \r
34 #define J1939TP_AR_MAJOR_VERSION        4\r
35 #define J1939TP_AR_MINOR_VERSION        0\r
36 #define J1939TP_AR_PATCH_VERSION        2\r
37 \r
38 #define J1939TP_SW_MAJOR_VERSION        1\r
39 #define J1939TP_SW_MINOR_VERSION        0\r
40 #define J1939TP_SW_PATCH_VERSION        0\r
41 \r
42 #include "J1939Tp_Cfg.h"\r
43 \r
44 typedef int TPParameterType;\r
45 \r
46 #if (J1939TP_VERSION_INFO_API == STD_ON)\r
47 #define J1939TP_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,J1939TP)\r
48 #endif\r
49 \r
50 /** Initializes the module */\r
51 void J1939Tp_Init(const J1939Tp_ConfigType* ConfigPtr);\r
52 \r
53 /** Close down communication, usually called by EcuM */\r
54 void J1939Tp_Shutdown(void);\r
55 \r
56 /** Returns the version info of J1939Tp */\r
57 void J1939Tp_GetVersionInfo(Std_VersionInfoType* VersionInfo);\r
58 \r
59 /** Used to request the transfer of a J1939Tp N-SDU*/\r
60 Std_ReturnType J1939Tp_Transmit(PduIdType TxSduId, const PduInfoType* TxInfoPtr);\r
61 \r
62 /** Used to cancel the ongoing transmission of a J1939Tp N-SDU */\r
63 Std_ReturnType J1939Tp_CancelTransmitRequest(PduIdType TxSduId);\r
64 \r
65 /** Used to cancel the ongoing reception of a J1939Tp N-SDU */\r
66 Std_ReturnType J1939Tp_CancelReceiveRequest(PduIdType RxSduId);\r
67 \r
68 /** Used to change reception or transmission parameters of J1939Tp for a specific N-SDU */\r
69 Std_ReturnType J1939Tp_ChangeParameterRequest(PduIdType SduId, TPParameterType Parameter, uint16 value);\r
70 \r
71 /** Main function, used for scheduling purpose and timeout supervision */\r
72 void J1939Tp_MainFunction(void);\r
73 \r
74 #endif\r