From 860b3c0ccfb2756b8ed77523048952011b74a212 Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Tue, 21 Jun 2016 14:14:04 +0200 Subject: src: can-lin: initial source import This patch adds the sources needed for the HVAC and iDrive applications. Change-Id: I53148a5d11c34787dd11295939bbaf8702c64dcb Signed-off-by: Christian Gromm --- K2LABI/IPC/Ipc.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 K2LABI/IPC/Ipc.h (limited to 'K2LABI/IPC/Ipc.h') diff --git a/K2LABI/IPC/Ipc.h b/K2LABI/IPC/Ipc.h new file mode 100644 index 0000000..1775ebf --- /dev/null +++ b/K2LABI/IPC/Ipc.h @@ -0,0 +1,29 @@ +#pragma once +#include "K2LIPC.h" +#include "SLock.h" + +using namespace K2L::Automotive::IPC; + +class CIpc : public IIpc +{ +public: + CIpc(); + virtual ~CIpc(); + + int Init(IIPCListener* pListener); + int Deinit(); + int FormatRequest(BYTE channel, BYTE ifaceId, BYTE funId, DWORD dwSenderID, const BYTE *pData, DWORD dataLen, BYTE* pResult, int nResultLen, int* nResultLenNeeded); + IIPCListener* GetListener(); + void OnPacket(CIpcPacket* pPacket); + void Decode(BYTE* pBuffer, DWORD nLen); + IIPCListener* CreateListener(FCT_OnMessageEvent callback, FCT_OnEvent error, FCT_OnEvent overflow); + void DestroyListener(); + +private: + CIPCFlowDecoder* m_pFlowDecoder; + BYTE* m_pResultBuffer; + int m_nResultLen; + int m_errorCode; + IIPCListener* m_pIpcListener; + CLock m_lock; +}; \ No newline at end of file -- cgit 1.2.3-korg