Neonode zForce(TM) SDK

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Members

Public Attributes | List of all members
CoreDevice Struct Reference

Struct representing a CoreDevice. More...

`#include <CoreDevice.h>`

Collaboration diagram for CoreDevice:
[legend]

## Public Attributes
zForce * | zForce
| Pointer to zForce.
Connection * | Connection
| The Connection this Device is part of.
DeviceType | DeviceType
| Which type of Device this is.
uint32_t | DeviceIndex
Device ** | StorageDevices
| Future: List of Storage Devices. Will change type during implementation.
uint32_t | NumberOfStorageDevices
| Number of Storage Devices.
void * | PrivateProtocolData
| Private Protocol Data.
void(* | Destructor )(Device *self)
| Destructor. More...
CartesianCoordinates | Resolution
| Resolution of the device.
TouchActiveArea | TouchActiveArea
| Touch Active Area of the device.
ReverseTouchActiveArea | ReverseTouchActiveArea
| Reverse The Touch Active Area of the device.
bool(* | GetEnable )(SensorDevice *self)
| Ask the Device if it is enabled. More...
bool(* | SetEnable )(SensorDevice *self, bool continuousMode, uint32_t numberOfMessages)
| Enable the device. More...
bool(* | GetDisable )(SensorDevice *self)
| Ask the Device if it is disabled. More...
bool(* | SetDisable )(SensorDevice *self)
| Disable the device. More...
bool(* | GetOperationModes )(SensorDevice *self)
| Get the current Operating Modes of the Device. More...
bool(* | SetOperationModes )(SensorDevice *self, OperationModes modeMask, OperationModes modeValues)
| Set the current Operating Modes of the Device. More...
bool(* | GetResolution )(SensorDevice *self)
| Get the current Resolution of the Device. More...
bool(* | SetResolution )(SensorDevice *self, uint32_t x, bool xIsValid, uint32_t y, bool yIsValid, uint32_t z, bool zIsValid)
| Set the current Resolution of the Device. More...
bool(* | GetReverseTouchActiveArea )(SensorDevice *self)
| Gets the current reverse setting for the Touch Active Area. More...
bool(* | SetReverseTouchActiveArea )(SensorDevice *self, bool xIsReversed, bool yIsReversed)
| Reverse the Touch Active Area of the Device. More...
bool(* | GetFlipXY )(SensorDevice *self)
| Gets the current FlipXY setting. More...
bool(* | SetFlipXY )(SensorDevice *self, bool axesAreFlipped)
| Sets the FlipXY setting. More...
bool(* | GetReflectiveEdgeFilter )(SensorDevice *self)
| Gets the current ReflectiveEdgeFilter setting. More...
bool(* | SetReflectiveEdgeFilter )(SensorDevice *self, bool isFilterOn)
| Sets the ReflectiveEdgeFilter setting. More...
bool(* | GetMergeTouches )(SensorDevice *self)
| Gets the current MergeTouches setting. More...
bool(* | SetMergeTouches )(SensorDevice *self, bool areTouchesMerged)
| Sets the MergeTouches setting. More...
bool(* | GetTouchActiveArea )(SensorDevice *self)
| Get the current Touch Active Area of the Device. More...
bool(* | SetTouchActiveArea )(SensorDevice *self, uint32_t lowerBoundaryX, uint32_t upperBoundaryX, bool xIsValid, uint32_t lowerBoundaryY, uint32_t upperBoundaryY, bool yIsValid)
| Set the current Touch Active Area of the Device. More...
bool(* | GetDetectedObjectSizeRestriction )(SensorDevice *self)
| Get the current Detected Object Size Restriction of the Device. More...
bool(* | SetDetectedObjectSizeRestriction )(SensorDevice *self, uint32_t minimumSize, uint32_t maximumSize, bool minimumSizeIsValid, bool maximumSizeIsValid)
| Set the current Detected Object Size Restriction of the Device. More...
bool(* | GetNumberOfTrackedObjects )(SensorDevice *self)
| Get the number of tracked objects. More...
bool(* | SetNumberOfTrackedObjects )(SensorDevice *self, uint32_t numberOfTrackedObjects)
| Set the number of tracked objects. More...
bool(* | GetOffset )(SensorDevice *self)
| Get the X and Y offsets. More...
bool(* | SetOffset )(SensorDevice *self, uint32_t offsetX, bool offsetXIsValid, uint32_t offsetY, bool offsetYIsValid)
| Set the X and Y offsets. More...
bool(* | GetHidDisplaySize )(SensorDevice *self)
| Get the Hid Display Size. More...
bool(* | SetHidDisplaySize )(SensorDevice *self, uint32_t sizeX, bool sizeXIsValid, uint32_t sizeY, bool sizeYIsValid)
| Set the Hid Display Size. More...
bool(* | GetTouchMode )(SensorDevice *self)
| Get the Touch Mode. More...
bool(* | SetTouchMode )(SensorDevice *self, TouchModes touchMode, bool touchModeIsValid, uint32_t clickOnTouchTime, bool clickOnTouchTimeIsValid, uint32_t clickOnTouchRadius, bool clickOnTouchRadiusIsValid)
| Set the Touch Mode. More...
bool(* | GetFloatingProtection )(SensorDevice *self)
| Get the state of Floating Protection. More...
bool(* | SetFloatingProtection )(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t time, bool timeIsValid)
| Set Floating Protection. More...

