// @file qti_gravity.proto
//
// Defines standard message types for the QTI Gravity Proto
//
// Copyright (c) 2017 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
syntax = "proto2";
import "nanopb.proto";
import "sns_gravity.proto";

enum qti_gravity_msgid
{
  option (nanopb_enumopt).long_names = false;
  QTI_GRAVITY_MSGID_QTI_GRAVITY_MOTION_DATA_EVENT = 1029;
}

// Device Motion State detected by the gravity sensor
enum qti_gravity_device_motion_state
{
  option (nanopb_enumopt).long_names = false;

  // Device motion state is unknown
  QTI_GRAVITY_DEVICE_MOTION_STATE_UNKNOWN = 0;

  // Device is at absolute rest, an example of which
  // would be lying undisturbed on a desk
  QTI_GRAVITY_DEVICE_MOTION_STATE_ABS_REST = 1;

  // Device is at relative rest, an example of which
  // would be held steady in the user hand undergoing
  // no orientation change
  QTI_GRAVITY_DEVICE_MOTION_STATE_REL_REST = 2;

  // Device is in motion
  QTI_GRAVITY_DEVICE_MOTION_STATE_MOTION = 3;
}

// Configuration Message
// Used to either request for a certain configuration of the qti gravity sensor or
// alter an already existing configuration of the qti gravity sensor
// Uses sns_std_sensor_config defined in sns_std_sensor.proto
// The message field definitions are as follows:
// 1) float sample_rate
//      containing the required sample rate of the qti gravity sensor in hertz

// Data Message
// Output data event generated by the qti gravity sensor.
message qti_gravity_motion_data_event
{
  // Device motion state detected using the gravity vector
  required qti_gravity_device_motion_state device_motion_state = 1 [default=QTI_GRAVITY_DEVICE_MOTION_STATE_UNKNOWN];
}
