Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Libraries/FaultAlgorithms/FaultAlgorithms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Gemstone.Numeric" Version="1.0.141" />
<PackageReference Include="Gemstone.Numeric" Version="1.0.157" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Libraries/FaultData/FaultData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Gemstone.Data" Version="1.0.141" />
<PackageReference Include="Gemstone.PQDIF" Version="1.0.141" />
<PackageReference Include="Gemstone.Data" Version="1.0.157" />
<PackageReference Include="Gemstone.PQDIF" Version="1.0.157" />
</ItemGroup>

<ItemGroup>
Expand Down
65 changes: 65 additions & 0 deletions Libraries/openXDA.Model/Events/BreakerRestrike.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//******************************************************************************************************
// BreakerRestrike.cs - Gbtc
//
// Copyright © 2019, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
// file except in compliance with the License. You may obtain a copy of the License at:
//
// http://opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 08/30/2019 - Stephen C. Wills
// Generated original version of source code.
//
//******************************************************************************************************

using System.Data;
using Gemstone.Data;
using Gemstone.Data.Model;

namespace openXDA.Model
{
public class BreakerRestrike
{
[PrimaryKey(true)]
public int ID { get; set; }

public int EventID { get; set; }

public int PhaseID { get; set; }

public int InitialExtinguishSample { get; set; }

[FieldDataType(DbType.DateTime2, DatabaseType.SQLServer)]
public DateTime InitialExtinguishTime { get; set; }
public double InitialExtinguishVoltage { get; set; }
public int RestrikeSample { get; set; }

[FieldDataType(DbType.DateTime2, DatabaseType.SQLServer)]
public DateTime RestrikeTime { get; set; }
public double RestrikeVoltage { get; set; }
public double RestrikeCurrentPeak { get; set; }
public double RestrikeVoltageDip { get; set; }
public int TransientPeakSample { get; set; }

[FieldDataType(DbType.DateTime2, DatabaseType.SQLServer)]
public DateTime TransientPeakTime { get; set; }
public double TransientPeakVoltage { get; set; }
public double PerUnitTransientPeakVoltage { get; set; }
public int FinalExtinguishSample { get; set; }

[FieldDataType(DbType.DateTime2, DatabaseType.SQLServer)]
public DateTime FinalExtinguishTime { get; set; }
public double FinalExtinguishVoltage { get; set; }
public double I2t { get; set; }

}
}
67 changes: 67 additions & 0 deletions Libraries/openXDA.Model/Events/Disturbances/Disturbance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//******************************************************************************************************
// Disturbance.cs - Gbtc
//
// Copyright © 2017, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 08/29/2017 - Billy Ernest
// Generated original version of source code.
//
//******************************************************************************************************

using System;
using Gemstone.Data.Model;

namespace openXDA.Model
{
public class Disturbance
{
[PrimaryKey(true)]
public int ID { get; set; }
public int EventID { get; set; }
public int EventTypeID { get; set; }
public int PhaseID { get; set; }
public double Magnitude { get; set; }
public double PerUnitMagnitude { get; set; }

[FieldDataType(System.Data.DbType.DateTime2, Gemstone.Data.DatabaseType.SQLServer)]
public DateTime StartTime { get; set; }

[FieldDataType(System.Data.DbType.DateTime2, Gemstone.Data.DatabaseType.SQLServer)]
public DateTime EndTime { get; set; }

public double DurationSeconds { get; set; }
public double DurationCycles { get; set; }
public int StartIndex { get; set; }
public int EndIndex { get; set; }
public string UpdatedBy { get; set; }
}

[TableName("DisturbanceView")]
public class DisturbanceView: Disturbance
{
public int MeterID { get; set; }
public int LineID { get; set; }
public int? SeverityCode { get; set; }
public string MeterName { get; set; }
public string PhaseName { get; set; }
}

[TableName("DisturbanceView")]
public class DisturbancesForDay : DisturbanceView { }

[TableName("DisturbanceView")]
public class DisturbancesForMeter : DisturbanceView { }
}
19 changes: 19 additions & 0 deletions Libraries/openXDA.Model/Events/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,23 @@ public class Event

public string UpdatedBy { get; set; }
}

