82 lines
2 KiB
Protocol Buffer
82 lines
2 KiB
Protocol Buffer
|
|
||
|
// @file sns_cmc.proto
|
||
|
//
|
||
|
// Defines message types for the Coarse Motion Classifier (CMC) Sensor.
|
||
|
//
|
||
|
// Copyright (c) 2017-2018 Qualcomm Technologies, Inc.
|
||
|
// All Rights Reserved.
|
||
|
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||
|
|
||
|
syntax = "proto2";
|
||
|
import "nanopb.proto";
|
||
|
import "sns_std_sensor.proto";
|
||
|
|
||
|
|
||
|
// CMC Sensor Attribute Requirements:
|
||
|
// SNS_STD_SENSOR_ATTRID_TYPE: "coarse_motion_classifier"
|
||
|
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_ON_CHANGE
|
||
|
|
||
|
// Stream Requests:
|
||
|
// - SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG is used to enable the sensor
|
||
|
|
||
|
// Message IDs for CMC Sensor
|
||
|
enum sns_cmc_msgid {
|
||
|
option (nanopb_enumopt).long_names = false;
|
||
|
|
||
|
SNS_CMC_MSGID_SNS_CMC_EVENT = 772;
|
||
|
}
|
||
|
|
||
|
// Gives the state which the algorithm is capable
|
||
|
// of detecting
|
||
|
enum sns_cmc_motion_state
|
||
|
{
|
||
|
option (nanopb_enumopt).long_names = false;
|
||
|
|
||
|
// stated with 1 to match with algo where 0
|
||
|
// is for UNKNOWN
|
||
|
SNS_CMC_STATIONARY = 1;
|
||
|
SNS_CMC_MOVE = 2;
|
||
|
SNS_CMC_FIDDLE = 3;
|
||
|
SNS_CMC_PEDESTRIAN = 4;
|
||
|
SNS_CMC_VEHICLE = 5;
|
||
|
SNS_CMC_WALK = 6;
|
||
|
SNS_CMC_RUN = 7;
|
||
|
SNS_CMC_BIKE = 8;
|
||
|
}
|
||
|
|
||
|
// Gives the information about the states represented
|
||
|
// by sns_cmc_motion_state
|
||
|
enum sns_cmc_motion_state_event
|
||
|
{
|
||
|
option (nanopb_enumopt).long_names = false;
|
||
|
// when any state of any of the motion state cannot
|
||
|
// be determined. The first event of first client will
|
||
|
// typically have all states as SNS_MS_UNKNOWN
|
||
|
SNS_MS_UNKNOWN = 0;
|
||
|
// A given motion state is ACTIVE
|
||
|
SNS_MS_ACTIVE = 1;
|
||
|
// A given motion state is INACTIVE
|
||
|
SNS_MS_INACTIVE = 2;
|
||
|
}
|
||
|
|
||
|
message sns_cmc_event
|
||
|
{
|
||
|
message data
|
||
|
{
|
||
|
// motion state by CMC
|
||
|
required sns_cmc_motion_state ms_state = 1;
|
||
|
|
||
|
// gives UNKNOWN/ACTIVE/INACTIVE information for the motion state
|
||
|
required sns_cmc_motion_state_event ms_state_event = 2 [default = SNS_MS_UNKNOWN];
|
||
|
}
|
||
|
|
||
|
repeated data events = 1;
|
||
|
}
|
||
|
|
||
|
// Stream events:
|
||
|
//
|
||
|
// The sns_cmc_event message is used to publish updated state
|
||
|
//
|
||
|
// CMC does not publish configuration events.
|
||
|
|