1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
6 * This source code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by the
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * -------------------------------- Arctic Core ------------------------------*/
26 #include "Std_Types.h"
\r
27 #include "LinIf_Cfg.h"
\r
28 #include "LinIf_Types.h"
\r
29 #include "ComStack_Types.h"
\r
30 #include "ComM_Types.h"
\r
32 #if (LINIF_VERSION_INFO_API == STD_ON)
\r
34 #define LINIF_SW_MAJOR_VERSION 1
\r
35 #define LINIF_SW_MINOR_VERSION 0
\r
36 #define LINIF_SW_PATCH_VERSION 0
\r
37 #define LINIF_AR_MAJOR_VERSION 2
\r
38 #define LINIF_AR_MINOR_VERSION 0
\r
39 #define LINIF_AR_PATCH_VERSION 1
\r
41 /* --- Service IDs --- */
\r
42 #define LINIF_INIT_SERVICE_ID 0x00
\r
43 #define LINIF_GETVERSIONINFO_SERVICE_ID 0x03
\r
44 #define LINIF_SCHEDULEREQUEST_SERVICE_ID 0x05
\r
45 #define LINIF_GOTOSLEEP_SERVICE_ID 0x06
\r
46 #define LINIF_WAKEUP_SERVICE_ID 0x07
\r
47 #define LINIF_MAINFUNCTION_SERVICE_ID 0x80
\r
49 /* --- Error codes --- */
\r
50 #define LINIF_E_UNINIT 0x00
\r
51 #define LINIF_E_ALREADY_INITIALIZED 0x10
\r
52 #define LINIF_E_NONEXISTENT_CHANNEL 0x20
\r
53 #define LINIF_E_PARAMETER 0x30
\r
54 #define LINIF_E_PARAMETER_POINTER 0x40
\r
55 #define LINIF_E_SCHEDULE_OVERFLOW 0x50
\r
56 #define LINIF_E_SCHEDULE_REQUEST_ERROR 0x51
\r
57 #define LINIF_E_RESPONSE 0x52 //Assigned
\r
58 #define LINIF_E_NC_NO_RESPONSE 0x53 //Assigned by DEM
\r
59 #define LINIF_E_CHANNEL_X_SLAVE_Y 0x54 //Assigned by DEM
\r
61 void LinIf_GetVersionInfo( Std_VersionInfoType *versionInfo );
\r
62 #define LinIf_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,LINIF)
\r
65 void LinIf_Init( const void* ConfigPtr );
\r
67 void LinIf_DeInit();
\r
69 Std_ReturnType LinIf_Transmit(PduIdType LinTxPduId,const PduInfoType* PduInfoPtr);
\r
71 Std_ReturnType LinIf_ScheduleRequest(NetworkHandleType Channel,LinIf_SchHandleType Schedule);
\r
73 Std_ReturnType LinIf_GotoSleep(NetworkHandleType Channel);
\r
75 Std_ReturnType LinIf_WakeUp(NetworkHandleType Channel);
\r
77 void LinIf_MainFunction();
\r