Developer World
Spresense SDK Library v3.2.0-ebc0364
step_counter_command.h
Go to the documentation of this file.
1/****************************************************************************
2 * modules/include/sensing/logical_sensor/step_counter_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_STEP_COUNTER_COMMAND_H
37#define __INCLUDE_SENSING_STEP_COUNTER_COMMAND_H
38
44/****************************************************************************
45 * Included Files
46 ****************************************************************************/
47
48#include <stdint.h>
49#include <stddef.h>
50
53
58#ifdef __cplusplus
59extern "C" {
60#endif /* __cplusplus */
61
62/****************************************************************************
63 * Pre-processor Definitions
64 ****************************************************************************/
65
70#define STEP_COUNTER_SAMPLING_MAX (32)
71
72/****************************************************************************
73 * Public Types
74 ****************************************************************************/
75
80typedef enum
81{
97
98/*--------------------------------------------------------------------------*/
104{
105 int32_t step_length;
110};
111
113
114/*--------------------------------------------------------------------------*/
120{
123};
124
126
127/*--------------------------------------------------------------------------*/
132typedef enum
133{
139
140/*--------------------------------------------------------------------------*/
145typedef enum
146{
155
156/*--------------------------------------------------------------------------*/
161{
162 void *addr;
163 size_t size;
164};
165
166/*--------------------------------------------------------------------------*/
171typedef struct
172{
176
177/*--------------------------------------------------------------------------*/
182typedef struct
183{
186 union
187 {
191 };
193
194/*--------------------------------------------------------------------------*/
199typedef struct
200{
201
203
204/*--------------------------------------------------------------------------*/
209typedef struct {
210
211 float tempo;
215 float stride;
219 float speed;
223 float distance;
227 uint32_t step;
235 uint64_t time_stamp;
239
240/*--------------------------------------------------------------------------*/
245typedef struct
246{
249 union
250 {
253 };
255
256/*--------------------------------------------------------------------------*/
262typedef struct
263{
266 union
267 {
271 };
272
275
276#ifdef __cplusplus
277};
278#endif
279
284#endif /* __INCLUDE_SENSING_STEP_COUNTER_COMMAND_H */
285
SensorExecResult
results.
Definition: sensor_command.h:113
StepCounterMovementType
Activity Class.
Definition: step_counter_command.h:133
StepCounterCmdType
Publishers.
Definition: step_counter_command.h:146
StepCounterStepMode
Step modes.
Definition: step_counter_command.h:81
@ STEP_COUNTER_MOVEMENT_TYPE_RUN
Definition: step_counter_command.h:137
@ STEP_COUNTER_MOVEMENT_TYPE_OTHER
Definition: step_counter_command.h:134
@ STEP_COUNTER_MOVEMENT_TYPE_WALK
Definition: step_counter_command.h:136
@ STEP_COUNTER_MOVEMENT_TYPE_STILL
Definition: step_counter_command.h:135
@ STEP_COUNTER_CMD_STEP_SET
Definition: step_counter_command.h:153
@ STEP_COUNTER_CMD_UPDATE_ACCELERATION
Definition: step_counter_command.h:147
@ STEP_COUNTER_CMD_UPDATE_GPS
Definition: step_counter_command.h:150
@ STEP_COUNTER_MODE_NEW_TABLE
Definition: step_counter_command.h:86
@ STEP_COUNTER_MODE_STEP_TABLE
Definition: step_counter_command.h:91
@ STEP_COUNTER_MODE_FIXED_LENGTH
Definition: step_counter_command.h:82
Definition: physical_command.h:121
Assert information structure.
Definition: sensor_assertion.h:91
the header of sensor commands.
Definition: sensor_command.h:126
the structure of step counter commands.
Definition: step_counter_command.h:263
SensorCmdHeader header
Definition: step_counter_command.h:264
SensorResultStepCounter result
Definition: step_counter_command.h:273
SensorExecStepCounter exec_cmd
Definition: step_counter_command.h:269
SensorFlushStepCounter flush_cmd
Definition: step_counter_command.h:270
SensorInitStepCounter init_cmd
Definition: step_counter_command.h:268
the command of STEP_COUNTER execute by a frame(a few sample).
Definition: step_counter_command.h:183
StepCounterSetting setting
Definition: step_counter_command.h:190
GnssSampleData update_gps
Definition: step_counter_command.h:189
ThreeAxisSampleData update_acc
Definition: step_counter_command.h:188
StepCounterCmdType cmd_type
Definition: step_counter_command.h:184
the command of STEP_COUNTER terminate.
Definition: step_counter_command.h:200
the structure of Accelstep setting for initilaize.
Definition: step_counter_command.h:172
StepCounterSetting setting
Definition: step_counter_command.h:173
StepCounterDebugDumpInfo debug_dump_info
Definition: step_counter_command.h:174
the structure of sensor result on step counter commands.
Definition: step_counter_command.h:246
StepCounterStepInfo steps
Definition: step_counter_command.h:251
SensorAssertionInfo assert_info
Definition: step_counter_command.h:252
SensorExecResult exec_result
Definition: step_counter_command.h:247
Definition: step_counter_command.h:161
size_t size
Definition: step_counter_command.h:163
void * addr
Definition: step_counter_command.h:162
the structure of step setting for initialize.
the structure of Accelstep user setting.
the structure of STEP_COUNTER results.
Definition: step_counter_command.h:209
float distance
Definition: step_counter_command.h:223
float tempo
Definition: step_counter_command.h:211
uint32_t step
Definition: step_counter_command.h:227
float speed
Definition: step_counter_command.h:219
float stride
Definition: step_counter_command.h:215
uint64_t time_stamp
Definition: step_counter_command.h:235
StepCounterMovementType movement_type
Definition: step_counter_command.h:231
Definition: physical_command.h:95
Definition: step_counter_command.h:104
int32_t step_length
Definition: step_counter_command.h:105
StepCounterStepMode step_mode
Definition: step_counter_command.h:109
Definition: step_counter_command.h:120
StepCounterSetParam running
Definition: step_counter_command.h:122
StepCounterSetParam walking
Definition: step_counter_command.h:121