Show / Hide Table of Contents

Class FileSessionReader

This class is to read the session file and hold the information about session details, lap, periodic channels, parameters along with rational and text conversions.

Inheritance
System.Object
BaseSessionReader
FileSessionReader
Implements
ISessionReader
System.IDisposable
Inherited Members
BaseSessionReader.Laps
BaseSessionReader.Item[Int32]
BaseSessionReader.Channels
BaseSessionReader.Conversions
BaseSessionReader.Parameters
BaseSessionReader.ParametersByIdentifier
BaseSessionReader.VirtualParameters
BaseSessionReader.VirtualParametersByIdentifier
BaseSessionReader.SessionItems
BaseSessionReader.SessionDetail
BaseSessionReader.StartTime
BaseSessionReader.EndTime
BaseSessionReader.AddLap(Lap)
BaseSessionReader.AddSessionDetail(String, String)
BaseSessionReader.AddChannel(Channel)
BaseSessionReader.AddRationalConversion(RationalConversion)
BaseSessionReader.AddTextConversion(TextConversion)
BaseSessionReader.AddTableConversion(TableConversion)
BaseSessionReader.AddFormulaConversion(FormulaConversion)
BaseSessionReader.AddVirtualParameter(VirtualParameter)
BaseSessionReader.AddParameter(Parameter)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: MAT.AtlasSessionApi
Assembly: MAT.AtlasSessionApi.dll
Syntax
public class FileSessionReader : BaseSessionReader, ISessionReader, IDisposable

Constructors

FileSessionReader(String)

Read the session information for given file.

Declaration
public FileSessionReader(string filePath)
Parameters
Type Name Description
System.String filePath

File path.

Exceptions
Type Condition
System.ArgumentNullException

Throw exception if file path is null or empty.

System.IO.FileLoadException

Throw exception if unable to load the session. It could be due to licence or network issue.

FileSessionReader(String, Boolean)

Read the session information for given file along with all latest associated sessions in the directory.

Declaration
public FileSessionReader(string filePath, bool loadLatestAssociatedSessionFiles)
Parameters
Type Name Description
System.String filePath

File path.

System.Boolean loadLatestAssociatedSessionFiles

Load all latest associated session files from the parent session directory.

Exceptions
Type Condition
System.ArgumentNullException

Throw exception if file path is null or empty.

System.IO.FileLoadException

Throw exception if unable to load the session. It could be due to licence or network issue.

FileSessionReader(String, String[])

Read the session information for given file along with multiple associated sessions.

Declaration
public FileSessionReader(string filePath, string[] associatedFileNames)
Parameters
Type Name Description
System.String filePath

File path.

System.String[] associatedFileNames

Associated file name. Input can be null or empty if not willing to load the associated session. The associated session must be in the same folder and file name must match with the parent session.

Exceptions
Type Condition
System.ArgumentNullException

Throw exception if file path or associated file names is null or empty.

System.IO.FileLoadException

Throw exception if unable to load the session. It could be due to licence or network issue.

System.ArgumentException

Throw exception for given input.

  1. If multiple entries of same file is found in input.
  2. If associated file names array is empty.
  3. If invalid version is found. e.g 'FileName.VTS.A01.ssv' instead of 'FileName.VTS.001.ssv'.

Methods

CloseSession()

Close the opened session file.

Declaration
public override void CloseSession()
Overrides
BaseSessionReader.CloseSession()

Dispose()

Dispose

Declaration
public override void Dispose()
Overrides
BaseSessionReader.Dispose()

GetData(String, Int64, Int64, Frequency, Boolean)

Gets the merged parameter data for given interval. It will return the data for timestamp between start and end timestamp. Data can be interpolate and default interpolation is off.

Declaration
public override DataPoint[] GetData(string identifier, long startTime, long endTime, Frequency frequency, bool interpolate = false)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

Frequency frequency

Frequency object to fetch the data.

System.Boolean interpolate

Flag to interpolate samples. Default is false.

Returns
Type Description
DataPoint[]

Sample value along with it's status.

Overrides
BaseSessionReader.GetData(String, Int64, Int64, Frequency, Boolean)

GetData(String, Int64, Int64, Frequency, out Double[], out UInt16[], out Int64[], Boolean)

Gets the merged parameter data for given interval. It will return the data for timestamp between start and end timestamp. Data can be interpolate and default interpolation is off.

Declaration
public override void GetData(string identifier, long startTime, long endTime, Frequency frequency, out double[] values, out ushort[] statuses, out long[] timestamps, bool interpolate = false)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

