
// @file sns_rmd.proto
//
// Defines message types for the Absolute Motion Detector (RMD) Sensor.
//
// Copyright (c) 2017 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.

syntax = "proto2";
import "nanopb.proto";
import "sns_std_sensor.proto";

// RMD calculates motion and stationary states. RMD will initially start in an
// unknown state, and later transition to motion or stationary.

// RMD Sensor Attribute Requirements:
// SNS_STD_SENSOR_ATTRID_TYPE: "rmd"
// 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 RMD Sensor
enum sns_rmd_msgid {
  option (nanopb_enumopt).long_names = false;

  SNS_RMD_MSGID_SNS_RMD_EVENT = 772;
}

enum sns_rmd_event_type
{
  option (nanopb_enumopt).long_names = false;

  SNS_RMD_EVENT_TYPE_UNKNOWN          = 0;
  SNS_RMD_EVENT_TYPE_STATIONARY       = 1;
  SNS_RMD_EVENT_TYPE_MOTION           = 2;
}

message sns_rmd_event
{
  // RMD motion state
  required sns_rmd_event_type state = 1 [default = SNS_RMD_EVENT_TYPE_UNKNOWN];
}

// Stream events:
//
// The sns_rmd_event message is used to publish updated state
//
// RMD does not publish configuration events.

