Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUIInputDeviceUnixPowermate.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef _GUIINPUTDEVICEUNIXPOWERMATE_H_
11#define _GUIINPUTDEVICEUNIXPOWERMATE_H_
12
13#include "eC_Types.h"
14#include "GUIInputMedia.h"
15#include "GUITrace.h"
16#include "GUI.h"
17
18#include "GUIThread.h"
19#include "eC_TList_doubleLinked.h"
20#include "eC_Semaphore.h"
21
22#define POW_ENTER 256
23#define POW_LEFT 105
24#define POW_RIGHT 106
25#define POW_UP 103
26#define POW_DOWN 108
27
28class CGUIEvent;
29
32{
33public:
36 void Execute(void *pArg);
37
42 void SetSensitivityPowermate(eC_Int sensitvity)
43 {
44 m_iPowermateSensitivity = sensitvity;
45 }
46
47private:
48 eC_Int m_iPowermateDevice;
49 eC_Int m_iPowermateSensitivity;
50 static eC_Bool ms_bPowermateEnterSwitch;
51 static eC_Int ms_iUnitsPowermateCounter;
52};
53
61{
63
64 public:
69 // Example Param1 (Path to device):"/dev/input/by-id/usb-Griffin_Technology__Inc._Griffin_PowerMate-event-if00"
70 static void CreateInstance(const char* cpcPMDevice, eC_Int iSensitivity);
71
72 virtual void PollEvent();
73
74 virtual void StopIdle();
75
78
84
85 protected:
88
89 private:
93
97
98 static eC_Semaphore ms_kEventQueueSemaphore;
99 static pthread_cond_t InputEventCond;
100 static pthread_mutex_t InputEventMutex;
101};
102
103#endif
Base class for Guiliani Events.
Definition: GUIEvent.h:26
Reads input of the powermate.
Definition: GUIInputDeviceUnixPowermate.h:61
static eC_TListDoubleLinked< CGUIEvent * > ms_kEventQueue
The event queue.
Definition: GUIInputDeviceUnixPowermate.h:77
CGUIInputThreadDeviceUnix_Powermate m_kPowermateThread
Thread Powermate.
Definition: GUIInputDeviceUnixPowermate.h:83
static void CreateInstance(const char *cpcPMDevice, eC_Int iSensitivity)
Definition: GUIInputMedia.h:30
Thread for Powermate event handling in Unix.
Definition: GUIInputDeviceUnixPowermate.h:32
void SetSensitivityPowermate(eC_Int sensitvity)
Definition: GUIInputDeviceUnixPowermate.h:42
This is the base class for Guiliani threads.
Definition: GUIThread.h:85