Neonode zForce(TM) SDK
SensorDevice.h
Go to the documentation of this file.
1 
13 #if !defined(DEVICE_SENSORDEVICE_SENSORDEVICE_H) && !defined(CONTAINS_SENSORDEVICE)
14 
15 #ifndef ZFORCECOMMON_H
16  #error Please include "zForceCommon.h" before this file.
17 #endif // ZFORCECOMMON_H
18 
27 struct SensorDevice
28 {
29 #endif // !defined(DEVICE_SENSORDEVICE_SENSORDEVICE_H) && !defined(CONTAINS_SENSORDEVICE)
30 #if !defined(DEVICE_SENSORDEVICE_SENSORDEVICE_H) || defined(CONTAINS_SENSORDEVICE)
31  #define CONTAINS_DEVICE
32  #include <Device.h>
33  #undef CONTAINS_DEVICE
34  CartesianCoordinates Resolution;
37 
53  bool ( * GetEnable)(SensorDevice * self);
54 
76  bool ( * SetEnable)(SensorDevice * self, bool continuousMode, uint32_t numberOfMessages);
77 
92  bool ( * GetDisable)(SensorDevice * self);
93 
110  bool ( * SetDisable)(SensorDevice * self);
111 
126  bool ( * GetOperationModes)(SensorDevice * self);
127 
150  bool ( * SetOperationModes)(SensorDevice * self, OperationModes modeMask, OperationModes modeValues);
151 
166  bool ( * GetResolution)(SensorDevice * self);
167 
191  bool ( * SetResolution)(SensorDevice * self, uint32_t x, bool xIsValid,
192  uint32_t y, bool yIsValid,
193  uint32_t z, bool zIsValid);
194 
209  bool ( * GetReverseTouchActiveArea)(SensorDevice * self);
210 
228  bool ( * SetReverseTouchActiveArea)(SensorDevice * self, bool xIsReversed, bool yIsReversed);
229 
243  bool( * GetFlipXY)(SensorDevice * self);
244 
260  bool ( * SetFlipXY)(SensorDevice * self, bool axesAreFlipped);
261 
275  bool( * GetReflectiveEdgeFilter)(SensorDevice * self);
276 
292  bool ( * SetReflectiveEdgeFilter)(SensorDevice * self, bool isFilterOn);
293 
307  bool( * GetMergeTouches)(SensorDevice * self);
308 
324  bool ( * SetMergeTouches)(SensorDevice * self, bool areTouchesMerged);
325 
340  bool ( * GetTouchActiveArea)(SensorDevice * self);
341 
363  bool ( * SetTouchActiveArea)(SensorDevice * self, uint32_t lowerBoundaryX, uint32_t upperBoundaryX, bool xIsValid,
364  uint32_t lowerBoundaryY, uint32_t upperBoundaryY, bool yIsValid);
365 
380  bool ( * GetDetectedObjectSizeRestriction)(SensorDevice * self);
381 
401  bool ( * SetDetectedObjectSizeRestriction)(SensorDevice * self,
402  uint32_t minimumSize,
403  uint32_t maximumSize,
404  bool minimumSizeIsValid,
405  bool maximumSizeIsValid);
406 
421  bool ( * GetNumberOfTrackedObjects) (SensorDevice * self);
422 
438  bool ( * SetNumberOfTrackedObjects) (SensorDevice * self,
439  uint32_t numberOfTrackedObjects);
440 
455  bool ( * GetOffset) (SensorDevice * self);
456 
475  bool ( * SetOffset) (SensorDevice * self, uint32_t offsetX, bool offsetXIsValid,
476  uint32_t offsetY, bool offsetYIsValid);
477 
492  bool ( * GetHidDisplaySize) (SensorDevice * self);
493 
512  bool ( * SetHidDisplaySize) (SensorDevice * self, uint32_t sizeX, bool sizeXIsValid,
513  uint32_t sizeY, bool sizeYIsValid);
514 
529  bool ( * GetTouchMode) (SensorDevice * self);
530 
551  bool ( * SetTouchMode) (SensorDevice * self, TouchModes touchMode, bool touchModeIsValid,
552  uint32_t clickOnTouchTime, bool clickOnTouchTimeIsValid,
553  uint32_t clickOnTouchRadius, bool clickOnTouchRadiusIsValid);
554 
569  bool ( * GetFloatingProtection) (SensorDevice * self);
570 
589  bool ( * SetFloatingProtection) (SensorDevice * self, bool enabled, bool enabledIsValid,
590  uint32_t time, bool timeIsValid);
591 
592 #endif // !defined(DEVICE_SENSORDEVICE_SENSORDEVICE_H) || defined(CONTAINS_SENSORDEVICE)
593 #if !defined(DEVICE_SENSORDEVICE_SENSORDEVICE_H) && !defined(CONTAINS_SENSORDEVICE)
594 };
595 
596 #ifdef __cplusplus
597 extern "C"
598 {
599 #endif // __cplusplus
600 
615 DLLINTERNAL SensorDevice * SensorDevice_New (Connection * connection, DeviceType deviceType, uint32_t deviceIndex,
616  size_t size);
617 
618 #ifdef __cplusplus
619 }
620 #endif // __cplusplus
621 
622 #define DEVICE_SENSORDEVICE_SENSORDEVICE_H
623 #endif // !defined(DEVICE_SENSORDEVICE_SENSORDEVICE_H) && !defined(CONTAINS_SENSORDEVICE)
624 
OperationModes
Enum describing the OperationModes that a sensor can operate in.
Definition: zForceTypes.h:149
TouchModes
Enum describing what touch mode a device can be in.
Definition: zForceTypes.h:185
The main Connection struct.
Definition: Connection.h:64
struct SensorDevice SensorDevice
Definition: zForceTypes.h:23
struct TouchActiveArea TouchActiveArea
Definition: zForceTypes.h:216
This structure represents whether the Touch Active Area coordinates are reversed or not...
Definition: zForceTypes.h:246
Struct representing a coordinate.
Definition: zForceTypes.h:200
DeviceType
Enum describing the different device types that exists.
Definition: zForceTypes.h:86
struct ReverseTouchActiveArea ReverseTouchActiveArea
Definition: zForceTypes.h:239
Base Device class.
This structure represents the Touch Active Area of a sensor.
Definition: zForceTypes.h:223