Show / Hide Table of Contents

Interface ICompositeParameterDataAccess

Interface describing a CompositeParameterDataAccess

Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public interface ICompositeParameterDataAccess : IDisposable

Properties

CurrentDistance

Get the current distance

Declaration
Nullable<double> CurrentDistance { get; }
Property Value
Type Description
System.Nullable<System.Double>

CurrentTime

Gets the current position.

Declaration
Nullable<long> CurrentTime { get; }
Property Value
Type Description
System.Nullable<System.Int64>

The current timestamp for the PDA.

Owner

Gets or Sets the CompositeSession Key that owns this Pda

Declaration
CompositeSessionKey Owner { get; }
Property Value
Type Description
MAT.OCS.Core.CompositeSessionKey

ParameterIdentifier

Identifier

Declaration
string ParameterIdentifier { get; }
Property Value
Type Description
System.String

ParentCompositeSession

Gets the parent composite session.

Declaration
ICompositeSession ParentCompositeSession { get; }
Property Value
Type Description
ICompositeSession

The parent composite session.

PdaCurrentPosition

Gets the current position for the PDA (supersedes CurrentPosition).

Declaration
PdaCurrentPosition PdaCurrentPosition { get; }
Property Value
Type Description
PdaCurrentPosition

The current position of the PDA.

SampleTime

Gets or sets the sample time (in nanoseconds) for the data. This value will only affect requests to get data (using the GetNextData method ) and will not affect calls to get samples (using the GetNextSamples/GetPreviousSamples methods).

Declaration
long SampleTime { get; set; }
Property Value
Type Description
System.Int64
Remarks

This time is the interval between data samples. For example: 1,000,000 ns = 1000Hz 10,000,000 ns = 100Hz 100,000,000 ns = 10Hz 1,000,000,000 ns = 1Hz If this value is not set then the default sample time is 100Hz (10,000,000 ns).

Methods

GetAbsoluteSamples(Int32, Int64, Int64)

Get Absolute Samples (no default offset applied).

Declaration
ParameterValues GetAbsoluteSamples(int maximumNumberOfSamples, long startTimeStamp, long endTimeStamp)
Parameters
Type Name Description
System.Int32 maximumNumberOfSamples
System.Int64 startTimeStamp
System.Int64 endTimeStamp
Returns
Type Description
MAT.OCS.Core.ParameterValues

GetAbsoluteSamples(Int32, Int64, Int64, ref Double[], ref DataStatusType[], ref Int64[])

Get Absolute Samples (no default offset applied).

Declaration
int GetAbsoluteSamples(int maximumNumberOfSamples, long startTimeStamp, long endTimeStamp, ref double[] data, ref DataStatusType[] status, ref long[] time)
Parameters
Type Name Description
System.Int32 maximumNumberOfSamples
System.Int64 startTimeStamp
System.Int64 endTimeStamp
System.Double[] data
MAT.OCS.Core.DataStatusType[] status
System.Int64[] time
Returns
Type Description
System.Int32

GetDataStatistics(Int64, Int64, Boolean, StatisticOption)

Returns the maximum, minimum and mean values for a range of data. Optionally returns the position and status of the values.

Declaration
CompositeStatistics[] GetDataStatistics(long startTimeStamp, long duration, bool weightStatistics, StatisticOption statisticOption)
Parameters
Type Name Description
System.Int64 startTimeStamp

Start time of data range in nanoseconds.

System.Int64 duration

Length of data range in nanoseconds.

System.Boolean weightStatistics

Weight statistics flag.

StatisticOption statisticOption

The statistic to be retrieved

Returns
Type Description
CompositeStatistics[]
Remarks

If data is requested data is either before or after samples are available then a zero numberOfSamples will be returned.

Exceptions
Type Condition
System.ArgumentException

Thrown if the startTimeStampis less than zero or duration is less than, or equal to zero.

GetEndTime()

Returns the end time of the parameters data.

Declaration
Dictionary<SessionKey, Nullable<long>> GetEndTime()
Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Nullable<System.Int64>>

The end time.

