Developer World
Spresense SDK Library v1.4.0-aa7f53a
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
59 extern "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 
80 typedef enum
81 {
97 
98 /*--------------------------------------------------------------------------*/
104 {
105  int32_t step_length;
109  StepCounterStepMode step_mode;
110 };
111 
113 
114 /*--------------------------------------------------------------------------*/
120 {
123 };
124 
126 
127 /*--------------------------------------------------------------------------*/
132 typedef enum
133 {
139 
140 /*--------------------------------------------------------------------------*/
145 typedef enum
146 {
155 
156 /*--------------------------------------------------------------------------*/
161 {
162  void *addr;
163  size_t size;
164 };
165 
166 /*--------------------------------------------------------------------------*/
171 typedef struct
172 {
176 
177 /*--------------------------------------------------------------------------*/
182 typedef struct
183 {
184  StepCounterCmdType cmd_type;
186  union
187  {
191  };
193 
194 /*--------------------------------------------------------------------------*/
199 typedef struct
200 {
201 
203 
204 /*--------------------------------------------------------------------------*/
209 typedef struct {
210 
211  float tempo;
215  float stride;
219  float speed;
223  float distance;
227  uint32_t step;
231  StepCounterMovementType movement_type;
235  uint64_t time_stamp;
239 
240 /*--------------------------------------------------------------------------*/
245 typedef struct
246 {
249  union
250  {
253  };
255 
256 /*--------------------------------------------------------------------------*/
262 typedef struct
263 {
266  union
267  {
271  };
272 
275 
276 #ifdef __cplusplus
277 };
278 #endif
279 
284 #endif /* __INCLUDE_SENSING_STEP_COUNTER_COMMAND_H */
285 
Definition: step_counter_command.h:103
Definition: step_counter_command.h:160
Definition: step_counter_command.h:137
SensorResultStepCounter result
Definition: step_counter_command.h:273
GnssSampleData update_gps
Definition: step_counter_command.h:189
the command of STEP_COUNTER execute by a frame(a few sample).
Definition: step_counter_command.h:182
ThreeAxisSampleData update_acc
Definition: step_counter_command.h:188
the structure of step setting for initialize.
float speed
Definition: step_counter_command.h:219
void * addr
Definition: step_counter_command.h:162
StepCounterCmdType cmd_type
Definition: step_counter_command.h:184
float distance
Definition: step_counter_command.h:223
int32_t step_length
Definition: step_counter_command.h:105
Definition: physical_command.h:120
SensorCmdHeader header
Definition: step_counter_command.h:264
Definition: step_counter_command.h:136
Definition: step_counter_command.h:82
Definition: step_counter_command.h:119
the command of STEP_COUNTER terminate.
Definition: step_counter_command.h:199
SensorExecResult
results.
Definition: sensor_command.h:113
Definition: step_counter_command.h:134
uint32_t step
Definition: step_counter_command.h:227
StepCounterCmdType
Publishers.
Definition: step_counter_command.h:145
StepCounterSetParam running
Definition: step_counter_command.h:122
StepCounterSetting setting
Definition: step_counter_command.h:190
Definition: step_counter_command.h:86
SensorExecStepCounter exec_cmd
Definition: step_counter_command.h:269
Definition: step_counter_command.h:147
the structure of step counter commands.
Definition: step_counter_command.h:262
Definition: step_counter_command.h:150
the structure of STEP_COUNTER results.
Definition: step_counter_command.h:209
SensorExecResult exec_result
Definition: step_counter_command.h:247
the header of sensor commands.
Definition: sensor_command.h:125
StepCounterMovementType movement_type
Definition: step_counter_command.h:231
Definition: physical_command.h:94
size_t size
Definition: step_counter_command.h:163
StepCounterSetParam walking
Definition: step_counter_command.h:121
Definition: step_counter_command.h:135
StepCounterStepInfo steps
Definition: step_counter_command.h:251
StepCounterMovementType
Activity Class.
Definition: step_counter_command.h:132
SensorAssertionInfo assert_info
Definition: step_counter_command.h:252
Definition: step_counter_command.h:153
float stride
Definition: step_counter_command.h:215
StepCounterStepMode
Step modes.
Definition: step_counter_command.h:80
float tempo
Definition: step_counter_command.h:211
SensorFlushStepCounter flush_cmd
Definition: step_counter_command.h:270
uint64_t time_stamp
Definition: step_counter_command.h:235
the structure of sensor result on step counter commands.
Definition: step_counter_command.h:245
Assert information structure.
Definition: sensor_assertion.h:90
StepCounterSetting setting
Definition: step_counter_command.h:173
SensorInitStepCounter init_cmd
Definition: step_counter_command.h:268
the structure of Accelstep setting for initilaize.
Definition: step_counter_command.h:171
Definition: step_counter_command.h:91
StepCounterDebugDumpInfo debug_dump_info
Definition: step_counter_command.h:174
the structure of Accelstep user setting.
StepCounterStepMode step_mode
Definition: step_counter_command.h:109