## Detailed Description

Struct representing a CoreDevice.

Struct representing a CoreDevice. CoreDevice is a specific implementation of a SensorDevice for zForce Core(TM).

## Member Data Documentation

void( * CoreDevice::Destructor) (Device *self)

Destructor.

Destructs the Device and all base structs.

Parameters

  self | Pointer to the struct itself.

Returns
  No return value.

uint32_t CoreDevice::DeviceIndex

Which Device Index this device has.

bool( * CoreDevice::GetDetectedObjectSizeRestriction) (SensorDevice *self)

Get the current Detected Object Size Restriction of the Device.

Gets the current Detected Object Size Restriction.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetDisable) (SensorDevice *self)

Ask the Device if it is disabled.

Ask the device if it is disabled.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetEnable) (SensorDevice *self)

Ask the Device if it is enabled.

Ask the Device if it is enabled. Also reports if the device is in continuous mode and number of messages left to receive.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetFlipXY) (SensorDevice *self)

Gets the current FlipXY setting.

Gets the current FlipXY setting.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetFloatingProtection) (SensorDevice *self)

Get the state of Floating Protection.

Get the state of Floating Protection.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetHidDisplaySize) (SensorDevice *self)

Get the Hid Display Size.

Get the Hid Display Size.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetMergeTouches) (SensorDevice *self)

Gets the current MergeTouches setting.

Gets the current MergeTouches setting.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetNumberOfTrackedObjects) (SensorDevice *self)

Get the number of tracked objects.

Get the number of tracked objects.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetOffset) (SensorDevice *self)

Get the X and Y offsets.

Get the X and Y offsets.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetOperationModes) (SensorDevice *self)

Get the current Operating Modes of the Device.

Gets the current Operating Modes of the Device as two bitmasks.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetReflectiveEdgeFilter) (SensorDevice *self)

Gets the current ReflectiveEdgeFilter setting.

Gets the current ReflectiveEdgeFilter setting.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetResolution) (SensorDevice *self)

Get the current Resolution of the Device.

Gets the current Resolution of the Device.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetReverseTouchActiveArea) (SensorDevice *self)

Gets the current reverse setting for the Touch Active Area.

Gets the current reverse setting for the Touch Active Area.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetTouchActiveArea) (SensorDevice *self)

Get the current Touch Active Area of the Device.

Gets the current Touch Active Area of the Device.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::GetTouchMode) (SensorDevice *self)

Get the Touch Mode.

Get the Touch Mode.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetDetectedObjectSizeRestriction) (SensorDevice *self, uint32_t minimumSize, uint32_t maximumSize, bool minimumSizeIsValid, bool maximumSizeIsValid)

Set the current Detected Object Size Restriction of the Device.

Sets the current Detected Object Size Restriction of the device.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Lower boundary input values must be lower than upper.

Parameters

  self | Pointer to the struct itself.
  minimumSize | The minimum object size to detect by device.
  maximumSize | The maximum object size to detect by device.
  minimumSizeIsValid | Set to True to alter minimumSize detection.
  maximumSizeIsValid | Set to True to alter maximumSize detection.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetDisable) (SensorDevice *self)

Disable the device.

Disable the device. Messages will stop arriving as soon as the Device processes the request, but Messages already in progress will still arrive as normal.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetEnable) (SensorDevice *self, bool continuousMode, uint32_t numberOfMessages)

Enable the device.

Enable the device and set it to either continuous mode or a specified number of messages. Not all protocols handle non-continuous mode.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Continuous cannot be false when numberOfMessages = 0.

Parameters

  self | Pointer to the struct itself.
  continuousMode | Set to true for continuous mode.
  numberOfMessages | When in non-continuous mode, specifies how many Messages to receive before the Device disables itself. May not be 0 when continuousMode == false.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetFlipXY) (SensorDevice *self, bool axesAreFlipped)

Sets the FlipXY setting.

Enables/Disables flipping the X-axis and Y-axis.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Lower boundary input values must be lower than upper.

Parameters

  self | Pointer to the struct itself.
  axesAreflipped | True to flip the axes.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetFloatingProtection) (SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t time, bool timeIsValid)

Set Floating Protection.

Set Floating Protection.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.
  enabled | Floating Protection is enabled.
  enabledIsValid | Enable is valid, i.e. you want to Enable/Disable Floating Protection.
  time | Floating Protection Time in ms.
  timeIsValid | Floating Protection Time is valid, i.e. you want to set Floating Protection Time.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetHidDisplaySize) (SensorDevice *self, uint32_t sizeX, bool sizeXIsValid, uint32_t sizeY, bool sizeYIsValid)

Set the Hid Display Size.

Set the Hid Display Size.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.
  sizeX | X Size.
  sizeXIsValid | X Size is valid, i.e. you want to set Size X.
  sizeY | Y Size.
  sizeYIsValid | Y Size is valid, i.e. you want to set Size Y.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetMergeTouches) (SensorDevice *self, bool areTouchesMerged)

