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.
Inherited Members
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.
|
Methods
CloseSession()
Close the opened session file.
Declaration
public override void CloseSession()
Overrides
Dispose()
Dispose
Declaration
public override void Dispose()
Overrides
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
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
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
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
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
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
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
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. |