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
17 * General requirements
\r
19 /** @req CANTP160 */
\r
22 * Definitions generated by tools
24 /** @req CANTP239 */
\r
25 /** @req CANTP242 */
\r
27 //lint -save -e451 //PC-Lint Wrong interpretation, "Platform_Types.h included twice without a standard include guard."
\r
29 #ifndef CANTP_TYPES_H_
\r
30 #define CANTP_TYPES_H_
\r
32 #include "Platform_Types.h"
\r
33 #include "ComStack_Types.h"
\r
35 // - - - - - - - - - - -
\r
38 CANTP_NOT_LAST_ENTRY, CANTP_END_OF_LIST
\r
39 } CanTp_ListItemType;
\r
43 CANTP_EXTENDED, CANTP_STANDARD
\r
44 } CanTp_AddressingFormantType;
\r
52 CANTP_RX_PROCESSING,
\r
55 } CanTp_TransferInstanceMode;
\r
59 CANTP_FUNCTIONAL, CANTP_PHYSICAL
\r
64 uint32 CanTpNSa; /** @req CANTP254 */
\r
65 } CanTp_NSaType; /** @req CANTP253 */
\r
68 uint32 CanTpNTa; /** @req CANTP255 */ /* TODO John: Why is this 32-bit */
\r
69 } CanTp_NTaType; /** @req CANTP139 */
\r
72 const uint32 CanTpRxNPduId; /** @req CANTP258 */
\r
73 const uint32 CanTpRxNPduRef; /** @req CANTP257 */
\r
74 } CanTp_RxNPduType; /** @req CANTP256 */
\r
77 const uint32 CanTpTxNPduId; /* TODO: Remove this? */
\r
78 const uint32 CanTpTxNPduRef; /** @req CANTP275 */
\r
79 } CanTp_TxNPduType; /** @req CANTP274 */
\r
82 const uint32 CanTpTxFcNPduRef; /** @req CANTP260 */ /* Reference to a PDU in the COM stack. */
\r
83 } CanTp_TxFcNPduType; /** @req CANTP259 */
\r
86 const uint32 CanTpRxFcNPduRef; /** @req CANTP272 */ /* Reference to a PDU in the COM stack. */
\r
87 const uint32 CanTpRxFcNPduId; /** @req CANTP273 */
\r
88 } CanTp_RxFcNPduType; /** @req CANTP271 */
\r
92 const PduIdType CanTp_FcPduId; // When recieving this Pdu this conf can be used (if TA match in extended).
\r
93 const PduIdType CanIf_FcPduId; // The polite CanIf PDU index.
\r
94 const PduIdType PduR_PduId; // The polite PduR index.
\r
95 const CanTp_AddressingFormantType CanTpAddressingFormant; /** @req CANTP242 */
\r
96 const uint8 CanTpBs; /** @req CANTP243 */ /* Sets the maximum number of messages of N-PDUs before flow control. */
\r
97 const uint16 CanTpNar; /** @req CANTP244 */ /* Timeout for transmission of a CAN frame (ms). */
\r
98 const uint16 CanTpNbr; /** @req CANTP245 */
\r
99 const uint16 CanTpNcr; /** @req CANTP246 */ /* Time out for consecutive frames (ms). */
\r
100 const uint8 CanTpRxChannel; /** @req CANTP247 */ /* Connection to runtime variable index, see CanTp 266. */
\r
101 const uint16 CanTpRxDI; /** @req CANTP248 */ /* Data length code for of this RxNsdu. */
\r
102 CanTp_StateType CanTpRxPaddingActivation; /** @req CANTP249 */ /* Enable use of padding. */
\r
103 CanTp_TaTypeType CanTpRxTaType; /** @req CANTP250 */ /* Functional or physical addressing. */
\r
104 const uint8 CanTpWftMax; /** @req CANTP251 */ /* Max number FC wait that can be transmitted consecutively. */
\r
105 const uint16 CanTpSTmin; /** @req CANTP252 */ /* Minimum time the sender shall wait between transmissions of two N-PDU. */
\r
106 /*const uint32 CanTpNSduRef ** req: CanTp241. This is PDU id - typeless enum. */
\r
107 const CanTp_NSaType *CanTpNSa;
\r
108 const CanTp_NTaType *CanTpNTa;
\r
109 //CanTp_RxNPduType *CanTpRxNPdu;
\r
110 //CanTp_TxFcNPduType *CanTpTxFcNPdu;
\r
111 //const PduIdType CanTpRxPduId;
\r
113 } CanTp_RxNSduType; /** @req CANTP137 */
\r
116 const PduIdType CanIf_PduId; // The polite CanIf index.
\r
117 const PduIdType PduR_PduId; // The polite PduR index.
\r
118 const PduIdType CanTp_FcPduId;
\r
119 const CanTp_AddressingFormantType CanTpAddressingMode; /** @req CANTP262 */
\r
120 const uint16 CanTpNas; /** @req CANTP263 */ /* N_As timeout for transmission of any CAN frame. */
\r
121 const uint16 CanTpNbs; /** @req CANTP264 */ /* N_Bs timeout of transmission until reception of next Flow Control. */
\r
122 const uint16 CanTpNcs; /** @req CANTP265 */ /* N_Bs timeout of transmission until reception of next Flow Control. */
\r
123 const uint8 CanTpTxChannel; /** @req CANTP266 */ /* Link to the TX connection channel (why?). */
\r
124 const uint16 CanTpTxDI; /** @req CANTP267 */ /* Data length code for of this TxNsdu. */
\r
125 /*const uint32 CanTpTxNSduId; / ** req: CanTp268: Data length code for of this TxNsdu. */
\r
126 CanTp_StateType CanTpTxPaddingActivation; /** @req CANTP269 */ /* Enable use of padding. */
\r
127 CanTp_TaTypeType CanTpTxTaType; /** @req CANTP270 */ /* Functional or physical addressing. */
\r
128 /*const uint32 CanTpNSduRef ** req: CanTp261. This is PDU id - typeless enum. */
\r
129 const CanTp_NSaType *CanTpNSa;
\r
130 const CanTp_NTaType *CanTpNTa;
\r
131 //CanTp_RxFcNPduType *CanTpRxFcNPdu;
\r
132 //CanTp_TxNPduType *CanTpTxNPdu;
\r
133 //PduIdType CanTpTxPduId;
\r
135 } CanTp_TxNSduType; /** @req CANTP138 */
\r
137 // - - - - - - - - - - -
\r
140 uint32 main_function_period; /** @req CANTP240 */
\r
141 } CanTp_GeneralType; /** @req CANTP238 */
\r
143 // - - - - - - - - - - -
\r
146 IS015765_TRANSMIT, ISO15765_RECEIVE
\r
147 } CanTp_DirectionType;
\r
150 // - - - - - - - - - - -
\r
153 const CanTp_DirectionType direction;
\r
154 const CanTp_ListItemType listItemType;
\r
156 const CanTp_RxNSduType CanTpRxNSdu;
\r
157 const CanTp_TxNSduType CanTpTxNSdu;
\r
162 const CanTp_AddressingFormantType CanTpAddressingMode;
\r
163 const PduIdType CanTpNSduIndex;
\r
164 const PduIdType CanTpReferringTxIndex;
\r
167 // - - - - - - - - - - -
\r
169 /** Top level config container for CANTP implementation. */
\r
171 /** General configuration paramters for the CANTP module. */
\r
172 const CanTp_GeneralType *CanTpGeneral; // 10.2.3
\r
175 const CanTp_NSduType *CanTpNSduList;
\r
177 const CanTp_RxIdType *CanTpRxIdList;
\r
180 //const CanTp_RxNSduType *CanTpRxNSduList;
\r
182 /** This container contains the init parameters of the CAN Interface. */
\r
183 //const CanTp_TxNSduType *CanTpTxNSduList;
\r
185 } CanTp_ConfigType;
\r
187 #endif /* CANTP_TYPES_H_ */
\r