Class BaseSessionReader
This class is the skeleton for session reader and holds the information about session details, laps, periodic channels, parameters along with rational and text conversions.
Inherited Members
Namespace: MAT.AtlasSessionApi
Assembly: MAT.AtlasSessionApi.dll
Syntax
public abstract class BaseSessionReader : ISessionReader, IDisposable
Properties
Channels
Collection of key/value pairs for the channels where key is defined as channel id.
Declaration
public IReadOnlyDictionary<uint, Channel> Channels { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.UInt32, Channel> |
Conversions
Collection of key/value pairs for the conversions where key is defined as conversion identifier.
Declaration
public IReadOnlyDictionary<string, Conversion> Conversions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.String, Conversion> |
EndTime
End time of the session.
Declaration
public long EndTime { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Item[Int32]
Get the specific lap based on the index.
Declaration
public Lap this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Get the lap of the given index. |
Property Value
Type | Description |
---|---|
Lap |
Laps
Collection of laps and their description like lap number, type and start/end time of lap.
Declaration
public IEnumerable<Lap> Laps { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Lap> |
Parameters
Gets the collection of the parameters in the session.
Declaration
public IEnumerable<Parameter> Parameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Parameter> |
ParametersByIdentifier
Collection of key/value pairs for the parameters where key is defined as parameter identifier.
Declaration
public IReadOnlyDictionary<string, Parameter> ParametersByIdentifier { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.String, Parameter> |
SessionDetail
Modify the session details. The new details will be saved in .sse file.
Declaration
public ISessionDetail SessionDetail { get; set; }
Property Value
Type | Description |
---|---|
ISessionDetail |
SessionItems
Collection of session details.
Declaration
public IDictionary<string, string> SessionItems { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
StartTime
Start time of the session.
Declaration
public long StartTime { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 |
VirtualParameters
Collection of key/value pairs for the virtual parameters where key is defined as virtual parameter identifier.
Declaration
public IEnumerable<VirtualParameter> VirtualParameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<VirtualParameter> |
VirtualParametersByIdentifier
Collection of key/value pairs for the virtual parameters where key is defined as virtual parameter identifier.
Declaration
public IReadOnlyDictionary<string, VirtualParameter> VirtualParametersByIdentifier { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.String, VirtualParameter> |
Methods
AddChannel(Channel)
Add a new channel after reading from session.
Declaration
protected void AddChannel(Channel channel)
Parameters
Type | Name | Description |
---|---|---|
Channel | channel | Channel object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Channle can not be null. |
System.ArgumentException |
AddFormulaConversion(FormulaConversion)
Declaration
protected void AddFormulaConversion(FormulaConversion conversion)
Parameters
Type | Name | Description |
---|---|---|
FormulaConversion | conversion |
AddLap(Lap)
Add new lap after reading from session.
Declaration
protected void AddLap(Lap lap)
Parameters
Type | Name | Description |
---|---|---|
Lap | lap | Lap object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | if lap object is null. |
AddParameter(Parameter)
Adds a new parameter parameter to the current session. One parameter can contain multiple channels i.e. there is a channel id associated with each channel.
Declaration
protected void AddParameter(Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
Parameter | parameter | parameter object. |
AddRationalConversion(RationalConversion)
Add a new rational conversion after reading from session.
Declaration
protected void AddRationalConversion(RationalConversion conversion)
Parameters
Type | Name | Description |
---|---|---|
RationalConversion | conversion | Conversion object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Throw exception for below conditions.
|
System.ArgumentException | Throw exception if conversion identifier is empty. |
AddSessionDetail(String, String)
Add session detail after reading from session.
Declaration
protected void AddSessionDetail(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Session detail name. |
System.String | value | Session detail value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Detail name can not be null or empty. Detail value can not be null. |
AddTableConversion(TableConversion)
Declaration
protected void AddTableConversion(TableConversion conversion)
Parameters
Type | Name | Description |
---|---|---|
TableConversion | conversion |
AddTextConversion(TextConversion)
Add a new text conversion after reading from session.
Declaration
protected void AddTextConversion(TextConversion conversion)
Parameters
Type | Name | Description |
---|---|---|
TextConversion | conversion | Conversion object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Throw exception if input is as per below.
|
System.ArgumentException | Throw exception if conversion identifier is empty. |
AddVirtualParameter(VirtualParameter)
Holds the virtual parameter information after reading from session file. The parameter information can be used to extract the data.
Declaration
protected void AddVirtualParameter(VirtualParameter virtualParameter)
Parameters
Type | Name | Description |
---|---|---|
VirtualParameter | virtualParameter | virtual pararmeter object |
CloseSession()
Close the opened session file.
Declaration
public abstract void CloseSession()
Dispose()
Declaration
public abstract void 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 abstract 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. |
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 abstract 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. |
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 abstract 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. |
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 abstract 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. |
GetSamples(String, Int64, Int64)
Gets the merged parameter samples for timestamp between start and end timestamp.
Declaration
public abstract 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. |
GetSamples(String, Int64, Int64, out Double[], out UInt16[], out Int64[])
Gets the merged parameter samples for timestamp between start and end timestamp.
Declaration
public abstract 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. |
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 abstract 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. |
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 abstract 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. |