// @file sns_amd.proto
//
// Defines message types for the Absolute Motion Detector (AMD) 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";

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

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

  SNS_AMD_MSGID_SNS_AMD_EVENT = 772;
}

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

  SNS_AMD_EVENT_TYPE_UNKNOWN          = 0;
  SNS_AMD_EVENT_TYPE_STATIONARY       = 1;
  SNS_AMD_EVENT_TYPE_MOTION           = 2;
}

message sns_amd_event
{
  // AMD motion state
  required sns_amd_event_type state = 1 [default = SNS_AMD_EVENT_TYPE_UNKNOWN];
}

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