GetLapStatistics(Lap, Boolean, StatisticOption)

Gets the lap statistics for the passed lap parameter. The calculated statistics will be cached for improved performance.

Declaration
CompositeStatistics[] GetLapStatistics(Lap lap, bool weightStatistics, StatisticOption statisticOption)
Parameters
Type Name Description
Lap lap

The lap to get statistics for.

System.Boolean weightStatistics

Weight statistics flag.

StatisticOption statisticOption

The statistic to be retrieved

Returns
Type Description
CompositeStatistics[]

GetMaximumFrequency()

Returns maximum frequencies for session keys.

Declaration
Dictionary<SessionKey, double> GetMaximumFrequency()
Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Double>

A dictionary where keys are session keys and values are doubles representing maximum frequencies.

Remarks

If zero, then the frequency could not be determined.

GetMaximumSampleRate()

Get Maximum Sample Rate

Declaration
Dictionary<SessionKey, Nullable<long>> GetMaximumSampleRate()
Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Nullable<System.Int64>>
Exceptions
Type Condition
System.NotImplementedException

GetMinimumFrequency()

Returns minimum frequencies for session keys.

Declaration
Dictionary<SessionKey, double> GetMinimumFrequency()
Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Double>

A dictionary where keys are session keys and values are doubles representing minimum frequencies.

Remarks

If zero, then the frequency could not be determined.

GetNextData(Int32, SampleModeType, Boolean, ref Double[], ref DataStatusType[])

Gets the next sampled data values and MAT.OCS.Core.DataStatusType based on the number of samples requested.

