// @file sns_motion_detect.proto
//
// Defines standard message types for Motion Detect Sensor. All physical Sensor
// drivers that support Motion Detect Sensor are required to support the
// event messages as defined in this file.
//
// 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";
import "sns_physical_sensor_test.proto";

// Attribute requirements:
// The Motion Detect Sensor publishes:
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "motion_detect".
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS, SNS_STD_SENSOR_ATTRID_RANGES,
//    SNS_STD_SENSOR_ATTRID_RATES attributes are not applicable since this is
//    a single output sensor.
// 3. See sns_std_sensor.proto for other attributes.


// Handling stream requests:
// 1. A message with ID SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG is an
//    enable request to the motion_detect sensor.
// 2. A client deletes the data stream with motion_detect Sensor to disable it's
//    original enable request.

// Message IDs for motion_detect Sensor
enum sns_motion_detect_msgid {
  option (nanopb_enumopt).long_names = false;

  // The motion_detect Sensor publishes an event with this message ID
  SNS_MOTION_DETECT_MSGID_SNS_MOTION_DETECT_EVENT  = 771;
}

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

  SNS_MOTION_DETECT_EVENT_TYPE_DISABLED = 0;
  SNS_MOTION_DETECT_EVENT_TYPE_ENABLED  = 1;
  SNS_MOTION_DETECT_EVENT_TYPE_FIRED    = 2;
}

// Events types from motion detect Sensor
message sns_motion_detect_event
{
  required sns_motion_detect_event_type motion_detect_event_type = 1 [default = SNS_MOTION_DETECT_EVENT_TYPE_DISABLED];
}

