SportTracks 2.0 API
ITimeDataSeries<(Of <(T>)>) Interface
SportTracks 2.0 APIZoneFiveSoftware.Common.DataITimeDataSeries<(Of <(T>)>)
An array of data values indexed by increasing elapsed time.
Declaration Syntax
C#Visual Basic
public interface ITimeDataSeries<T> : IEnumerable<ITimeValueEntry<T>>, 
	IEnumerable
Public Interface ITimeDataSeries(Of T) _
	Implements IEnumerable(Of ITimeValueEntry(Of T)), IEnumerable
Generic Template Parameters
T
Members
All MembersMethodsProperties



IconMemberDescription
Add(DateTime, T)
Add the value at the specified time. If AllowMultipleAtSameTime is false or if there is no entry at the specified elapsed time this sets the value at the specified time, otherwise the value is added to to the end maintaining the time order.

AllowMultipleAtSameTime
If true, multiple entries can appear at the same elapsed time, if false only a single entry will be present at each elapsed time. This is used for GPS routes, where points may be placed more frequently than once per second, or on a track with no time data.

Clear()()()
Clear all entries from the collection.

Count
Get the count of items in the data series.

EntryDateTime(ITimeValueEntry<(Of <(T>)>))
Return the DateTime of the specified entry. Shortcut to add StartTime + entry.ElapsedSeconds.

GetEnumerator()()()
Returns an enumerator that iterates through the collection.
(Inherited from IEnumerable<(Of <(ITimeValueEntry<(Of <(T>)>)>)>).)
GetEnumerator()()()
Returns an enumerator that iterates through a collection.
(Inherited from IEnumerable.)
GetInterpolatedValue(DateTime)
Returns a linear interpolated value based on existing data at the specified time.

GetValueEnumerator()()()
Returns an enumeration of the values.

IndexOf(ITimeValueEntry<(Of <(T>)>))
Return the index position of the specified entry.

Item[([(Int32])])
Return the value entry at the specified index.

RemoveAt(Int32)
Remove the entry at the specified index position.

SetValueAt(Int32, T)
Set the value at the specified index position.

StartTime
The start time of the data track. If Count is zero this value will be invalid.

TotalElapsedSeconds
The total elapsed seconds of the track.

Remarks
Data is stored in the series by an elapsed time which is a ushort (two bytes). As a result a data series can be no more than 18 hours, 12 minutes, 15 seconds (65536 seconds). For typical fitness data this is a reasonable limitation, and it reduces memory consuption versus storing something like a long (4 bytes) or DateTime.

A data series comes in two flavors - those that allow multiple points at the same time and those that don't as specified by the [P:ZoneFiveSoftware.Common.Data.ITimeValueEntry.AllowMultipleAtSameTime{T}] property.
For numeric data tracks such as a recording of heart-rate over time it doesn't make sense to allow multiple points at the same time (only one given heart-rate value can be sampled at any instant in time). In this mode, adding a data point at a time which already has one will replace the value.
For GPS tracks the AllowMultipleAtSameTime property is set to true which allows users to create a route that doesn't have time (all the points are at elapsed time = 0), or has points which are more frequent than one per second (the resolution of the data series since the elapsed time is stored as a ushort). In this mode data points added to the series which already contain a point at that elapsed time will be added to the end of points at that time (e.g, immediately before the point one second after the specified time).

See Also
ITimeValueEntry<(Of <(T>)>)

Assembly: Common.Data (Module: Common.Data) Version: 2.0.2972.36983