Declaration
void GetNextData(int numberOfSamples, SampleModeType sampleMode, bool interpolate, ref double[] data, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

SampleModeType sampleMode

The SampleModeType.

System.Boolean interpolate

If set to true, returned data is interpolated.

System.Double[] data

Sampled data.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data

Remarks

On completion of this call, the CurrentTime will be set to the end of the returned data

GetNextData(Int32, Boolean, ref MinimumMaximumMeanDouble[], ref DataStatusType[])

Returns the next sampled data values and MAT.OCS.Core.DataStatusType based on the number of samples requested using the min/max/mean sampler.

Declaration
void GetNextData(int numberOfSamples, bool interpolate, ref MinimumMaximumMeanDouble[] data, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

System.Boolean interpolate

If set to true, returned data is interpolated.

MinimumMaximumMeanDouble[] data

The minimum/maximum/mean values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data.

Remarks

Does not use linear interpolation between samples. On completion of this call, the CurrentTime will be set to the end of the returned data

GetNextData(Int32, Boolean, ref Double[], ref Double[], ref DataStatusType[])

Returns the next sampled data values and MAT.OCS.Core.DataStatusType based on the number of samples requested using min/max sampler.

Declaration
void GetNextData(int numberOfSamples, bool interpolate, ref double[] minimumValues, ref double[] maximumValues, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

System.Boolean interpolate

If set to true, returned data is interpolated.

System.Double[] minimumValues

The minimum values.

System.Double[] maximumValues

The maximum values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data.

Remarks

On completion of this call, the CurrentTime will be set to the end of the returned data

GetNextData(Int32, ref Double[], ref DataStatusType[])

Returns the next sampled data values and MAT.OCS.Core.DataStatusType based on the number of samples requested.

Declaration
void GetNextData(int numberOfSamples, ref double[] data, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

System.Double[] data

Sampled data.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data.

Remarks

Uses SampleModeType.Mean and does not interpolate between samples. On completion of this call, the CurrentTime will be set to the end of the returned data.

GetNextData(Int64[])

Returns sampled data for each of the specified timestamps passed in.

Declaration
ParameterValues GetNextData(long[] sampleTimestamps)
Parameters
Type Name Description
System.Int64[] sampleTimestamps

The sample timestamps to retrieve data for.

Returns
Type Description
MAT.OCS.Core.ParameterValues
Remarks

Uses SampleModeType.Mean and does not use linear interpolation between samples.

GetNextData(Int64[], SampleModeType, Boolean)

Returns sampled data for each of the specified timestamps passed in.

Declaration
ParameterValues GetNextData(long[] sampleTimestamps, SampleModeType sampleMode, bool interpolate)
Parameters
Type Name Description
System.Int64[] sampleTimestamps

The sample timestamps to retrieve data for.

SampleModeType sampleMode

The SampleModeType.

System.Boolean interpolate

If set to true, returned data is interpolated.

Returns
Type Description
MAT.OCS.Core.ParameterValues

GetNextData(Int64[], SampleModeType, Boolean, ref Double[], ref DataStatusType[])

Returns sampled data for each of the specified timestamps passed in.

Declaration
void GetNextData(long[] sampleTimestamps, SampleModeType sampleMode, bool interpolate, ref double[] data, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int64[] sampleTimestamps

The sample timestamps to retrieve data for.

SampleModeType sampleMode

The SampleModeType.

System.Boolean interpolate

If set to true, returned data is interpolated.

System.Double[] data

Sampled data.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data.

GetNextData(Int64[], Boolean)

Returns sampled data for each of the timestamps passed in, using min/max sampler.

Declaration
ParameterValues GetNextData(long[] timestamps, bool interpolate)
Parameters
Type Name Description
System.Int64[] timestamps

The sample timestamps.

System.Boolean interpolate

If set to true, returned data is interpolated.

Returns
Type Description
MAT.OCS.Core.ParameterValues
Remarks

Does not use linear interpolation between samples.

GetNextData(Int64[], Boolean, ref Double[], ref Double[], ref DataStatusType[])

Returns sampled data for each of the timestamps passed in, using min/max sampler.

Declaration
void GetNextData(long[] timestamps, bool interpolate, ref double[] minimumValues, ref double[] maximumValues, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int64[] timestamps

The sample timestamps.

System.Boolean interpolate

If set to true, returned data is interpolated.

System.Double[] minimumValues

The minimum values.

System.Double[] maximumValues

The maximum values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data.

Remarks

Does not use linear interpolation between samples.

GetNextData(Int64[], ref Double[], ref DataStatusType[])

Returns sampled data for each of the specified timestamps passed in.

Declaration
void GetNextData(long[] sampleTimestamps, ref double[] data, ref DataStatusType[] status)
Parameters
Type Name Description
System.Int64[] sampleTimestamps

The sample timestamps to retrieve data for.

System.Double[] data

Sampled data.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the sampled data.

Remarks

Uses SampleModeType.Mean and does not use linear interpolation between samples.

GetNextSamples(Int32)

Returns the next raw data samples, their MAT.OCS.Core.DataStatusType and time based on the number of samples requested.

Declaration
ParameterValues GetNextSamples(int numberOfSamples)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

Returns
Type Description
MAT.OCS.Core.ParameterValues

The number of samples available.

Remarks

On completion of this call, the CurrentTime will be set to the end of the returned data

GetNextSamples(Int32, ref Double[], ref DataStatusType[], ref Int64[])

Returns the next raw data samples, their MAT.OCS.Core.DataStatusType and time based on the number of samples requested.

Declaration
int GetNextSamples(int numberOfSamples, ref double[] data, ref DataStatusType[] status, ref long[] time)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

System.Double[] data

Raw data values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the raw data values.

System.Int64[] time

Timestamps of the raw data values.

Returns
Type Description
System.Int32

The number of samples available.

Remarks

On completion of this call, the CurrentTime will be set to the end of the returned data

GetNextSamples(Int64)

Returns the next raw data samples, their MAT.OCS.Core.DataStatusType and timestamps between the current time and the endTime provided.

Declaration
ParameterValues GetNextSamples(long endTime)
Parameters
Type Name Description
System.Int64 endTime

The end time.

Returns
Type Description
MAT.OCS.Core.ParameterValues

The number of samples available.

GetNextSamples(Int64, ref Double[], ref DataStatusType[], ref Int64[])

Returns the next raw data samples, their MAT.OCS.Core.DataStatusType and timestamps between the current time and the endTime provided.

Declaration
int GetNextSamples(long endTime, ref double[] data, ref DataStatusType[] status, ref long[] timestamps)
Parameters
Type Name Description
System.Int64 endTime

The end time.

System.Double[] data

Raw data values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the raw data values

System.Int64[] timestamps

Timestamps of the raw data values.

Returns
Type Description
System.Int32

The number of samples available.

GetPreviousSamples(Int32)

Returns the next raw data samples, their MAT.OCS.Core.DataStatusType and time based on the number of samples requested.

Declaration
ParameterValues GetPreviousSamples(int numberOfSamples)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

Returns
Type Description
MAT.OCS.Core.ParameterValues

The number of samples available.

Remarks

On completion of this call, the CurrentTime will be set to the end of the returned data

GetPreviousSamples(Int32, ref Double[], ref DataStatusType[], ref Int64[])

Returns the previous raw data samples, their MAT.OCS.Core.DataStatusType and time based on the number of samples requested.

Declaration
int GetPreviousSamples(int numberOfSamples, ref double[] data, ref DataStatusType[] status, ref long[] time)
Parameters
Type Name Description
System.Int32 numberOfSamples

Number of samples to retrieve.

System.Double[] data

Raw data values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the raw data values.

System.Int64[] time

Timestamps of the raw data values.

Returns
Type Description
System.Int32

The number of samples available.

GetPreviousSamples(Int64)

Returns the previous raw data samples, their MAT.OCS.Core.DataStatusType and timestamp, starting at endTime and ending at the CurrentTime.

Declaration
ParameterValues GetPreviousSamples(long endTime)
Parameters
Type Name Description
System.Int64 endTime

The end time.

Returns
Type Description
MAT.OCS.Core.ParameterValues

Number of samples available

GetPreviousSamples(Int64, ref Double[], ref DataStatusType[], ref Int64[])

Returns the previous raw data samples, their MAT.OCS.Core.DataStatusType and timestamp, starting at endTime and ending at the CurrentTime.

Declaration
int GetPreviousSamples(long endTime, ref double[] data, ref DataStatusType[] status, ref long[] timestamps)
Parameters
Type Name Description
System.Int64 endTime

The end time.

System.Double[] data

Raw data values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the raw data values.

System.Int64[] timestamps

Timestamps of the data.

Returns
Type Description
System.Int32

Number of samples available

GetSamples(Int32, Int64, Int64)

Returns a number of raw data samples between a start and end sample time, along with their MAT.OCS.Core.DataStatusType and timestamps.

Declaration
ParameterValues GetSamples(int maximumNumberOfSamples, long startTimeStamp, long endTimeStamp)
Parameters
Type Name Description
System.Int32 maximumNumberOfSamples

Maximum number of samples to return.

System.Int64 startTimeStamp

Start time stamp of the data.

System.Int64 endTimeStamp

Close time stamp of the data.

Returns
Type Description
MAT.OCS.Core.ParameterValues

The number of samples available.

Remarks

If the number of samples requested is greater than the total samples then only the samples available are returned.

The method will move to the next sample if the startTimeStamp does not fall exactly on the timestamp of a sample.

GetSamples(Int32, Int64, Int64, ref Double[], ref DataStatusType[], ref Int64[])

Returns a number of raw data samples between a start and end sample time, along with their MAT.OCS.Core.DataStatusType and timestamps.

Declaration
int GetSamples(int maximumNumberOfSamples, long startTimeStamp, long endTimeStamp, ref double[] data, ref DataStatusType[] status, ref long[] time)
Parameters
Type Name Description
System.Int32 maximumNumberOfSamples

Maximum number of samples to return.

System.Int64 startTimeStamp

Start time stamp of the data.

System.Int64 endTimeStamp

Close time stamp of the data.

System.Double[] data

Raw data values.

MAT.OCS.Core.DataStatusType[] status

MAT.OCS.Core.DataStatusType of the raw data values.

System.Int64[] time

Timestamps of the data.

Returns
Type Description
System.Int32

The number of samples available.

Remarks

If the number of samples requested is greater than the total samples then only the samples available are returned.

The method will move to the next sample if the startTimeStamp does not fall exactly on the timestamp of a sample.

GetSamplesCount(Int64, Int64)

Get Sample Count

Declaration
Dictionary<SessionKey, Nullable<long>> GetSamplesCount(long startTimeStamp, long endTimeStamp)
Parameters
Type Name Description
System.Int64 startTimeStamp

Start time stamp of the data.

System.Int64 endTimeStamp

End time stamp of the data.

Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Nullable<System.Int64>>

Number of samples between the start and end time, or zero if not samples found.

GetSamplesCountEstimate(Int64, Int64)

Returns the theoretical sample count between a specified start and end time based on the highest frequency channel for this PDA's Parameter. If the return value is zero means that was impossible to calculate the sample count, or this PDA is created on a SlowRow parameter

Declaration
Dictionary<SessionKey, Nullable<long>> GetSamplesCountEstimate(long startTimeStamp, long endTimeStamp)
Parameters
Type Name Description
System.Int64 startTimeStamp

Start time stamp of the data.

System.Int64 endTimeStamp

End time stamp of the data.

Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Nullable<System.Int64>>

Theoretical sample count between the start and end time, or zero if it was impossible to calculate, or this PDA is created on a SlowRow parameter.

GetStartTime()

Returns the start time for the parameters data.

Declaration
Dictionary<SessionKey, Nullable<long>> GetStartTime()
Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Nullable<System.Int64>>

The start time.

GetTimeRange()

Gets the time range for the PDA.

Declaration
Dictionary<SessionKey, Nullable<TimeRange>> GetTimeRange()
Returns
Type Description
System.Collections.Generic.Dictionary<MAT.OCS.Core.SessionKey, System.Nullable<TimeRange>>

Returns time range or null if there is no data.

GoTo(Double)

Positions the ParameterDataAccess object to a specific position (i.e. when using other than time axis) within the parameter's data.

Declaration
void GoTo(double position)
Parameters
Type Name Description
System.Double position

Required position.

GoTo(Int64)

Positions the ParameterDataAccess object to a specific time within the parameter's data.

Declaration
void GoTo(long time)
Parameters
Type Name Description
System.Int64 time

Required time location in nano-seconds.

SetMapper(String)

Sets the mapper to be used for GetNextData calls. The mapper is identified by its name. The API includes default mappers for time (which is the default for a PDA) and distance. These are named "time" and "distance" respectively. The API caller may specify another mapping name for a custom mapper that has been registered with the API (see MapperService). If a mapper is set which is not registered then an invalid argument exception will be thrown.

Declaration
void SetMapper(string mapperName)
Parameters
Type Name Description
System.String mapperName

The name of the mapper.

SetSampleIncrement(Double)

Sets the current sample increment for the PDA, when the X Axis is not Time

Declaration
void SetSampleIncrement(double increment)
Parameters
Type Name Description
System.Double increment

The required sample increment.

SetSampleIncrement(Int64)

Sets the current sample increment for the PDA, in nanoseconds (supersedes SampleTime). This value will only affect requests to get data (using the GetNextData method ) and will not affect calls to get samples (using the GetSamples/GetNextSamples/GetPreviousSamples methods).

Declaration
void SetSampleIncrement(long increment)
Parameters
Type Name Description
System.Int64 increment

The required sample increment

Remarks

This time is the interval between data samples. For example: 1,000,000 ns = 1000Hz 10,000,000 ns = 100Hz 100,000,000 ns = 10Hz 1,000,000,000 ns = 1Hz If this value is not set then the default sample time is 100Hz (10,000,000 ns).

Events

Invalidated

Occurs when [invalidated].

Declaration
event EventHandler Invalidated
Event Type
Type Description
System.EventHandler

UnderlyingDataSourceChanged

Occurs when [underlying data source changed]. This event will be raised if the source data context of one of the underlying PDAs of this composite PDA change - any previously-requested data is invalid.

Declaration
event EventHandler UnderlyingDataSourceChanged
Event Type
Type Description
System.EventHandler
Back to top Generated by DocFX