// @file sns_sar.proto
//
// Defines standard message types for the SAR
//
// Copyright (c) 2018-2019 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 SAR Sensor publishes:
// 1. SNS_STD_SENSOR_ATTRID_TYPE attribute value as "sar".
//    Each SAR sensor (example individual capacitive button) shall be published
//    as an independent sensor with a unique Sensor UID.
// 2. SNS_STD_SENSOR_ATTRID_RESOLUTIONS attribute is not applicable since this
//    is an event sensor.
// 3. SNS_STD_SENSOR_ATTRID_RANGES attribute values in cm unit (proximity distance).
// 4. See sns_std_sensor.proto for other attributes.

// Handling stream and on-change requests:
// 1. The SAR sensor can support both streaming and on-change
//    modes, and the operating mode is configured in the Registry.
// 2. In streaming mode, the SAR sensor handles the sns_std_sensor_config
//    client requests, for all stream enable/update request types. 
// 3. In on-change mode, the SAR sensor handles the 
//    SNS_STD_SENSOR_MSGID_SNS_STD_ON_CHANGE_CONFIG client requests,
//    for all on-change enable/update request types.
//    In on-change mode, the SAR sensor reports samples only for
//    NEAR/FAR transitions triggered by the detection of an object 
//    (typically human) in proximity to the SAR sensor. 
//    Also for this mode, the SAR sensor publishes an 
//    initial data event for each new, on-change client request.

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

  SNS_SAR_MSGID_SNS_SAR_DATA = 767;
}


// Configuration Message
// Used to either request for a certain configuration of the Sim Sensor or
// alter an already existing configuration of the Simulation 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 Sim sensor in hertz

// Data Message
// Output data event generated by the sar sensor.
message sns_sar_data
{
  repeated float sar = 1;

  // Accuracy of the data
  required sns_std_sensor_sample_status accuracy = 2;
}


