Neonode zForce(TM) SDK

zForceTypes.h
Go to the documentation of this file.
1
7 #ifndef ZFORCETYPES_H
8 #define ZFORCETYPES_H 1
9
10 #ifdef COMPILING_ZFORCE_SDK
11 typedef struct zForceHandler zForceHandler;
12 #endif // COMPILING_ZFORCE_SDK
14 typedef struct zForce zForce;
16 typedef struct Connection Connection;
18 typedef struct Device Device;
20 typedef struct PlatformDevice PlatformDevice;
22 typedef struct SensorDevice SensorDevice;
24 typedef struct CoreDevice CoreDevice;
26 typedef struct AirDevice AirDevice;
28 typedef struct PlusDevice PlusDevice;
30 typedef struct LightingDevice LightingDevice;
32 typedef struct Protocol Protocol;
34 typedef struct ProtocolEntry ProtocolEntry;
36 typedef struct Transport Transport;
38 typedef struct TransportEntry TransportEntry;
40 typedef struct DataFrame DataFrame;
42 typedef struct StreamingDataFrame StreamingDataFrame;
44 typedef struct Message Message;
46 typedef struct EnableMessage EnableMessage;
48 typedef struct DisableMessage DisableMessage;
50 typedef struct OperationModesMessage OperationModesMessage;
52 typedef struct ResolutionMessage ResolutionMessage;
54 typedef struct TouchActiveAreaMessage TouchActiveAreaMessage;
56 typedef struct TouchMessage TouchMessage;
58 typedef struct NumberOfTrackedObjectsMessage NumberOfTrackedObjectsMessage;
60 typedef struct FingerFrequencyMessage FingerFrequencyMessage;
62 typedef struct IdleFrequencyMessage IdleFrequencyMessage;
64 typedef struct DetectedObjectSizeRestrictionMessage DetectedObjectSizeRestrictionMessage;
66 typedef struct ReverseTouchActiveAreaMessage ReverseTouchActiveAreaMessage;
68 typedef struct McuUniqueIdentifierMessage McuUniqueIdentifierMessage;
70 typedef struct OffsetMessage OffsetMessage;
72 typedef struct HidDisplaySizeMessage HidDisplaySizeMessage;
74 typedef struct FlipXYMessage FlipXYMessage;
76 typedef struct ReflectiveEdgeFilterMessage ReflectiveEdgeFilterMessage;
78 typedef struct MergeTouchesMessage MergeTouchesMessage;
80 typedef struct TouchModeMessage TouchModeMessage;
82 typedef struct FloatingProtectionMessage FloatingProtectionMessage;
84 typedef struct SnappingFilterMessage SnappingFilterMessage;
86 typedef struct DoubleClickPreventionMessage DoubleClickPreventionMessage;
87
89 enum DeviceType
90 {
91 None = 0,
92 Platform = 1,
93 Sensor = 2,
94 Core = 4,
95 Air = 8,
96 Plus = 16,
97 Lighting = 32
98 };
100 typedef enum DeviceType DeviceType;
101
103 enum MessageType
104 {
105 EnableMessageType,
106 DisableMessageType,
107 OperationModesMessageType,
108 ResolutionMessageType,
109 TouchActiveAreaMessageType,
110 TouchMessageType,
111 DetectedObjectSizeRestrictionMessageType,
112 NumberOfTrackedObjectsMessageType,
113 FingerFrequencyMessageType,
114 IdleFrequencyMessageType,
115 ReverseTouchActiveAreaMessageType,
116 McuUniqueIdentifierMessageType,
117 OffsetMessageType,
118 HidDisplaySizeMessageType,
119 FlipXYMessageType,
120 ReflectiveEdgeFilterMessageType,
121 MergeTouchesMessageType,
122 TouchModeMessageType,
123 FloatingProtectionMessageType,
124 SnappingFilterMessageType,
125 DoubleClickPreventionMessageType,
126 HighestValidMessageType = DoubleClickPreventionMessageType
127 };
129 typedef enum MessageType MessageType;
130
131
133 enum MessageGroup
134 {
135 Request,
136 Response,
137 Notification,
138 HighestValidMessageGroup = Notification
139 };
141 typedef enum MessageGroup MessageGroup;
142
143
145 enum MessageAction
146 {
147 GetAction,
148 SetAction
149 };
151 typedef enum MessageAction MessageAction;
152
154 enum OperationModes
155 {
156 NoOperationMode = 0,
157 DetectionMode = 1,
158 SignalsMode = 2,
159 LedLevelsMode = 4,
160 DetectionHidMode = 8,
161 GesturesMode = 16,
163 HighestValidOperationMode = (GesturesMode * 2) - 1
164 };
166 typedef enum OperationModes OperationModes;
167
169 enum TouchEvent
170 {
171 DownEvent,
172 MoveEvent,
173 UpEvent,
174 InvalidEvent,
175 GhostEvent
176 };
178 typedef enum TouchEvent TouchEvent;
179
181 enum TouchOrientation
182 {
183 PortraitOrientation,
184 LandscapeOrientation
185 };
187 typedef enum TouchOrientation TouchOrientation;
188
190 enum TouchModes
191 {
192 NormalTouchMode,
193 ClickOnTouchTouchMode
194 };
196 typedef enum TouchModes TouchModes;
197
199 typedef struct CartesianCoordinates CartesianCoordinates;
205 struct CartesianCoordinates
206 {
207 uint32_t X;
208 bool HasX;
209 uint32_t Y;
210 bool HasY;
211 uint32_t Z;
212 bool HasZ;
213 };
214
216 typedef struct TouchActiveArea TouchActiveArea;
223 struct TouchActiveArea
224 {
225 uint32_t LowerBoundX;
226 uint32_t UpperBoundX;
227 bool HasX;
228 uint32_t LowerBoundY;
229 uint32_t UpperBoundY;
230 bool HasY;
231 };
232
234 typedef struct ReverseTouchActiveArea ReverseTouchActiveArea;
241 struct ReverseTouchActiveArea
242 {
243 bool XIsReversed;
244 bool YIsReversed;
245 };
246
247 #endif // ZFORCETYPES_H
TransportEntry
struct TransportEntry TransportEntry
Definition: Transport.h:33
AirDevice
Struct representing a AirDevice.
Definition: AirDevice.h:23
CartesianCoordinates
Struct representing a coordinate.
Definition: zForceTypes.h:206
CartesianCoordinates::HasY
bool HasY
Is set to true if the coordinate system has a Y axis.
Definition: zForceTypes.h:210
CartesianCoordinates::X
uint32_t X
X axis value.
Definition: zForceTypes.h:207
CartesianCoordinates::Z
uint32_t Z
Z axis value.
Definition: zForceTypes.h:211
CartesianCoordinates::HasZ
bool HasZ
Is set to true if the coordinate system has a Z axis.
Definition: zForceTypes.h:212
CartesianCoordinates::Y
uint32_t Y
Y axis value.
Definition: zForceTypes.h:209
CartesianCoordinates::HasX
bool HasX
Is set to true if the coordinate system has a X axis.
Definition: zForceTypes.h:208
Connection
The main Connection struct.
Definition: Connection.h:66
CoreDevice
Struct representing a CoreDevice.
Definition: CoreDevice.h:23
DataFrame
Struct containing the DataFrame information.
Definition: DataFrame.h:25
DetectedObjectSizeRestrictionMessage
This structure represents a detected object size restriction message.
Definition: DetectedObjectSizeRestrictionMessage.h:22
Device
Device base class.
Definition: Device.h:26
DisableMessage
This structure represents a disable message.
Definition: DisableMessage.h:21
DoubleClickPreventionMessage
This structure represents a double-click prevention message.
Definition: DoubleClickPreventionMessage.h:21
EnableMessage
This structure represents an enable message.
Definition: EnableMessage.h:22
FingerFrequencyMessage
This structure represents a finger frequency message.
Definition: FingerFrequencyMessage.h:21
FlipXYMessage
This structure represents a FlipXY Message.
Definition: FlipXYMessage.h:21
FloatingProtectionMessage
This structure represents a floating protection message.
Definition: FloatingProtectionMessage.h:21
HidDisplaySizeMessage
This structure represents a HID Display Size Message.
Definition: HidDisplaySizeMessage.h:21
IdleFrequencyMessage
This structure represents an idle frequency message.
Definition: IdleFrequencyMessage.h:21
LightingDevice
Struct representing a LightingDevice.
Definition: LightingDevice.h:24
McuUniqueIdentifierMessage
This structure represents an mcu unique identifier message.
Definition: McuUniqueIdentifierMessage.h:21
MergeTouchesMessage
This structure represents a merge touches message.
Definition: MergeTouchesMessage.h:22
Message
The main Message struct.
Definition: Message.h:21
NumberOfTrackedObjectsMessage
This structure represents a number of tracked objects message.
Definition: NumberOfTrackedObjectsMessage.h:21
OffsetMessage
This structure represents an offset message.
Definition: OffsetMessage.h:21
OperationModesMessage
This structure represents a operation mode message.
Definition: OperationModesMessage.h:24
PlatformDevice
Struct representing a PlatformDevice.
Definition: PlatformDevice.h:24
PlusDevice
Struct representing a PlusDevice.
Definition: PlusDevice.h:23
Protocol
This structure represents the base class of all protocol definitions.
Definition: Protocol.h:28
ReflectiveEdgeFilterMessage
This structure represents a operation mode message.
Definition: ReflectiveEdgeFilterMessage.h:23
ResolutionMessage
This structure represents a resolution message.
Definition: ResolutionMessage.h:21
ReverseTouchActiveAreaMessage
This structure represents a reverse touch active area message.
Definition: ReverseTouchActiveAreaMessage.h:22
ReverseTouchActiveArea
This structure represents whether the Touch Active Area coordinates are reversed or not.
Definition: zForceTypes.h:242
ReverseTouchActiveArea::XIsReversed
bool XIsReversed
True if the X axis is reversed.
Definition: zForceTypes.h:243
ReverseTouchActiveArea::YIsReversed
bool YIsReversed
True if the Y axis is reversed.
Definition: zForceTypes.h:244
SensorDevice
Struct representing a SensorDevice, a meta device.
Definition: SensorDevice.h:25
SnappingFilterMessage
This structure represents an snapping filter message.
Definition: SnappingFilterMessage.h:21
StreamingDataFrame
Struct containing the StreamingDataFrame information.
Definition: StreamingDataFrame.h:25
TouchActiveAreaMessage
This structure represents a touch active area message.
Definition: TouchActiveAreaMessage.h:22
TouchActiveArea
This structure represents the Touch Active Area of a sensor.
Definition: zForceTypes.h:224
TouchActiveArea::HasX
bool HasX
True if the coordinate system has a X axis.
Definition: zForceTypes.h:227
TouchActiveArea::UpperBoundX
uint32_t UpperBoundX
End of the Touch Active Area X axis.
Definition: zForceTypes.h:226
TouchActiveArea::LowerBoundX
uint32_t LowerBoundX
Start of the Touch Active Area X axis.
Definition: zForceTypes.h:225
TouchActiveArea::UpperBoundY
uint32_t UpperBoundY
End of the Touch Active Area Y axis.
Definition: zForceTypes.h:229
TouchActiveArea::HasY
bool HasY
True if the coordinate system has a Y axis.
Definition: zForceTypes.h:230
TouchActiveArea::LowerBoundY
uint32_t LowerBoundY
Start of the Touch Active Area Y axis.
Definition: zForceTypes.h:228
TouchMessage
This structure represents a touch message.
Definition: TouchMessage.h:21
TouchModeMessage
This structure represents a touch mode message.
Definition: TouchModeMessage.h:21
Transport
Transport struct. This structure represents the base class of all Transport definitions.
Definition: Transport.h:43
MessageGroup
MessageGroup
Enum describing the different groups a message can belong to.
Definition: zForceTypes.h:134
TouchModes
TouchModes
Enum describing what touch mode a device can be in.
Definition: zForceTypes.h:191
ClickOnTouchTouchMode
@ ClickOnTouchTouchMode
Touch Mode is set to Click on Touch.
Definition: zForceTypes.h:193
NormalTouchMode
@ NormalTouchMode
Touch Mode is set to Normal.
Definition: zForceTypes.h:192
ProtocolEntry
struct ProtocolEntry ProtocolEntry
Definition: zForceTypes.h:34
MessageAction
MessageAction
Enum describing the action of a message.
Definition: zForceTypes.h:146
SetAction
@ SetAction
Set information on device.
Definition: zForceTypes.h:148
GetAction
@ GetAction
Get information from device.
Definition: zForceTypes.h:147
MessageType
MessageType
Enum describing the different message types that exists.
Definition: zForceTypes.h:104
TouchEvent
TouchEvent
Enum describing what state a touch can be in.
Definition: zForceTypes.h:170
GhostEvent
@ GhostEvent
Ghost touch detected.
Definition: zForceTypes.h:175
UpEvent
@ UpEvent
The Touch object is no longer detected.
Definition: zForceTypes.h:173
InvalidEvent
@ InvalidEvent
Invalid Touch event reported by Device.
Definition: zForceTypes.h:174
MoveEvent
@ MoveEvent
The Touch object is moving.
Definition: zForceTypes.h:172
DownEvent
@ DownEvent
New Touch object detected.
Definition: zForceTypes.h:171
DeviceType
DeviceType
Enum describing the different device types that exists.
Definition: zForceTypes.h:90
OperationModes
OperationModes
Enum describing the OperationModes that a sensor can operate in.
Definition: zForceTypes.h:155
NoOperationMode
@ NoOperationMode
No Mode set.
Definition: zForceTypes.h:156
HighestValidOperationMode
@ HighestValidOperationMode
Special value used for error checking.
Definition: zForceTypes.h:163
DetectionMode
@ DetectionMode
Detection Mode (Touch).
Definition: zForceTypes.h:157
DetectionHidMode
@ DetectionHidMode
Detection Mode for Hid Devices.
Definition: zForceTypes.h:160
SignalsMode
@ SignalsMode
Signals Mode.
Definition: zForceTypes.h:158
GesturesMode
@ GesturesMode
Definition: zForceTypes.h:161
LedLevelsMode
@ LedLevelsMode
Led Levels Mode.
Definition: zForceTypes.h:159
TouchOrientation
TouchOrientation
Enum describing what orientation touches are generated in.
Definition: zForceTypes.h:182
LandscapeOrientation
@ LandscapeOrientation
Object is in Landscape orientation.
Definition: zForceTypes.h:184
PortraitOrientation
@ PortraitOrientation
Object is in Portrait orientation.
Definition: zForceTypes.h:183