Frequency frequency

Frequency object to fetch the data.

System.Double[] values

The values.

System.UInt16[] statuses

The statuses.

System.Int64[] timestamps

The timestamps.

System.Boolean interpolate

Flag to interpolate samples. Default is false.

Overrides
BaseSessionReader.GetData(String, Int64, Int64, Frequency, out Double[], out UInt16[], out Int64[], Boolean)

GetData(String, UInt32, Int64, Int64, Frequency, Boolean)

Gets the parameter data for the given channel and interval. It will return the data for timestamp between start and end timestamp. Data can be interpolate and default interpolation is off.

Declaration
public override DataPoint[] GetData(string identifier, uint channelId, long startTime, long endTime, Frequency frequency, bool interpolate = false)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.UInt32 channelId

Channel id.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

Frequency frequency

Frequency object to fetch the data.

System.Boolean interpolate

Flag to interpolate samples. Default is false.

Returns
Type Description
DataPoint[]

Sample value along with it's status.

Overrides
BaseSessionReader.GetData(String, UInt32, Int64, Int64, Frequency, Boolean)

GetData(String, UInt32, Int64, Int64, Frequency, out Double[], out UInt16[], out Int64[], Boolean)

Gets the parameter data for the given channel and interval. It will return the data for timestamp between start and end timestamp. Data can be interpolate and default interpolation is off.

Declaration
public override void GetData(string identifier, uint channelId, long startTime, long endTime, Frequency frequency, out double[] values, out ushort[] statuses, out long[] timestamps, bool interpolate = false)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.UInt32 channelId

Channel id.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

Frequency frequency

Frequency object to fetch the data.

System.Double[] values

The values.

System.UInt16[] statuses

The statuses.

System.Int64[] timestamps

The timestamps.

System.Boolean interpolate

Flag to interpolate samples. Default is false.

Overrides
BaseSessionReader.GetData(String, UInt32, Int64, Int64, Frequency, out Double[], out UInt16[], out Int64[], Boolean)

GetSamples(String, Int64, Int64)

Gets the merged parameter samples for timestamp between start and end timestamp.

Declaration
public override DataPoint[] GetSamples(string identifier, long startTime, long endTime)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

Returns
Type Description
DataPoint[]

Sample value along with it's status.

Overrides
BaseSessionReader.GetSamples(String, Int64, Int64)

GetSamples(String, Int64, Int64, out Double[], out UInt16[], out Int64[])

Gets the merged parameter samples for timestamp between start and end timestamp.

Declaration
public override void GetSamples(string identifier, long startTime, long endTime, out double[] values, out ushort[] statuses, out long[] timestamps)
Parameters
Type Name Description
System.String identifier

The identifier.

System.Int64 startTime

The start time.

System.Int64 endTime

The end time.

System.Double[] values

The values.

System.UInt16[] statuses

The statuses.

System.Int64[] timestamps

The timestamps.

Overrides
BaseSessionReader.GetSamples(String, Int64, Int64, out Double[], out UInt16[], out Int64[])

GetSamples(String, UInt32, Int64, Int64)

Gets the parameter samples for specific channel. It will return the data for timestamp between start and end timestamp.

Declaration
public override DataPoint[] GetSamples(string identifier, uint channelId, long startTime, long endTime)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.UInt32 channelId

Channel id.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

Returns
Type Description
DataPoint[]

Sample value along with it's status.

Overrides
BaseSessionReader.GetSamples(String, UInt32, Int64, Int64)

GetSamples(String, UInt32, Int64, Int64, out Double[], out UInt16[], out Int64[])

Gets the parameter samples for specific channel. It will return the data for timestamp between start and end timestamp.

Declaration
public override void GetSamples(string identifier, uint channelId, long startTime, long endTime, out double[] values, out ushort[] statuses, out long[] timestamps)
Parameters
Type Name Description
System.String identifier

Parameter identifier.

System.UInt32 channelId

Channel id.

System.Int64 startTime

Start timestamp for requested sample.

System.Int64 endTime

End timestamp for requested sample.

System.Double[] values

The values.

System.UInt16[] statuses

The statuses.

System.Int64[] timestamps

The timestamps.

Overrides
BaseSessionReader.GetSamples(String, UInt32, Int64, Int64, out Double[], out UInt16[], out Int64[])

Implements

ISessionReader
System.IDisposable
In This Article
Back to top Generated by DocFX