Class MeasureCycle
Represents a measure cycle for a work piece.
Inherited Members
Namespace: Loehnert.TypeAndResult
Assembly: Loehnert.TypeAndResult.dll
Syntax
public class MeasureCycle : EntityBase, INotifyPropertyChanged, ITrackable
Constructors
MeasureCycle(TypeData, WorkPiece, Station)
Initializes a new instance of the MeasureCycle class and sets the StartTimeStamp to System.DateTime.UtcNow and System.Type to Production.
Declaration
public MeasureCycle(TypeData typeData, WorkPiece workPiece, Station station)
Parameters
Type | Name | Description |
---|---|---|
TypeData | typeData | Associated type data. |
WorkPiece | workPiece | Associated work piece. |
Station | station | Associated station. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
MeasureCycle(TypeData, WorkPiece, Station, MeasurementType)
Initializes a new instance of the MeasureCycle class and sets the StartTimeStamp to System.DateTime.UtcNow.
Declaration
public MeasureCycle(TypeData typeData, WorkPiece workPiece, Station station, MeasurementType measurementType)
Parameters
Type | Name | Description |
---|---|---|
TypeData | typeData | Associated type data. |
WorkPiece | workPiece | Associated work piece. |
Station | station | Associated station. |
MeasurementType | measurementType | Associated measurement type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
Properties
Classification
Gets or sets the classification.
Declaration
public Classification Classification { get; set; }
Property Value
Type | Description |
---|---|
Classification |
EndTimeStamp
Gets or sets the start time stamp (UTC).
Declaration
public DateTime EndTimeStamp { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
MeasurementType
Gets the measurement type.
Declaration
public virtual MeasurementType MeasurementType { get; }
Property Value
Type | Description |
---|---|
MeasurementType |
MeasurementTypeId
Gets the foreign key of the MeasurementType.
Declaration
[JsonIgnore]
public int MeasurementTypeId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MeasureProcesses
Gets the measure processes.
Declaration
public virtual ObservableCollection<MeasureProcess> MeasureProcesses { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<MeasureProcess> |
Parameters
Gets the collection for additional parameters.
Declaration
public virtual EntityCollection<MeasureCycleParameter> Parameters { get; }
Property Value
Type | Description |
---|---|
EntityCollection<MeasureCycleParameter> |
StartTimeStamp
Gets or sets the start time stamp (UTC).
Declaration
public DateTime StartTimeStamp { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
Station
Gets associated station.
Declaration
public virtual Station Station { get; }
Property Value
Type | Description |
---|---|
Station |
StationId
Gets the foreign key of the Station.
Declaration
[JsonIgnore]
public int StationId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TypeData
Gets the associated type data.
Declaration
public virtual TypeData TypeData { get; }
Property Value
Type | Description |
---|---|
TypeData |
TypeDataId
Gets the foreign key of the TypeData.
Declaration
[JsonIgnore]
public int TypeDataId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
WorkPiece
Gets the associated work piece.
Declaration
public virtual WorkPiece WorkPiece { get; }
Property Value
Type | Description |
---|---|
WorkPiece |
WorkPieceId
Gets the foreign key of the WorkPiece.
Declaration
[JsonIgnore]
public int WorkPieceId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AddNewMeasureProcess(Process)
Gets a new instance of the MeasureProcesses class and adds it to MeasureProcesses.
Declaration
public MeasureProcess AddNewMeasureProcess(Process process)
Parameters
Type | Name | Description |
---|---|---|
Process | process | Process that belongs to the new measure process. |
Returns
Type | Description |
---|---|
MeasureProcess | A new measure process. |
AddNewMeasureProcess(String)
Gets a new instance of the MeasureProcesses class and adds it to MeasureProcesses.
Declaration
public MeasureProcess AddNewMeasureProcess(string process)
Parameters
Type | Name | Description |
---|---|---|
String | process | Process that belongs to the measure process. |
Returns
Type | Description |
---|---|
MeasureProcess | A new measure process. |
Evaluate(Boolean)
Evaluates the measure cycle and sets the Classification to Pass when all processes are passed.
Declaration
public MeasureCycleResult Evaluate(bool throwExceptionIfProcessIsNotEvaluated = true)
Parameters
Type | Name | Description |
---|---|---|
Boolean | throwExceptionIfProcessIsNotEvaluated | Indicates if an exception should be thrown while an process is not evaluated. |
Returns
Type | Description |
---|---|
MeasureCycleResult | The result of the measure cycle evaluation. |
Exceptions
Type | Condition |
---|---|
ProcessNotEvaluatedException | Thrown if a process is missing and |
PreEvaluate()
Evaluates the MeasureCycle, but doesn't set EndTimeStamp and Classification properties.
Declaration
public MeasureCycleResult PreEvaluate()
Returns
Type | Description |
---|---|
MeasureCycleResult | The result of the measure cycle evaluation. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the current object. |