Show / Hide Table of Contents

Class Event

Domain entity representing an Event.

Inheritance
System.Object
EntityBase
Event
Implements
System.IDisposable
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public class Event : EntityBase, IDisposable
Remarks

Class is marked to be serializable only for the purposes of Remoting. Events are used to mark specific moments in time by storing an arbitrary number of raw data (sensor samples). Before using an event an EventDefinition needs to be created first to describe how the raw data should be converted to an engineering value.

Constructors

Event(Int32, String, Int64, IEnumerable<Double>)

Initialises a new instance of the Event class Creates a new Event object with the required property values to create an Event.

Declaration
public Event(int eventDefinitionKey, string groupName, long timeStamp, IEnumerable<double> rawData)
Parameters
Type Name Description
System.Int32 eventDefinitionKey

The event definition key (i.e. as supplied by the client).

System.String groupName

Name of the group with which this event is associated.

System.Int64 timeStamp

The time stamp.

System.Collections.Generic.IEnumerable<System.Double> rawData

The raw data for the event.

Event(Int32, String, Int64, IEnumerable<Double>, Boolean)

Initialises a new instance of the Event class Creates a new Event object with the required property values to create an Event.

Declaration
public Event(int eventDefinitionKey, string groupName, long timeStamp, IEnumerable<double> rawData, bool editable)
Parameters
Type Name Description
System.Int32 eventDefinitionKey

The event definition key (i.e. as supplied by the client).

System.String groupName

Name of the group with which this event is associated.

System.Int64 timeStamp

The time stamp.

System.Collections.Generic.IEnumerable<System.Double> rawData

The raw data for the event.

System.Boolean editable

If set to true [is editable].

Event(Int32, String, Int64, IEnumerable<Double>, Boolean, String)

Initialises a new instance of the Event class Creates a new Event object with the required property values to create an Event.

Declaration
public Event(int eventDefinitionKey, string groupName, long timeStamp, IEnumerable<double> rawData, bool editable, string statusText)
Parameters
Type Name Description
System.Int32 eventDefinitionKey

The event definition key (i.e. as supplied by the client).

System.String groupName

Name of the group with which this event is associated.

System.Int64 timeStamp

The time stamp.

System.Collections.Generic.IEnumerable<System.Double> rawData

The raw data for the event.

System.Boolean editable

If set to true [is editable].

System.String statusText

The status text.

Event(Int32, String, Int64, IEnumerable<Double>, String)

Initialises a new instance of the Event class Creates a new Event object with the required property values to create an Event.

Declaration
public Event(int eventDefinitionKey, string groupName, long timeStamp, IEnumerable<double> rawData, string statusText)
Parameters
Type Name Description
System.Int32 eventDefinitionKey

The event definition key (i.e. as supplied by the client).

System.String groupName

Name of the group with which this event is associated.

System.Int64 timeStamp

The time stamp.

System.Collections.Generic.IEnumerable<System.Double> rawData

The raw data for the event.

System.String statusText

The status text.

Properties

ConvertedData

Converted Data

Declaration
public IList<double> ConvertedData { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.Double>

EventDefinitionKey

Gets the key (supplied by the client) of the event definition to be used for converting data in the event.

Declaration
public int EventDefinitionKey { get; }
Property Value
Type Description
System.Int32

The event definition id.

GroupName

Gets the name of the group.

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

IsEditable

Gets a value indicating whether this instance is editable.

Declaration
public bool IsEditable { get; }
Property Value
Type Description
System.Boolean

Key

Gets the Key.

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

RawData

Gets a read only collection of the raw data for the event. The position in the list of data must correspond to the position of the corresponding conversion function in the event definition.

Declaration
public ReadOnlyCollection<double> RawData { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Double>

The raw data.

StatusText

Gets the status text.

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

TimeStamp

Gets the timestamp marking the event.

Declaration
public long TimeStamp { get; }
Property Value
Type Description
System.Int64

UniqueEventKey

Unique Guid for this Event Instance

Declaration
public Guid UniqueEventKey { get; }
Property Value
Type Description
System.Guid

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

GetConvertedData(Int32)

Gets converted data for the event.

Declaration
public double GetConvertedData(int index)
Parameters
Type Name Description
System.Int32 index

index of the ConvertedData to retrieve

Returns
Type Description
System.Double

The converted data, calculated by applying the relevant conversion functions.

Remarks

The index in the list of data corresponds to the position of the corresponding raw data.

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents this instance.

Implements

System.IDisposable
Back to top Generated by DocFX