blob: 85b3df0886b12387b0569fef14e0ba0b166b4fd1 [file] [log] [blame]
Daniel Krueger9d7164c2008-12-19 11:41:57 -08001/****************************************************************************
2
3 (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
4 www.systec-electronic.com
5
6 Project: openPOWERLINK
7
8 Description: source file for communication abstraction layer
9 for the Epl-Obd-Userspace-Modul
10
11 License:
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions
15 are met:
16
17 1. Redistributions of source code must retain the above copyright
18 notice, this list of conditions and the following disclaimer.
19
20 2. Redistributions in binary form must reproduce the above copyright
21 notice, this list of conditions and the following disclaimer in the
22 documentation and/or other materials provided with the distribution.
23
24 3. Neither the name of SYSTEC electronic GmbH nor the names of its
25 contributors may be used to endorse or promote products derived
26 from this software without prior written permission. For written
27 permission, please contact info@systec-electronic.com.
28
29 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
32 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
33 COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
34 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
39 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 POSSIBILITY OF SUCH DAMAGE.
41
42 Severability Clause:
43
44 If a provision of this License is or becomes illegal, invalid or
45 unenforceable in any jurisdiction, that shall not affect:
46 1. the validity or enforceability in that jurisdiction of any other
47 provision of this License; or
48 2. the validity or enforceability in other jurisdictions of that or
49 any other provision of this License.
50
51 -------------------------------------------------------------------------
52
53 $RCSfile: EplObduCal.c,v $
54
55 $Author: D.Krueger $
56
57 $Revision: 1.6 $ $Date: 2008/10/17 15:32:32 $
58
59 $State: Exp $
60
61 Build Environment:
62 GCC V3.4
63
64 -------------------------------------------------------------------------
65
66 Revision History:
67
68 2006/06/19 k.t.: start of the implementation
69
70****************************************************************************/
71#include "EplInc.h"
72#include "user/EplObduCal.h"
73#include "kernel/EplObdk.h"
74
75#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDU)) != 0) && (EPL_OBD_USE_KERNEL != FALSE)
76
Daniel Krueger9d7164c2008-12-19 11:41:57 -080077/***************************************************************************/
78/* */
79/* */
80/* G L O B A L D E F I N I T I O N S */
81/* */
82/* */
83/***************************************************************************/
84
85//---------------------------------------------------------------------------
86// const defines
87//---------------------------------------------------------------------------
88
89//---------------------------------------------------------------------------
90// local types
91//---------------------------------------------------------------------------
92
93//---------------------------------------------------------------------------
94// modul globale vars
95//---------------------------------------------------------------------------
96
97//---------------------------------------------------------------------------
98// local function prototypes
99//---------------------------------------------------------------------------
100
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800101//=========================================================================//
102// //
103// P U B L I C F U N C T I O N S //
104// //
105//=========================================================================//
106
107//---------------------------------------------------------------------------
108//
109// Function: EplObduCalWriteEntry()
110//
111// Description: Function encapsulate access of function EplObdWriteEntry
112//
113// Parameters: uiIndex_p = Index of the OD entry
114// uiSubIndex_p = Subindex of the OD Entry
115// pSrcData_p = Pointer to the data to write
116// Size_p = Size of the data in Byte
117//
118// Return: tEplKernel = Errorcode
119//
120//
121// State:
122//
123//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800124EPLDLLEXPORT tEplKernel PUBLIC EplObduCalWriteEntry(unsigned int uiIndex_p,
125 unsigned int uiSubIndex_p,
126 void *pSrcData_p,
127 tEplObdSize Size_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800128{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800129 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800130
131#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800132 Ret = EplObdWriteEntry(uiIndex_p, uiSubIndex_p, pSrcData_p, Size_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800133#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800134 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800135#endif
136
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800137 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800138}
139
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800140//---------------------------------------------------------------------------
141//
142// Function: EplObduCalReadEntry()
143//
144// Description: Function encapsulate access of function EplObdReadEntry
145//
146// Parameters: uiIndex_p = Index oof the OD entry to read
147// uiSubIndex_p = Subindex to read
148// pDstData_p = pointer to the buffer for data
149// Offset_p = offset in data for read access
150// pSize_p = IN: Size of the buffer
151// OUT: number of readed Bytes
152//
153// Return: tEplKernel = errorcode
154//
155// State:
156//
157//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800158EPLDLLEXPORT tEplKernel PUBLIC EplObduCalReadEntry(unsigned int uiIndex_p,
159 unsigned int uiSubIndex_p,
160 void *pDstData_p,
161 tEplObdSize * pSize_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800162{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800163 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800164
165#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800166 Ret = EplObdReadEntry(uiIndex_p, uiSubIndex_p, pDstData_p, pSize_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800167#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800168 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800169#endif
170
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800171 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800172}
173
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800174//---------------------------------------------------------------------------
175//
176// Function: EplObduCalAccessOdPart()
177//
178// Description: Function encapsulate access of function EplObdAccessOdPart
179//
180// Parameters: ObdPart_p = od-part to reset
181// Direction_p = directory flag for
182//
183// Return: tEplKernel = errorcode
184//
185// State:
186//
187//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800188EPLDLLEXPORT tEplKernel PUBLIC EplObduCalAccessOdPart(tEplObdPart ObdPart_p,
189 tEplObdDir Direction_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800190{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800191 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800192
193#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800194 Ret = EplObdAccessOdPart(ObdPart_p, Direction_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800195#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800196 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800197#endif
198
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800199 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800200}
201
202//---------------------------------------------------------------------------
203//
204// Function: EplObduCalDefineVar()
205//
206// Description: Function encapsulate access of function EplObdDefineVar
207//
208// Parameters: pEplVarParam_p = varentry
209//
210// Return: tEplKernel = errorcode
211//
212// State:
213//
214//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800215EPLDLLEXPORT tEplKernel PUBLIC EplObduCalDefineVar(tEplVarParam MEM *
216 pVarParam_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800217{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800218 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800219
220#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800221 Ret = EplObdDefineVar(pVarParam_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800222#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800223 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800224#endif
225
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800226 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800227}
228
229//---------------------------------------------------------------------------
230//
231// Function: EplObduCalGetObjectDataPtr()
232//
233// Description: Function encapsulate access of function EplObdGetObjectDataPtr
234//
235// Parameters: uiIndex_p = Index of the entry
236// uiSubindex_p = Subindex of the entry
237//
238// Return: void * = pointer to object data
239//
240// State:
241//
242//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800243EPLDLLEXPORT void *PUBLIC EplObduCalGetObjectDataPtr(unsigned int uiIndex_p,
244 unsigned int uiSubIndex_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800245{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800246 void *pData;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800247
248#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800249 pData = EplObdGetObjectDataPtr(uiIndex_p, uiSubIndex_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800250#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800251 pData = NULL;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800252#endif
253
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800254 return pData;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800255}
256
257//---------------------------------------------------------------------------
258//
259// Function: EplObduCalRegisterUserOd()
260//
261// Description: Function encapsulate access of function EplObdRegisterUserOd
262//
263// Parameters: pUserOd_p = pointer to user OD
264//
265// Return: tEplKernel = errorcode
266//
267// State:
268//
269//---------------------------------------------------------------------------
270#if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE))
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800271EPLDLLEXPORT tEplKernel PUBLIC EplObduCalRegisterUserOd(tEplObdEntryPtr
272 pUserOd_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800273{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800274 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800275
276#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800277 Ret = EplObdRegisterUserOd(pUserOd_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800278#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800279 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800280#endif
281
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800282 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800283
284}
285#endif
286//---------------------------------------------------------------------------
287//
288// Function: EplObduCalInitVarEntry()
289//
290// Description: Function encapsulate access of function EplObdInitVarEntry
291//
292// Parameters: pVarEntry_p = pointer to var entry structure
293// bType_p = object type
294// ObdSize_p = size of object data
295//
296// Returns: none
297//
298// State:
299//
300//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800301EPLDLLEXPORT void PUBLIC EplObduCalInitVarEntry(tEplObdVarEntry MEM *
302 pVarEntry_p, BYTE bType_p,
303 tEplObdSize ObdSize_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800304{
305#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800306 EplObdInitVarEntry(pVarEntry_p, bType_p, ObdSize_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800307#endif
308}
309
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800310//---------------------------------------------------------------------------
311//
312// Function: EplObduCalGetDataSize()
313//
314// Description: Function encapsulate access of function EplObdGetDataSize
315//
316// gets the data size of an object
317// for string objects it returnes the string length
318//
319// Parameters: uiIndex_p = Index
320// uiSubIndex_p= Subindex
321//
322// Return: tEplObdSize
323//
324// State:
325//
326//---------------------------------------------------------------------------
327EPLDLLEXPORT tEplObdSize PUBLIC EplObduCalGetDataSize(unsigned int uiIndex_p,
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800328 unsigned int uiSubIndex_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800329{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800330 tEplObdSize Size;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800331
332#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800333 Size = EplObdGetDataSize(uiIndex_p, uiSubIndex_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800334#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800335 Size = 0;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800336#endif
337
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800338 return Size;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800339}
340
341//---------------------------------------------------------------------------
342//
343// Function: EplObduCalGetNodeId()
344//
345// Description: Function encapsulate access of function EplObdGetNodeId
346//
347//
348// Parameters:
349//
350// Return: unsigned int = Node Id
351//
352// State:
353//
354//---------------------------------------------------------------------------
355EPLDLLEXPORT unsigned int PUBLIC EplObduCalGetNodeId()
356{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800357 unsigned int uiNodeId;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800358
359#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800360 uiNodeId = EplObdGetNodeId();
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800361#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800362 uiNodeId = 0;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800363#endif
364
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800365 return uiNodeId;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800366}
367
368//---------------------------------------------------------------------------
369//
370// Function: EplObduCalSetNodeId()
371//
372// Description: Function encapsulate access of function EplObdSetNodeId
373//
374//
375// Parameters: uiNodeId_p = Node Id to set
376// NodeIdType_p= Type on which way the Node Id was set
377//
378// Return: tEplKernel = Errorcode
379//
380// State:
381//
382//---------------------------------------------------------------------------
383EPLDLLEXPORT tEplKernel PUBLIC EplObduCalSetNodeId(unsigned int uiNodeId_p,
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800384 tEplObdNodeIdType
385 NodeIdType_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800386{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800387 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800388
389#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800390 Ret = EplObdSetNodeId(uiNodeId_p, NodeIdType_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800391#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800392 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800393#endif
394
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800395 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800396}
397
398//---------------------------------------------------------------------------
399//
400// Function: EplObduCalGetAccessType()
401//
402// Description: Function encapsulate access of function EplObdGetAccessType
403//
404// Parameters: uiIndex_p = Index of the OD entry
405// uiSubIndex_p = Subindex of the OD Entry
406// pAccessTyp_p = pointer to buffer to store accesstype
407//
408// Return: tEplKernel = errorcode
409//
410//
411// State:
412//
413//---------------------------------------------------------------------------
414EPLDLLEXPORT tEplKernel PUBLIC EplObduCalGetAccessType(unsigned int uiIndex_p,
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800415 unsigned int
416 uiSubIndex_p,
417 tEplObdAccess *
418 pAccessTyp_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800419{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800420 tEplObdAccess AccesType;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800421
422#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800423 AccesType = EplObdGetAccessType(uiIndex_p, uiSubIndex_p, pAccessTyp_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800424#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800425 AccesType = 0;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800426#endif
427
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800428 return AccesType;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800429
430}
431
432//---------------------------------------------------------------------------
433//
434// Function: EplObduCalReadEntryToLe()
435//
436// Description: Function encapsulate access of function EplObdReadEntryToLe
437//
438// Parameters: uiIndex_p = Index of the OD entry to read
439// uiSubIndex_p = Subindex to read
440// pDstData_p = pointer to the buffer for data
441// Offset_p = offset in data for read access
442// pSize_p = IN: Size of the buffer
443// OUT: number of readed Bytes
444//
445// Return: tEplKernel
446//
447// State:
448//
449//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800450EPLDLLEXPORT tEplKernel PUBLIC EplObduCalReadEntryToLe(unsigned int uiIndex_p,
451 unsigned int
452 uiSubIndex_p,
453 void *pDstData_p,
454 tEplObdSize * pSize_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800455{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800456 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800457
458#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800459 Ret = EplObdReadEntryToLe(uiIndex_p, uiSubIndex_p, pDstData_p, pSize_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800460#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800461 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800462#endif
463
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800464 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800465}
466
467//---------------------------------------------------------------------------
468//
469// Function: EplObduCalWriteEntryFromLe()
470//
471// Description: Function encapsulate access of function EplObdWriteEntryFromLe
472//
473// Parameters: uiIndex_p = Index of the OD entry
474// uiSubIndex_p = Subindex of the OD Entry
475// pSrcData_p = Pointer to the data to write
476// Size_p = Size of the data in Byte
477//
478// Return: tEplKernel = Errorcode
479//
480//
481// State:
482//
483//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800484EPLDLLEXPORT tEplKernel PUBLIC EplObduCalWriteEntryFromLe(unsigned int
485 uiIndex_p,
486 unsigned int
487 uiSubIndex_p,
488 void *pSrcData_p,
489 tEplObdSize Size_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800490{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800491 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800492
493#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800494 Ret =
495 EplObdWriteEntryFromLe(uiIndex_p, uiSubIndex_p, pSrcData_p, Size_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800496#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800497 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800498#endif
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800499 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800500}
501
502//---------------------------------------------------------------------------
503//
504// Function: EplObduCalSearchVarEntry()
505//
506// Description: gets variable from OD
507//
508// Parameters: uiIndex_p = index of the var entry to search
509// uiSubindex_p = subindex of var entry to search
510// ppVarEntry_p = pointer to the pointer to the varentry
511//
512// Return: tEplKernel
513//
514// State:
515//
516//---------------------------------------------------------------------------
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800517EPLDLLEXPORT tEplKernel PUBLIC
518EplObduCalSearchVarEntry(EPL_MCO_DECL_INSTANCE_PTR_ unsigned int uiIndex_p,
519 unsigned int uiSubindex_p,
520 tEplObdVarEntry MEM ** ppVarEntry_p)
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800521{
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800522 tEplKernel Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800523
524#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800525 Ret = EplObdSearchVarEntry(uiIndex_p, uiSubindex_p, ppVarEntry_p);
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800526#else
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800527 Ret = kEplSuccessful;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800528#endif
Greg Kroah-Hartman833dfbe2008-12-19 17:11:52 -0800529 return Ret;
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800530}
531
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800532//=========================================================================//
533// //
534// P R I V A T E F U N C T I O N S //
535// //
536//=========================================================================//
537
538//---------------------------------------------------------------------------
539//
540// Function:
541//
542// Description:
543//
544//
545//
546// Parameters:
547//
548//
549// Returns:
550//
551//
552// State:
553//
554//---------------------------------------------------------------------------
555
556#endif //(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDU)) != 0)
557
Daniel Krueger9d7164c2008-12-19 11:41:57 -0800558// EOF