/**
 * <p class=proto-main>This API is to upload Track Data.</p>
 *
 * <div class=proto-hier>
 *   UconnectAny
 *     |
 *     |---- <a href="#com.fca.uconnect.global.UploadTrackData">UploadTrackData uploadTrackData (2000)</a>
 *
 * </div>
 *
 *  <h3 class=change-log-hdr> Change Log</h3>
 *  <table id="change-log" class="change-log"><thead><tr>
 *	<td>Version</td><td>Date</td><td>Notes</td></tr></thead>
 *   <tbody>
  *    <tr><td>1.1</td><td>2017-11-2</td><td>Update to Proto3</td></tr>	
 *	<tr><td>1.0</td><td>2017-10-24</td><td>Release of initial Proto</td></tr>
 *	</tbody></table>
 *
 *  <h3 class=change-log-hdr>List of MQTT Topics</h3>
 *  <table class="change-log"><thead><tr>
 *	<td>Flow</td><td>Type</td><td>Topic Name</td></tr></thead>
 *    <tbody>
 *   <tr><td>Cloud send to Vehicle</td><td>Publish</td><td>fcasdp/${iot:ClientId}/PERF</td></tr>
 *	 <tr><td>Cloud receive from Vehicle</td><td>Subscribe</td><td>fcasdp/PERF/#</td></tr>
 *	 <tr><td>Vehicle send to Cloud </td><td>Publish</td><td>fcasdp/PERF/${iot:ClientId}</td></tr>
 *	 <tr><td>Vehicle receive from Cloud </td><td>Subscribe</td><td>fcasdp/${iot:ClientId}/#</td></tr>
 *	</tbody></table>
 * <h3 class=change-log-hdr>Data Flow</h3>
 *
 * <p class=proto-main>The following sequence diagram depicts the flow of messages between the TBM and the SDP:</p>
 *
 * <img class=img-border src=./images/perf.png>
 *
 * <table class=sequence-table><thead><tr>
 *	<td>Sequence</td><td>Title</td><td>Role</td><td>Message</td><td>Topic</td><td>Description</td></tr></thead>
 *   <tbody>
 * <tr><td>1.</td><td>UploadTrackData Event</td><td>TBM</td><td></td><td></td><td><p>The in-vehicle UploadTrackData event which triggers the client device to send an UploadTrackData Message to the SDP.</p></td></tr>
 * <tr><td>2.</td><td>Assign MessageId</td><td>TBM</td><td></td><td></td><td><p>The client generates the messageId for the message by incrementing a sequence counter.</p></td></tr>
 * <tr><td>3.</td><td>Send UploadTrackData Message</td><td>TBM</td><td>UploadTrackData</td><td>/PERF/${iot:ClientId}</td><td><p>The client populates the UploadTrackData Message with the required elements and publishes to the PERFORMANCE topic.</p></td></tr>
 * <tr><td>4.1</td><td>Process Message</td><td>SDP</td><td></td><td></td><td><p>The SDP processes the message and generates an ACK Message with the status and assign correct correlationId.</p></td></tr>
 * <tr><td>4.2.</td><td>Assign correlationID</td><td>SDP</td><td></td><td></td><td><p>Assign correct correlationId.</p></td></tr>
 * <tr><td>5</td><td>send AckMessage</td><td>SDP</td><td>AckMessage</td><td>/PERF/${iot:ClientId}</td><td><p>The SDP sends AckMessage to acknowledge that it received UploadTrackData Message.</p></td></tr>
 * <tr><td>6</td><td>Process AckMessage</td><td>TBM</td><td></td><td></td><td><p>The client process AckMessage.</p></td></tr>
 * </tbody>
 * </table>
 */
syntax="proto3";
package com.fca.uconnect.global;


//import public "Global_Uconnect_Control.proto";
/**
 * This message is to upload the track Data.
 * <div class=exmsg-main>
 * <h4>UploadTrackData Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 *  timestamp: 1508946513018
 *  messageId: 1
 *  messages {
 *  [com.fca.uconnect.global.uploadTrackData] {
 *    vehicleId: "VIN"
 *    website: "WEBSITE"
 *    timers {
 *      type: REACTION_TIME
 *      values {
 *        timer: BRAKE_DISTANCE_FEET
 *        units: FEET
 *        value: 1.0
 *      }
 *    }
 *  }
 * }
 *	</code>
 * </div>
 * </div>
 */
message UploadTrackData {
 	

	message Timers {

		enum TimerTypeEnum {
			REACTION_TIME = 0;/// Current reaction times.
			REACTION_TIME_LAST = 1;/// Previous reaction times.
			REACTION_TIME_BEST = 2;/// The best recorded reation times.
		}
		enum TimerEnum {
			DISTANCE_TO_60FT = 0;/// Timer.
			DISTANCE_TO_330FT = 1;/// Timer.
			DISTANCE_TO_1000FT = 2;/// Timer.
			SPEED_0_TO_60MPH = 3;/// Timer.
			SPEED_0_TO_100MPH = 4;/// Timer.
			V_8_ET = 5;/// Timer.
			V_8_SPEED = 6;/// Speed.
			V_4_ET = 7;/// Timer.
			V_4_SPEED = 8;/// Speed.
			BRAKE_DISTANCE_FEET = 9;/// Distance.
			BRAKE_FROM_SPEED_MPH = 10;/// Speed.
			DISTANCE_TO_20M = 11;/// Timer.
			DISTANCE_TO_100M = 12;/// Timer.
			DISTANCE_TO_300M = 13;/// Timer.
			SPEED_0_TO_100KMPH = 14;/// Timer.
			SPEED_0_TO_160KMPH = 15;/// Timer.
			ET_200 = 16;/// Timer.
			SPEED_200 = 17;/// Speed.
			ET_400 = 18;/// Timer.
			SPEED_400 = 19;/// Speed.
			BRAKE_DISTANCE_METER = 20;/// Distance.
			BRAKE_FROM_SPEED_KMPH = 21;/// Speed.
		}
		enum UnitsEnum {
			SECONDS = 0;/// Time in Seconds.
			MPH = 1;/// Miles Per Hour.
			FEET = 2;/// Distance in Feet.
			KMPH = 3;/// Kilometers Per Hour.
			METERS = 4;/// Distance in Meters.
		}

		message TimerValue {
			TimerEnum timer = 1; /// Indicates the specific timer.
			UnitsEnum units = 2; /// Units of the value.
			float value = 3; /// Recorded value.
		}

		 TimerTypeEnum type = 1;/// Indicates the current, previous, or best times.
		repeated TimerValue values = 2;/// The recorded values for the various performance metrics. 
	}

	 string vehicleId = 1;/// Provide vehicle identifier when the session on the secure channel cannot be used to identify the client. 
	 string vehicleLine = 2;/// Provide the vehicle line.
	
	 int64 timestamp = 4;/// Event Timestamp
	string website = 5;/// Website
	repeated Timers timers = 6;/// The set of timers for current, previous, and best.
}

//extend UconnectAny{
	//UploadTrackData uploadTrackData=2000;
	//AckMessage perfAckMessage=2001;
//}

