public GetDurationCycles ( double systemFrequency ) : double | ||
systemFrequency | double | |
Résultat | double |
private DbDisturbance GetDisturbanceRow(AdoDataConnection connection, Disturbance disturbance) { TableOperations <EventType> eventTypeTable = new TableOperations <EventType>(connection); EventType eventType = eventTypeTable.GetOrAdd(disturbance.EventType.ToString()); TableOperations <Phase> phaseTable = new TableOperations <Phase>(connection); Phase phase = phaseTable.GetOrAdd(disturbance.Phase.ToString()); DbDisturbance dbDisturbance = new DbDisturbance(); dbDisturbance.EventTypeID = eventType.ID; dbDisturbance.PhaseID = phase.ID; dbDisturbance.Magnitude = disturbance.Magnitude; dbDisturbance.PerUnitMagnitude = ToDbFloat(disturbance.PerUnitMagnitude); dbDisturbance.StartTime = disturbance.StartTime; dbDisturbance.EndTime = disturbance.EndTime; dbDisturbance.DurationSeconds = disturbance.DurationSeconds; dbDisturbance.DurationCycles = disturbance.GetDurationCycles(m_systemFrequency); dbDisturbance.StartIndex = disturbance.StartIndex; dbDisturbance.EndIndex = disturbance.EndIndex; return(dbDisturbance); }