Show / Hide Table of Contents

Namespace MESL.SqlRace.Domain

Classes

AddCanDataErrorEventArgs

Represents an Event raised when there has been an error adding CAN data to a Session

ApplicationGroup

Used as the highest level container for a Parameter.

AsyncEventArgs

Contains information about an event generated during asynchronous (background) processing

AuditEntry

Contains details of an audit entry

AuditType

Audit type

AvailabilityChangedEventArgs

Event args for availability changing

BilinearMap

Represents a Bilinear map.

Channel

Represents a channel which defines the type and frequency at which data is stored in SQL Race.

ChannelBasedParameter

An abstract base class for parameters based on channels.

ClientSession

Client Session Object

CompareSessionMode

CompositeContainerParameterDataAccess

A composite container parameter data access object.

CompositeMinimumMaximumMeanSample

Min Max Mean Composite Sample

CompositeMinimumMaximumSample

Min Max Composite Sample

CompositeParameterDataAccess

A composite parameter data access object.

CompositePdaExecutionService

Execute Action for Composite PDA

CompositePdaParallelExecutionService

Execute Action for Composite PDA

CompositeSample

CompositeSample

CompositeSession

CompositeSession

CompositeSessionContainer

CompositeSessionContainer

CompositeSessionEventArgs

CompositeSession Event Args

CompositeSessionEventType

CompositeSessionEventType

CompositeSessionException

CompositeSession Exception

CompositeSessionInfo

Composite Session Info

CompositeSessionMode

CompositeSession Mode

CompositeStatistics

Statistics for CompositeSession

ConfigurationCommittedException

ConfigurationCommittedException

ConfigurationSet

Represents a configuration set.

ConfigurationSetAlreadyExistsException

ConfigurationSet

ConfigurationSetManager

Responsible for creating, deleting and checking for the existence of configuration sets.

ConnectionBase

Base class for connection

ConnectionContextBase

ConnectionInformationBase

Base class for a connection. DatabaseConnectionInformation RemoteConnectionInformation

ConnectionStringParser

Utility class for connection string parsing.

Constant

To support the addition of constants in session and lap item collections

ConstantParameterDataAccess

PDA for accessing constants on the session or lap. See ParameterDataAccessBase documentation for more information.

ConversionBase

Base class for the different conversion types available to associate with data for a parameter or event.

Core

Provides methods to initialize SQL Race and change settings such as logging level and cache size.

CoreInitialisedEventArgs

The event raised when the core gets initialized

DatabaseConnection

DatabaseConnectionInformation

Represents a database connection.

DatabaseConnectionManager

Maintains a cache of database connection contexts

DatabaseManagerFactory

DataItem

Represents a DataItem. This is simply a name/value pair of strings.

DataItemReader

Responsible for retrieving data items across all sessions in SQL Race.

DbConfiguration

The information for a database configuration

DbEngine

The DbEngine

EntityBase

Base class for entities associated with a session.

ErrorData

Error Data

ErrorDefinition

Contains information for an error definition.

Event

Domain entity representing an Event.

EventDefinition

This class encapsulates metadata for an event definition.

ExtendedAssociate

It represents an entity of Identity information of an associated session

FastConfigurationSetAttributes

Describes FFC resources.

FdlExpressionAdapter

Fdl Expression Adapter

FileSessionManager

Class for the management of finding file based sessions contained on the file system for indexing as SQL Race Sessions.

FileSessionNotExistsException

A file session not exists on user disk

FileSessionSummary

FileSession summary

FileSessionWatcher

Create file system watchers for SSN siles

FormulaConversion

Defines a formula conversion.

FunctionConstants

Constants associated with the functions aspect of SQL Race

FunctionParameter

Implementation of a function parameter TODO: Possibly split this into two parameters - some types of function parameter don't require channels

ItemCanArgs

Contains information about CAN data.

ItemErrorArgs

Contains information about error data.

Lap

Domain entity representing a Lap.

LapBilinearMap

A LapBilinearMap is a type of BilinearMap that can be attached to a specific lap within a session.

LapConstant

Represents a Lap Constant.

LapDataItem

This class represents the contents of a data item that can be attached to a lap

LapLinearMap

A LapLinearMap is a type of LinearMap that can be attached to a specific lap within a session.

LapMapBase

Provides the abstract base class for the LapMap object.

LapStatisticsEventArgs

Contains details about the lap statistics that were calculated.

LinearMap

