// @file sns_pedometer.proto
//
// Defines message types for the Pedometer 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";

// The Pedometer Sensor detects steps taken by the user
//
// The Pedometer Step event is generated when the user takes a step.
// The event includes the latest step count accumulated since activation.
// All clients to Pedometer get the same step event.
// The timestamp of the event indicates the time of the latest detected step.

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

  SNS_PEDOMETER_MSGID_SNS_STEP_EVENT = 1028;
  
  //send to client immediatly to inform current step count
  //msg body same as sns_step_event
  SNS_PEDOMETER_MSGID_SNS_STEP_EVENT_CONFIG = 775;
}

// Events types from Pedometer Sensor
message sns_step_event
{
  //an incrementing step count
  required uint32 step_count = 1;
}

message sns_step_event_config
{
  //current step count
  required uint32 step_count = 1;
}


// Stream events:
//
// The sns_step_event message is used to publish updated step count
//
// Pedometer does not publish configuration events.

