summaryrefslogtreecommitdiffstats
path: root/ABI-IPC/abi-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 /ABI-IPC/abi-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 'ABI-IPC/abi-ipc.h')
-rw-r--r--ABI-IPC/abi-ipc.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/ABI-IPC/abi-ipc.h b/ABI-IPC/abi-ipc.h
new file mode 100644
index 0000000..687ed14
--- /dev/null
+++ b/ABI-IPC/abi-ipc.h
@@ -0,0 +1,55 @@
+//
+// abi-ipc.h
+// AmbientLight
+//
+// Created by Thorsten Kummermehr on 10/9/13.
+//
+//
+
+#ifndef AmbientLight_abi_ipc_h
+#define AmbientLight_abi_ipc_h
+
+#include "K2LABI.h"
+
+#include <pthread.h>
+
+namespace K2L
+{
+ namespace Automotive
+ {
+ namespace ABI_IPC
+ {
+
+ class K2LABI_API AbiUsbIpc :
+ public K2L::Automotive::ABI::AbiIpcDevice
+ {
+ public:
+ AbiUsbIpc();
+ virtual
+ ~AbiUsbIpc();
+ virtual bool Connect( const char *cdevRx, const char *cdevTx );
+ virtual bool Connect( const char *cdevRxTx );
+ virtual void Disconnect( void );
+ virtual bool IsConnected();
+ virtual int Send( const BYTE *data, DWORD length );
+ virtual void SetReceivePriority( int prio );
+ virtual void SetReceiveCallback( ABI::AbiIpcDevice_RxCB_t receiveCB, void *cbArg );
+
+ protected:
+ static void *ReceiveThread( void *param );
+
+ bool _isConnected;
+ bool _receiveThreadIsRunning;
+ ABI::AbiIpcDevice_RxCB_t *_receiveCB;
+ void *_receiveCBArgument;
+ pthread_t _receiveThread;
+ int _rxHandle;
+ int _txHandle;
+ uint8_t receiveBuffer[3000];
+ };
+ }
+ }
+}
+
+
+#endif