summaryrefslogtreecommitdiffstats
path: root/K2LABI/IPC/Ipc.h
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-06-21 14:14:04 +0200
committerChristian Gromm <christian.gromm@microchip.com>2016-06-21 14:14:04 +0200
commit860b3c0ccfb2756b8ed77523048952011b74a212 (patch)
treee0672fb5cf923dcf0a4a48a62a69011e1b72976a /K2LABI/IPC/Ipc.h
parent742bace60b9c0a0f583d8afe1097d029f468fa03 (diff)
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 <christian.gromm@microchip.com>
Diffstat (limited to 'K2LABI/IPC/Ipc.h')
-rw-r--r--K2LABI/IPC/Ipc.h29
1 files changed, 29 insertions, 0 deletions
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