Developer World
Spresense SDK Library v3.2.0-ebc0364
arm_gesture_command.h
Go to the documentation of this file.
1/****************************************************************************
2 * modules/include/sensing/logical_sensor/arm_gesture_command.h
3 *
4 * Copyright 2018 Sony Semiconductor Solutions Corporation
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * 3. Neither the name of Sony Semiconductor Solutions Corporation nor
17 * the names of its contributors may be used to endorse or promote
18 * products derived from this software without specific prior written
19 * permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
34 ****************************************************************************/
35
36#ifndef __INCLUDE_SENSING_GESTURE_COMMAND_H
37#define __INCLUDE_SENSING_GESTURE_COMMAND_H
38
44/****************************************************************************
45 * Included Files
46 ****************************************************************************/
47
48#include <stdint.h>
49#include <stddef.h>
50
52
57#ifdef __cplusplus
58extern "C" {
59#endif /* __cplusplus */
60
61/****************************************************************************
62 * Pre-processor Definitions
63 ****************************************************************************/
64
69#define GESTURE_ARM_UP 0x00000001
74#define GESTURE_ARM_DOWN 0x00000002
79#define GESTURE_TWIST 0x00000004
84#define GESTURE_SHAKE 0x00000010
85
86/****************************************************************************
87 * Public Types
88 ****************************************************************************/
89
94typedef enum {
98
103typedef enum {
109
110/* --------------------------------------------------------------------------
111 * Command Structures
112 * --------------------------------------------------------------------------
113 */
114/*--------------------------------------------------------------------------*/
122typedef struct {
123
124 uint32_t type;
127
132{
133 void *addr;
134 size_t size;
135};
136
141typedef struct {
142
147
148/*--------------------------------------------------------------------------*/
160typedef struct
161{
162 float xx;
163 float xy;
164 float xz;
165 float yx;
166 float yy;
167 float yz;
168 float zx;
169 float zy;
170 float zz;
172
177typedef struct
178{
181 union
182 {
189 };
191
192/*--------------------------------------------------------------------------*/
197typedef struct {
198
200
201/*--------------------------------------------------------------------------*/
206typedef struct
207{
210 union
211 {
215 };
217
218/*--------------------------------------------------------------------------*/
224typedef struct
225{
228 union
229 {
233 };
234
237
238#ifdef __cplusplus
239};
240#endif
241
246#endif/* __INCLUDE_SENSING_GESTURE_COMMAND_H */
GestureArmPosition
Arm positions.
Definition: arm_gesture_command.h:94
GestureCmdType
Publishers.
Definition: arm_gesture_command.h:103
@ GESTURE_POS_DOWN
Definition: arm_gesture_command.h:96
@ GESTURE_POS_UP
Definition: arm_gesture_command.h:95
@ GESTURE_CMD_GET_TYPE
Definition: arm_gesture_command.h:105
@ GESTURE_CMD_SET_ARM_POSITION
Definition: arm_gesture_command.h:106
@ GESTURE_CMD_SET_TYPE
Definition: arm_gesture_command.h:104
@ GESTURE_CMD_ROTATION
Definition: arm_gesture_command.h:107
SensorExecResult
results.
Definition: sensor_command.h:113
Definition: arm_gesture_command.h:132
size_t size
Definition: arm_gesture_command.h:134
void * addr
Definition: arm_gesture_command.h:133
Rotation matrix. Assume x_adjusted, y_adjusted, z_adjusted as adjusted x, y, z acceleration value acc...
Definition: arm_gesture_command.h:161
the structure of gesture type.
Definition: arm_gesture_command.h:122
uint32_t type
Definition: arm_gesture_command.h:124
Assert information structure.
Definition: sensor_assertion.h:91
the structure of arm gesture commands.
Definition: arm_gesture_command.h:225
SensorFlushGesture flush_cmd
Definition: arm_gesture_command.h:232
SensorInitGesture init_cmd
Definition: arm_gesture_command.h:230
SensorCmdHeader header
Definition: arm_gesture_command.h:226
SensorResultArmGesture result
Definition: arm_gesture_command.h:235
SensorExecGesture exec_cmd
Definition: arm_gesture_command.h:231
the header of sensor commands.
Definition: sensor_command.h:126
the struct of gesture for the execute command.
Definition: arm_gesture_command.h:178
ThreeAxisSampleData update_gesture
Definition: arm_gesture_command.h:185
GestureCmdType cmd_type
Definition: arm_gesture_command.h:179
GestureTypes gesture_types
Definition: arm_gesture_command.h:184
GestureSetRotation gesture_rotation
Definition: arm_gesture_command.h:188
GestureArmPosition arm_position
Definition: arm_gesture_command.h:183
the command of gesture terminate.
Definition: arm_gesture_command.h:197
the structure of gesture type for initilaize.
Definition: arm_gesture_command.h:141
GestureTypes gesture_types
Definition: arm_gesture_command.h:143
GestureDebugDumpInfo debug_dump_info
Definition: arm_gesture_command.h:144
the structure of sensor result on arm gesture commands.
Definition: arm_gesture_command.h:207
GestureTypes gesture
Definition: arm_gesture_command.h:213
GestureArmPosition arm_pos
Definition: arm_gesture_command.h:212
SensorAssertionInfo assert_info
Definition: arm_gesture_command.h:214
SensorExecResult exec_result
Definition: arm_gesture_command.h:208
Definition: physical_command.h:95