Represents a Linear map.

MapBase

Represents the base class for all map types.

Marker

Represents a marker.

MarkerLabel

The properties of a marker label

MidnightNotifier

Notifies when midnight passes.

MinimumMaximumMeanDouble

Represents a minimum, maximun and mean value.

Parameter

Represents a Parameter.

ParameterBase

An abstract base class for Parameters.

ParameterDataAccess

This is used to defines how data is sampled or interpolated and obtained from SQL Race. ParameterDataAccessBase

ParameterDataAccessBase

This is used to defines how data is sampled or interpolated and obtained from SQL Race.

The ParameterDataAccess and RemoteParameterDataAccess object is created by calling the Session.CreateParameterDataAccess(parameterIdentifier) method and is associated with both the session and a Parameter. More than one ParameterDataAccess object can exist within a session as each can used to retrieve the parameter data.

A ParameterDataAccess object can be created to retrieve data from all the Channel within Parameter or for data from specific Channel.

Methods on the ParameterDataAccess object allow you to:

  • Move to specific point in time
  • Set the sample time
  • Read subsampled data
  • Read interpolated data
  • Read the actual sample values

Follow the below best practices:

  • Opening a PDA uses up memory until the session is closed and disposed. It is best to open a PDA for a parameter once and cache it. Then you can reuse it throughout the session. An example of when this is particularly useful is when iterating through laps. It is better to open each PDA once than to open and dispose of them inside the lap iteration.
  • Calls to a PDA are not thread safe. If you are wanting to access data using the same Parameter in different threads, it is better to consider opening a small pool of PDAs for the threads to use. You have to be extra careful when using method that require the PDA's current position to ensure that it is only being used by one thread.
The following code snippet shows an example of using the ParameterDataAccess class to read subsampled data across all channels for a parameter:

  // Local database connection string and session key for data already recorded
  string connectionString = @"Data Source=.\sqlexpress;Initial Catalog=SQLRACE01;Integrated Security=SSPI";
  SessionKey sessionKey = new Guid("7DD05707-EAA2-4A36-BB8A-E2327AA52BFC");

  // Initialise
  Core.Initialize();
  SessionManager sessionManager = SessionManager.CreateSessionManager();

  // Create storage for output values
  double[] data = new double[10];
  DataStatusType[] status = new DataStatusType[10];

  // Load existing session
  Session session = sessionManager.Load(sessionKey, connectionString);

  // Use PDA to get subsampled data across all channels in parameter: ParameterId
  using(ParameterDataAccessBase pda = session.CreateParameterDataAccess("ParameterId"))
  {
       // Go to 0:00:01am
       pda.GoTo(1000000000);

       // Set sample time to 500Hz ~ 2000000ns 
       pda.SampleTime = 2000000;

       // Get 10 samples, use first sample, do not interpolate
       var parameterValues = pda.GetNextData(10, SampleModeType.First);

       // Print data and status to console window
       for (int i = 0; i < 10; i++)
       {
            Console.WriteLine("Data: {0}, Status: {1}", parameterValues.Data[i], parameterValues.DataStatus[i]); 
       }
  } 
  // Always close the session
  session.Close();

Simple example of opening a PDA setting the read cursor to the start of the session and reading the first 1000 samples. Then disposing the pda.

using (var pda = session.CreateParameterDataAccess(parameterIdentifer))
{
   pda.GoTo(session.StartTime);
   var samples = pda.GetNextData(1000);
}

An example of using a PDA cache to reuse pdas to the access data of one session and then closing the session

 // Open and cache PDA
 ParameterDataAccessBase pda;
 if (pdaCache.ContainsKey(parameterIdentifer))
 {
     pda = pdaCache[parameterIdentifer];
 }
 else
 {
     pda = session.CreateParameterDataAccess(parameterIdentifer);
     pdaCache[parameterIdentifer] = pda;
 }

 ... Do work using PDA ...

 // Before disposing of the session we want to remember to dispose the pdas openned.
 foreach (var parameterDataAccessBase in pdaCache)
 {
     parameterDataAccessBase.Value.Dispose();
 }

ParameterGroup

Represents a Parameter group.

PdaCurrentPosition

The PDA Current Position.

PersistableHashCode

Custom Hashcode generation so that it can be persisted in the database. Initially only supports generating hashcodes on a configuration set.

WARNING: Do not change as there may already be configurations in the database that use the hashcode in the identifier. Otherwise it will be be able to re-use an existing config.

