summaryrefslogtreecommitdiffstats
path: root/K2LABI/IPC/Ipc.h
diff options
context:
space:
mode:
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