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 #ifndef COMSTACK_TYPES_H_
\r
24 #define COMSTACK_TYPES_H_
\r
26 #define ECUC_SW_MAJOR_VERSION 1
\r
27 #define ECUC_SW_MINOR_VERSION 0
\r
28 #define ECUC_SW_PATCH_VERSION 0
\r
30 #include "Std_Types.h"
\r
33 // Zero-based integer number
\r
34 // The size of this global type depends on the maximum
\r
35 // number of PDUs used within one software module.
\r
37 // If no software module deals with more PDUs that
\r
38 // 256, this type can be set to uint8.
\r
39 // If at least one software module handles more than
\r
40 // 256 PDUs, this type must globally be set to uint16.
\r
42 // In order to be able to perform table-indexing within a software
\r
43 // module, variables of this type shall be zero-based and consecutive.
\r
44 // There might be several ranges of PduIds in a module, one for each type of
\r
45 // operation performed within that module (e.g. sending and receiving).
\r
47 typedef uint16 PduIdType;
\r
48 typedef uint16 PduLengthType;
\r
50 uint8 *SduDataPtr; // payload
\r
51 PduLengthType SduLength; // length of SDU
\r
62 TpDataStateType TpDataState;
\r
63 PduLengthType TxTpDataCnt;
\r
68 P2VAR(uint8,AUTOMATIC,AUTOSAR_COMSTACKDATA) SduDataPtr
\r
69 PduLengthType SduLength;
\r
78 } BufReq_ReturnType;
\r
80 // 0x00--0x1e General return types
\r
81 // 0x1f--0x3c Error notif, CAN
\r
82 // 0x3d--0x5a Error notif, LIN
\r
84 typedef uint8 NotifResultType;
\r
86 #define NTFRSLT_OK 0x00
\r
87 #define NTFRSLT_E_NOT_OK 0x01
\r
88 #define NTFRSLT_E_CANCELATION_NOT_OK 0x0C
\r
89 #define NTFRSLT_E_WRONG_SN 0x05
\r
90 #define NTFRSLT_E_NO_BUFFER 0x09
\r
95 typedef uint8 BusTrcvErrorType;
\r
98 #define BUSTRCV_NO_ERROR 0x00
\r
99 #define BUSBUSTRCV_E_ERROR 0x01
\r
102 #define COMSTACKTYPE_AR_MINOR_VERSION 1
\r
103 #define COMSTACKTYPE_AR_MAJOR_VERSION 0
\r
104 #define COMSTACKTYPE_AR_PATCH_VERSION 0
\r
106 typedef uint8 NetworkHandleType;
\r
108 #endif /*COMSTACK_TYPES_H_*/
\r