HID services: Difference between revisions

No edit summary
Line 1,229: Line 1,229:
| 0x8 || 0x8 || [[#IrSensorMode]]
| 0x8 || 0x8 || [[#IrSensorMode]]
|-
|-
| 0x10 || 0xE20 || Array of ProcessorState
| 0x10 || 0xE20 || [[#ProcessorStateRingLifo]]
|}
|}


ProcessorState is specialized depending on the value of [[#IrSensorMode]].
==== ProcessorStateRingLifo ====
 
This is "nn::irsensor::detail::RingLifo<X,Y>" where "X" is a specialized processor state (e.g.: "nn::irsensor::MomentProcessorState") and "Y" is the maximum element count (e.g.: 5).
The array of ProcessorState can hold up to 6 entries of [[#PointingProcessorState]] or 5 entries of any of the other states.
 
The ProcessorState starts with the following header, followed by the actual array state.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,242: Line 1,239:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x8 || SamplingNumber
| 0x0 || 0x8 || Start
|-
|-
| 0x8 || 0x4 || TimeStamp
| 0x8 || 0x4 || Count
|-
|-
| 0xC || 0x4 || Padding
| 0xC || 0x4 || Padding
|-
| 0x10 || Variable || ProcessorState
|}
|}


==== MomentProcessorState ====
The maximum element count is 6 for [[#PointingProcessorState]] or 5 for any of the other states.
 
ProcessorState is specialized depending on the value of [[#IrSensorMode]].
 
===== MomentProcessorState =====
This is "nn::irsensor::MomentProcessorState".
This is "nn::irsensor::MomentProcessorState".


Line 1,258: Line 1,261:
| 0x0 || 0x8 || SamplingNumber
| 0x0 || 0x8 || SamplingNumber
|-
|-
| 0x8 || 0x4 || TimeStamp
| 0x8 || 0x8 || TimeStamp
|-
| 0xC || 0x4 || Padding
|-
|-
| 0x10 || 0x4 || AmbientNoiseLevel
| 0x10 || 0x4 || AmbientNoiseLevel
Line 1,271: Line 1,272:
The array of [[#MomentStatistic]] can hold up to 48 entries.
The array of [[#MomentStatistic]] can hold up to 48 entries.


===== MomentStatistic =====
====== MomentStatistic ======
In sdknso GetMomentProcessorStates, this loops through each MomentProcessorState->MomentStatistic entry: <code>AverageIntensity *= scale;</code> The scale is calculated with: <code>scale = 76800.0f / (float)([[#PackedMomentProcessorConfig|WindowOfInterest]].width * [[#PackedMomentProcessorConfig|WindowOfInterest]].height);</code> Note that <code>76800 == 320*240</code>, hence with the default width/height the calculated scale is 1.0f.
In sdknso GetMomentProcessorStates, this loops through each MomentProcessorState->MomentStatistic entry: <code>AverageIntensity *= scale;</code> The scale is calculated with: <code>scale = 76800.0f / (float)([[#PackedMomentProcessorConfig|WindowOfInterest]].width * [[#PackedMomentProcessorConfig|WindowOfInterest]].height);</code> Note that <code>76800 == 320*240</code>, hence with the default width/height the calculated scale is 1.0f.


Line 1,285: Line 1,286:
|}
|}


==== ClusteringProcessorState ====
===== ClusteringProcessorState =====
This is "nn::irsensor::ClusteringProcessorState".
This is "nn::irsensor::ClusteringProcessorState".


Line 1,294: Line 1,295:
| 0x0 || 0x8 || SamplingNumber
| 0x0 || 0x8 || SamplingNumber
|-
|-
| 0x8 || 0x4 || TimeStamp
| 0x8 || 0x8 || TimeStamp
|-
| 0xC || 0x4 || Padding
|-
|-
| 0x10 || 0x1 || ObjectCount
| 0x10 || 0x1 || ObjectCount
Line 1,309: Line 1,308:
The array of [[#ClusteringData]] can hold up to 16 entries.
The array of [[#ClusteringData]] can hold up to 16 entries.


===== ClusteringData =====
====== ClusteringData ======
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,331: Line 1,330:
|}
|}


==== PointingProcessorState ====
===== PointingProcessorState =====
This is "nn::irsensor::PointingProcessorState" and "nn::irsensor::PointingProcessorMarkerState".
This is "nn::irsensor::PointingProcessorState" and "nn::irsensor::PointingProcessorMarkerState".


Line 1,340: Line 1,339:
| 0x0 || 0x8 || SamplingNumber
| 0x0 || 0x8 || SamplingNumber
|-
|-
| 0x8 || 0x4 || TimeStamp
| 0x8 || 0x8 || TimeStamp
|-
| 0xC || 0x4 || Padding
|-
|-
| 0x10 || 0x1 || PointingStatus
| 0x10 || 0x1 || PointingStatus
Line 1,363: Line 1,360:
|}
|}


==== TeraPluginProcessorState ====
===== TeraPluginProcessorState =====
This is "nn::irsensor::TeraPluginProcessorState".
This is "nn::irsensor::TeraPluginProcessorState".


Line 1,372: Line 1,369:
| 0x0 || 0x8 || SamplingNumber
| 0x0 || 0x8 || SamplingNumber
|-
|-
| 0x8 || 0x4 || TimeStamp
| 0x8 || 0x8 || TimeStamp
|-
| 0xC || 0x4 || Padding
|-
|-
| 0x10 || 0x4 || AmbientNoiseLevel
| 0x10 || 0x4 || AmbientNoiseLevel
Line 1,381: Line 1,376:
|}
|}


==== AdaptiveClusteringProcessorState ====
===== AdaptiveClusteringProcessorState =====
This is "nn::irsensor::AdaptiveClusteringProcessorState".
This is "nn::irsensor::AdaptiveClusteringProcessorState".


Line 1,409: Line 1,404:
The array of [[#AdaptiveClusteringData]] can hold up to 16 entries.
The array of [[#AdaptiveClusteringData]] can hold up to 16 entries.


===== AdaptiveClusteringData =====
====== AdaptiveClusteringData ======
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,423: Line 1,418:
|}
|}


==== HandAnalysisImageState ====
===== HandAnalysisImageState =====
This is "nn::irsensor::HandAnalysisImageState".
This is "nn::irsensor::HandAnalysisImageState".


Line 1,441: Line 1,436:
|}
|}


==== HandAnalysisSilhouetteState ====
===== HandAnalysisSilhouetteState =====
This is "nn::irsensor::HandAnalysisSilhouetteState".
This is "nn::irsensor::HandAnalysisSilhouetteState".


Line 1,457: Line 1,452:
|}
|}


==== HandAnalysisSilhouetteStateWithFullFrameShape ====
===== HandAnalysisSilhouetteStateWithFullFrameShape =====
This is "nn::irsensor::HandAnalysisSilhouetteStateWithFullFrameShape".
This is "nn::irsensor::HandAnalysisSilhouetteStateWithFullFrameShape".