RationalConversion

Defines a Rational conversion.

RecordersConfiguration

The database configuration for each recorder

RemoteConnectionInformation

Represents a remote connection.

RemoteSessionEventArgs

Container for information about remote session events

RepeatingLapCompareDataProvider

Repeating Lap and Fastest Lap Data Provider

SaveConfigurationSetException

ConfigurationSet

ScalarParameter

Scalar Value Parameter

Session

Domain entity representing a Session.

SessionBase

Provides the abstract base class for a Session which exposes its public interface

SessionChildItemsToLoad

Defines the session child items to load when loading a session.

SessionClosedArgs

Arguments used for session closed event.

SessionCompareMode

Compare mode of the Composite Session

SessionDataItem

This class represents the contents of a data item that can be attached to a session

SessionDataItemDefinition

Encapsulates session data item metadata.

SessionDetailChangedEventArgs

Container for information about a session detail changed event.

SessionEventArgs

Container for information about a session event

SessionEventType

Enumeration describing the type of a session event

SessionException

CompositeSession Exception

SessionIdentifierChangedEventArgs

Container for information about a session identifier changed event

SessionItemType

Session item type

SessionLoaderNotExistsException

A session loader for the specific file session not exists

SessionManager

Responsible for creating, loading, deleting and searching for sessions.

SessionManagerBase

Abstract base class for SessionManager, to facilitate testing.

SessionManagerTestabilityAdapter

Adapter for SessionManager to facilitate Sql Race testability

SessionNotAvailableEventArgs

Class for firing session not available event

SessionSampleCountSegment

Rapresent information regarding a timerange in a session session

SessionState

Enumeration used to identify whether a session is currenty live and having data recorded to it or historical where data is loaded from the database.

SessionStatusChangedEventArgs

Class for firing Session status changed event

SessionSummary

Represents a summary of the sessions available within SQL Race.

SessionSummaryInformation

Session Summary Information

SessionTimerange

Rapresent the information for a session with start and endtime

SessionTimstampsSegment

Rapresent atimestamp request for a particular session

SessionTransientMarkerServiceProvider

SqlRace Session Transient Marker Service Provider.

SessionType

Enumeration provides a number of possible session types. The type has meaning only for the client. Within the API all types are treated equally.

SortOrder

Specifies how sessions are sorted.

SqliteDatabaseConnection

Class for handling the sqlite database connections

SqliteDatabaseManager

Provides methods for database administration.

SQLRaceEvent

The event raised when the core gets initialized

SQLRaceEventType

An event generated by SQLRace that can be used by the API user

SqlServerDatabaseConnection

Class for handling the database connection

TableConversion

Defines a table conversion.

TextConversion

Defines a text conversion formula.

TimeRange

Structure representing a time range

TransientConnectionInformation

Information about a transient connection

VirtualParameter

Domain entity representing a Virtual Parameter.

Interfaces

IApplicationInformationService

Declarations related to application information.

IAuditManager

Declarations related to audit information.

IChannel

Describes a channel.

IClientSession

IClientSession - represents a SQLRace Session and client subsriber id pairing

ICompareSessionMode

Interface representing CompareSessionMode

ICompositeContainerParameterDataAccess

Interface describing a CompositeContainerParameterDataAccess

ICompositeParameterDataAccess

Interface describing a CompositeParameterDataAccess

ICompositePdaExecutionService

Execute Action for Composite PDA Interface

ICompositeSession

Composite Session interface.

ICompositeSessionContainer

Interface representing a CompositeSessionContainer

ICompositeSessionInfo

Interface representing a CompositeSessionInfo

IConnectionManager

Interface to eConnectionManager

IDatabaseManager

IEntityWithSessionKey

Interface for an entity with a SessionKey

IErrorData

Defines error data.

IExpressionAdapter

ExpressionAdapter Interface

IFileSessionManager

Interface for the management of finding file based sessions contained on the file system for indexing as SQL Race Sessions.

IFunctionParameter

Describes a function parameter

ILap

Interface representing a Lap

IParameter

Describes a parameter

IParameterDataAccess

IRecordersConfiguration

The database configuration for each recorder

ISession

Describes a session.

ISessionDataService

Declarations related to session data management

ISessionSummary

Exposes declaration related to session summaries

ISessionTransientMarkerService

A SqlRace service to deal with session Transient Marker.

Back to top Generated by DocFX