Developer World
Spresense SDK Library v3.3.0-375c679
transport_mode_command.h
Go to the documentation of this file.
1/****************************************************************************
2 * modules/include/sensing/logical_sensor/transport_mode_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_TRAM_COMMAD_H
37#define __INCLUDE_SENSING_TRAM_COMMAD_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
69#define TRAM_ACC_SAMPLING 64
70
74#define TRAM_MAG_SAMPLING 8
75
79#define TRAM_BAR_SAMPLING 8
80
81/****************************************************************************
82 * Public Types
83 ****************************************************************************/
84
88typedef enum {
91 TramCmdTypeNum
93
97typedef enum {
101 TramStateNum
102} TramState;
103
104
108typedef enum {
113
117enum
118{
133};
134
135
136/* --------------------------------------------------------------------------
137 * Command Structures
138 * --------------------------------------------------------------------------
139 */
144{
145 void *addr;
146 size_t size;
147};
148
149/*--------------------------------------------------------------------------*/
153typedef struct
154{
155
156 FAR float *likelihood;
159
160/*--------------------------------------------------------------------------*/
164typedef struct
165{
168 union
169 {
173 };
175
176/*--------------------------------------------------------------------------*/
181typedef struct {
182
184
185/*--------------------------------------------------------------------------*/
190typedef struct
191{
196
197/*--------------------------------------------------------------------------*/
203typedef struct
204{
207 union
208 {
212 };
213
216
217#ifdef __cplusplus
218};
219#endif
220
225#endif /* __INCLUDE_SENSING_TRAM_COMMAD_H */
SensorExecResult
results.
Definition: sensor_command.h:113
TramCmdType
Definition: transport_mode_command.h:88
TramState
Definition: transport_mode_command.h:97
TramSensorType
Definition: transport_mode_command.h:108
@ TramCmdTypeResult
Definition: transport_mode_command.h:89
@ TramCmdTypeTrans
Definition: transport_mode_command.h:90
@ TramStateMs
Definition: transport_mode_command.h:98
@ TramStateTmi
Definition: transport_mode_command.h:100
@ TramStateCmd
Definition: transport_mode_command.h:99
@ TramSensorMag
Definition: transport_mode_command.h:110
@ TramSensorBar
Definition: transport_mode_command.h:111
@ TramSensorAcc
Definition: transport_mode_command.h:109
@ TRAM_CLASS_STAY
Definition: transport_mode_command.h:120
@ TRAM_CLASS_TRAIN
Definition: transport_mode_command.h:129
@ TRAM_CLASS_UPSTAIRS
Definition: transport_mode_command.h:123
@ TRAM_CLASS_BUS
Definition: transport_mode_command.h:130
@ TRAM_CLASS_RUN
Definition: transport_mode_command.h:122
@ TRAM_CLASS_ESCDOWN
Definition: transport_mode_command.h:126
@ TRAM_CLASS_DOWNSTAIRS
Definition: transport_mode_command.h:124
@ TRAM_CLASS_ELEVDOWN
Definition: transport_mode_command.h:128
@ TRAM_CLASS_CAR
Definition: transport_mode_command.h:131
@ TRAM_CLASS_ELEVUP
Definition: transport_mode_command.h:127
@ TRAM_CLASS_ESCUP
Definition: transport_mode_command.h:125
@ TRAM_CLASS_UNDETERMINED
Definition: transport_mode_command.h:119
@ TRAM_CLASS_WALK
Definition: transport_mode_command.h:121
@ TRAM_CLASS_BICYCLE
Definition: transport_mode_command.h:132
the frame of Barometer data.
Definition: physical_command.h:108
Assert information structure.
Definition: sensor_assertion.h:91
the header of sensor commands.
Definition: sensor_command.h:126
the structure of transport mode commands.
Definition: transport_mode_command.h:204
SensorFlushTram flush_cmd
Definition: transport_mode_command.h:211
SensorResultTram result
Definition: transport_mode_command.h:214
SensorExecTram exec_cmd
Definition: transport_mode_command.h:210
SensorCmdHeader header
Definition: transport_mode_command.h:205
SensorInitTram init_cmd
Definition: transport_mode_command.h:209
Definition: transport_mode_command.h:165
ThreeAxisSampleData acc_data
Definition: transport_mode_command.h:170
BarSampleData bar_data
Definition: transport_mode_command.h:172
TramSensorType type
Definition: transport_mode_command.h:166
ThreeAxisSampleData mag_data
Definition: transport_mode_command.h:171
Definition: transport_mode_command.h:181
Definition: transport_mode_command.h:154
TramDebugDumpInfo debug_dump_info
Definition: transport_mode_command.h:157
the structure of sensor result on transport mode commands.
Definition: transport_mode_command.h:191
SensorAssertionInfo assert_info
Definition: transport_mode_command.h:193
SensorExecResult exec_result
Definition: transport_mode_command.h:192
Definition: physical_command.h:95
Definition: transport_mode_command.h:144
size_t size
Definition: transport_mode_command.h:146
void * addr
Definition: transport_mode_command.h:145