]> rtime.felk.cvut.cz Git - arc.git/blob - include/Com.h
EcuM_Main, fix for non-ppc.
[arc.git] / include / Com.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 \r
17 \r
18 \r
19 \r
20 \r
21 \r
22 \r
23 #ifndef COM_H_\r
24 #define COM_H_\r
25 \r
26 #include "Std_Types.h"\r
27 #include "ComStack_Types.h"\r
28 \r
29 \r
30 #define COM_SW_MAJOR_VERSION   1\r
31 #define COM_SW_MINOR_VERSION   2\r
32 #define COM_SW_PATCH_VERSION   0\r
33 \r
34 #include "Com_Cfg.h"\r
35 #include "Com_Types.h"\r
36 #include "Com_PbCfg.h"\r
37 //#include "Com_Internal.h" //TODO: Remove completely?\r
38 #include "Com_Com.h"\r
39 #include "Com_Sched.h"\r
40 \r
41 //-------------------------------------------------------------------\r
42 // From OSEK_VDX spec...\r
43 //\r
44 //typedef uint32 MessageIdentifier;\r
45 // TODO: Have no idea here..\r
46 //typedef void * ApplicationDataRef;\r
47 \r
48 \r
49 \r
50 \r
51 \r
52 \r
53 //-------------------------------------------------------------------\r
54 \r
55 // From OSEK_VDX\r
56 \r
57 /* The service SendMessage updates the message object identified by\r
58  * <Message> with the application message referenced by the\r
59  * <DataRef> parameter.\r
60  *\r
61  * Internal communication:\r
62  * The message <Message> is routed to the receiving part of the IL.\r
63   */\r
64 // Update 2008-10-30, SendMessage and ReceiveMessage should not be required. ensured by RTE. COM013\r
65 //StatusType SendMessage(MessageIdentifier , ApplicationDataRef );\r
66 \r
67 // The service  ReceiveMessage updates the application message\r
68 // referenced by <DataRef> with the data in the message object\r
69 // identified by <Message>. It resets all flags (Notification classes 1 and\r
70 // 3) associated with <Message>.\r
71 //StatusType ReceiveMessage ( MessageIdentifier , ApplicationDataRef );\r
72 \r
73 \r
74 // From Autosar\r
75 void Com_Init(const Com_ConfigType * config);\r
76 void Com_DeInit(void);\r
77 \r
78 void Com_IpduGroupStart(Com_PduGroupIdType IpduGroupId, boolean Initialize);\r
79 void Com_IpduGroupStop(Com_PduGroupIdType IpduGroupId);\r
80 \r
81 /* Autosar 4 api */\r
82 BufReq_ReturnType Com_CopyTxData(PduIdType PduId, PduInfoType* PduInfoPtr, RetryInfoType* RetryInfoPtr, PduLengthType* TxDataCntPtr);\r
83 BufReq_ReturnType Com_CopyRxData(PduIdType PduId, const PduInfoType* PduInfoPtr, PduLengthType* RxBufferSizePtr);\r
84 BufReq_ReturnType Com_StartOfReception(PduIdType ComRxPduId, PduLengthType TpSduLength, PduLengthType* RxBufferSizePtr);\r
85 void Com_TpRxIndication(PduIdType PduId, NotifResultType Result);\r
86 void Com_TpTxConfirmation(PduIdType PduId, NotifResultType Result);\r
87 \r
88 \r
89 extern ComSignalEndianess_type Com_SystemEndianness;\r
90 \r
91 #define COM_BUSY 0x81\r
92 #define COM_SERVICE_NOT_AVAILABLE 0x80\r
93 #endif /*COM_H_*/\r