[TableName("EventView")]
public class EventView : Event
{
[PrimaryKey(true)]
public new int ID
{
get => base.ID;
set => base.ID = value;
}

public string AssetName { get; set; }

public string MeterName { get; set; }

public string StationName { get; set; }

public string EventTypeName { get; set; }
}
}
57 changes: 57 additions & 0 deletions Libraries/openXDA.Model/Events/EventStat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//******************************************************************************************************
// EventStat.cs - Gbtc
//
// Copyright © 2018, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
// file except in compliance with the License. You may obtain a copy of the License at:
//
// http://opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 11/07/2018 - Billy Ernest
// Generated original version of source code.
//
//******************************************************************************************************

using Gemstone.Data.Model;

namespace openXDA.Model
{
public class EventStat
{
[PrimaryKey(true)]
public int ID { get; set; }
public int EventID { get; set; }
public double? VPeak { get; set; }
public double? VAMax { get; set; }
public double? VBMax { get; set; }
public double? VCMax { get; set; }
public double? VABMax { get; set; }
public double? VBCMax { get; set; }
public double? VCAMax { get; set; }
public double? VAMin { get; set; }
public double? VBMin { get; set; }
public double? VCMin { get; set; }
public double? VABMin { get; set; }
public double? VBCMin { get; set; }
public double? VCAMin { get; set; }
public double? IPeak { get; set; }
public double? IAMax { get; set; }
public double? IBMax { get; set; }
public double? ICMax { get; set; }
public double? IA2t { get; set; }
public double? IB2t { get; set; }
public double? IC2t { get; set; }
public double? InitialMW { get; set; }
public double? FinalMW { get; set; }
public int? PQViewID { get; set; }
}
}
137 changes: 137 additions & 0 deletions Libraries/openXDA.Model/Events/Faults/Fault.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//******************************************************************************************************
// Fault.cs - Gbtc
//
// Copyright © 2017, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 08/29/2017 - Billy Ernest
// Generated original version of source code.
//
//******************************************************************************************************

using System;
using Gemstone.Data.Model;

namespace openXDA.Model
{
[TableName("FaultSummary")]
public class Fault
{
[PrimaryKey(true)]
public int ID { get; set; }

public int EventID { get; set; }

public string Algorithm { get; set; }

public int FaultNumber { get; set; }

public int CalculationCycle { get; set; }

public double Distance { get; set; }

public int PathNumber { get; set; }

public int LineSegmentID { get; set; }

public double LineSegmentDistance { get; set; }

public double CurrentMagnitude { get; set; }

public double CurrentLag { get; set; }

public double PrefaultCurrent { get; set; }

public double PostfaultCurrent { get; set; }

public double ReactanceRatio { get; set; }

[FieldDataType(System.Data.DbType.DateTime2, Gemstone.Data.DatabaseType.SQLServer)]
public DateTime Inception { get; set; }

public double DurationSeconds { get; set; }

public double DurationCycles { get; set; }

public string FaultType { get; set; }

public bool IsSelectedAlgorithm { get; set; }

public bool IsValid { get; set; }

public bool IsSuppressed { get; set; }
}

public class FaultSummary : Fault { }

[TableName("FaultView")]
public class FaultView : Fault
{
public string MeterName { get; set; }

public string ShortName { get; set; }

public string LocationName { get; set; }

public int MeterID { get; set; }

public int LineID { get; set; }

public string LineName { get; set; }

public int Voltage { get; set; }

public DateTime InceptionTime { get; set; }

public double CurrentDistance { get; set; }

public int RK { get; set; }
}

[TableName("FaultView")]
public class FaultForMeter: FaultView { }

public class FaultsDetailsByDate
{
public int thefaultid { get; set; }

public string thesite { get; set; }

public string locationname { get; set; }

public int themeterid { get; set; }

public int thelineid { get; set; }

public int theeventid { get; set; }

public string thelinename { get; set; }

public int voltage { get; set; }

public string theinceptiontime { get; set; }

public string thefaulttype { get; set; }

public double thecurrentdistance { get; set; }

public int notecount { get; set; }

public int rk { get; set; }

[NonRecordField]
public string theeventtype { get; set; }
}
}
Loading