polar-prost 0.1.0

Protobuf bindings to interact with Polar watches
Documentation
syntax = "proto2";
package data;

import "types.proto";

message PbPhaseGoal {
	required data.PbPhaseGoal.PhaseGoalType goal_type = 1 ;
	optional types.PbDuration duration = 2 ;
	optional float distance = 3 ;
	optional uint32 heart_rate = 4 ;

	enum PhaseGoalType {
		PHASE_GOAL_OFF = 0;
		PHASE_GOAL_TIME = 1;
		PHASE_GOAL_DISTANCE = 2;
		PHASE_GOAL_INCREASING_HR = 3;
		PHASE_GOAL_DECREASING_HR = 4;
		PHASE_GOAL_RACE_PACE = 5;
	}
}

message PbPhaseIntensity {
	required data.PbPhaseIntensity.PhaseIntensityType intensity_type = 1 ;
	optional data.PbPhaseIntensity.IntensityZone heart_rate_zone = 2 ;
	optional data.PbPhaseIntensity.IntensityZone speed_zone = 3 ;
	optional data.PbPhaseIntensity.IntensityZone power_zone = 4 ;

	enum PhaseIntensityType {
		PHASE_INTENSITY_FREE = 0;
		PHASE_INTENSITY_SPORTZONE = 1;
		PHASE_INTENSITY_SPEED_ZONE = 2;
		PHASE_INTENSITY_POWER_ZONE = 3;
	}

	message IntensityZone {
		required uint32 lower = 1 ;
		required uint32 upper = 2 ;
	}
}

message PbPhase {
	required types.PbOneLineText name = 1 ;
	required data.PbPhase.PbPhaseChangeType change = 2 ;
	required data.PbPhaseGoal goal = 3 ;
	required data.PbPhaseIntensity intensity = 4 ;
	optional uint32 repeat_count = 5 ;
	optional uint32 jump_index = 6 ;

	enum PbPhaseChangeType {
		CHANGE_MANUAL = 0;
		CHANGE_AUTOMATIC = 1;
	}
}

message PbPhases {
	repeated data.PbPhase phase = 1 ;
}