Sets the MergeTouches setting.

Enables/Disables the MergeTouches setting in the sensor.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Lower boundary input values must be lower than upper.

Parameters

  self | Pointer to the struct itself.
  areTouchesMerged | is true if the touches are merged, otherwise false.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetNumberOfTrackedObjects) (SensorDevice *self, uint32_t numberOfTrackedObjects)

Set the number of tracked objects.

Set the number of tracked objects.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.
  numberOfTrackedObjects | Tracked object count.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetOffset) (SensorDevice *self, uint32_t offsetX, bool offsetXIsValid, uint32_t offsetY, bool offsetYIsValid)

Set the X and Y offsets.

Set the X and Y offsets.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.
  offsetX | X Offset.
  offsetXIsValid | Offset X is valid, i.e. you want to set X Offset.
  offsetY | Y Offset.
  offsetYIsValid | Offset Y is valid, i.e. you want to set Y Offset.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetOperationModes) (SensorDevice *self, OperationModes modeMask, OperationModes modeValues)

Set the current Operating Modes of the Device.

Sets the current Operating Modes of the Device as two bitmasks. Setting the modeMask bit for a specific Mode to 1 changes it to become the corresponding bit in modeValues but setting the bit to 0 does not change it.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - The modeMask and/or modeValue fields try to set bits that are not defined.

Parameters

  self | Pointer to the struct itself.
  modeMask | A bit set to 1 means set to the corresponding bit in the modeValue field and 0 means do not change this bit.
  modeValue | The value to set the bits to.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetReflectiveEdgeFilter) (SensorDevice *self, bool isFilterOn)

Sets the ReflectiveEdgeFilter setting.

Enables/Disables the ReflectiveEdgeFilter.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Lower boundary input values must be lower than upper.

Parameters

  self | Pointer to the struct itself.
  isFilterOn | is true if the filter is on, otherwise false.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetResolution) (SensorDevice *self, uint32_t x, bool xIsValid, uint32_t y, bool yIsValid, uint32_t z, bool zIsValid)

Set the current Resolution of the Device.

Sets the current Resolution of the Device.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.
  x | The Resolution of the X axis.
  xIsValid | Set to true to change this value or false to ignore it. Ignored on a Device that does not allow it.
  y | The Resolution of the Y axis.
  yIsValid | Set to true to change this value or false to ignore it. Ignored on a Device that does not allow it.
  z | The Resolution of the Z axis.
  zIsValid | Set to true to change this value or false to ignore it. Ignored on a Device that does not allow it.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetReverseTouchActiveArea) (SensorDevice *self, bool xIsReversed, bool yIsReversed)

Reverse the Touch Active Area of the Device.

Reverse the Touch Active Area of the Device.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Lower boundary input values must be lower than upper.

Parameters

  self | Pointer to the struct itself.
  xIsReversed | True to reverse the X axis.
  yIsReversed | True to reverse the Y axis.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetTouchActiveArea) (SensorDevice *self, uint32_t lowerBoundaryX, uint32_t upperBoundaryX, bool xIsValid, uint32_t lowerBoundaryY, uint32_t upperBoundaryY, bool yIsValid)

Set the current Touch Active Area of the Device.

Sets the current Touch Active Area of the Device.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.
- EINVALIDINPUT - Lower boundary input values must be lower than upper.

Parameters

  self | Pointer to the struct itself.
  lowerBoundaryX | The lower boundary for the X axis to set.
  upperBoundaryX | The upper boundary for teh X axis to set.
  xIsValid | Set to true to change the values or false to ignore.
  lowerBoundaryY | The lower boundary for the Y axis to set.
  upperBoundaryY | The upper boundary for teh Y axis to set.
  yIsValid | Set to true to change the values or false to ignore.

Returns
  True for success, false for failure. See errno.

bool( * CoreDevice::SetTouchMode) (SensorDevice *self, TouchModes touchMode, bool touchModeIsValid, uint32_t clickOnTouchTime, bool clickOnTouchTimeIsValid, uint32_t clickOnTouchRadius, bool clickOnTouchRadiusIsValid)

Set the Touch Mode.

Set the Touch Mode.
On failure, errno is set.

- EALREADYINPROGRESS - Another request is currently in progress.
- ENOTSUPPORTED - This request is not supported by this protocol and/or Device.

Parameters

  self | Pointer to the struct itself.
  touchMode | Touch Mode to set.
  touchModeIsValid | Touch Mode is valid, i.e. you want to set Touch Mode.
  clickOnTouchTime | Click on Touch Time in ms.
  clickOnTouchTimeIsValid | Click On Touch Time is valid, i.e. you want to set Click On Touch Time.
  clickOnTouchRadius | Click on Touch Radius in ms.
  clickOnTouchRadiusIsValid | Click On Touch Radius is valid, i.e. you want to set Click On Touch Radius.

Returns
  True for success, false for failure. See errno.

The documentation for this struct was generated from the following file:

- CoreDevice.h