private void FillClampConditions(ProfileDeepData data, long testTypeId) { var results = new Dictionary <string, object>(1); FillConditionsResults(testTypeId, results); foreach (var result in results) { switch (result.Key) { case "CLAMP_HeightMeasure": data.IsHeightMeasureEnabled = Boolean.Parse(result.Value.ToString()); break; case "CLAMP_HeightValue": data.Height = ushort.Parse(result.Value.ToString()); break; case "CLAMP_Force": data.ParameterClamp = long.Parse(result.Value.ToString()); break; case "CLAMP_Temperature": data.Temperature = ushort.Parse(result.Value.ToString()); break; } } }
private void FillComutationConditions(ProfileDeepData data, long testTypeId) { var results = new Dictionary <string, object>(2); FillConditionsResults(testTypeId, results); foreach (var result in results) { data.CommutationType = (ModuleCommutationType)Enum.Parse(typeof(ModuleCommutationType), result.Value.ToString()); } }
private void FillParameters(ProfileDeepData data, long testTypeId, long testParametersType) { switch ((TestParametersType)testParametersType) { case TestParametersType.Gate: var gatePars = FillGateConditions(testTypeId); FillGateParameters(gatePars, testTypeId); data.TestParametersAndNormatives.Add(gatePars); break; case TestParametersType.Bvt: var bvtPars = FillBvtConditions(testTypeId); FillBvtParameters(bvtPars, testTypeId); data.TestParametersAndNormatives.Add(bvtPars); break; case TestParametersType.StaticLoses: var slParams = FillSlConditions(testTypeId); FillSlParameters(slParams, testTypeId); data.TestParametersAndNormatives.Add(slParams); break; case TestParametersType.Dvdt: var dVdtParams = FillDvdtConditions(testTypeId); data.TestParametersAndNormatives.Add(dVdtParams); break; case TestParametersType.ATU: var atuParams = FillAtuConditions(testTypeId); FillAtuParameters(atuParams, testTypeId); data.TestParametersAndNormatives.Add(atuParams); break; case TestParametersType.QrrTq: var qrrTqParams = FillQrrTqConditions(testTypeId); data.TestParametersAndNormatives.Add(qrrTqParams); break; case TestParametersType.TOU: var touParams = FillTOUConditions(testTypeId); data.TestParametersAndNormatives.Add(touParams); break; case TestParametersType.Clamping: FillClampConditions(data, testTypeId); break; case TestParametersType.Commutation: FillComutationConditions(data, testTypeId); break; } }
private (string typeName, Dictionary <string, object> conditions, Dictionary <string, (object Min, object Max)> parameters) ComutationConditionsParameters(ProfileDeepData data) { var clampingCondtions = new Dictionary <string, object>() { { "COMM_Type", data.CommutationType }, }; var clampingParameters = new Dictionary <string, (object Min, object Max)>(); return("Commutation", clampingCondtions, clampingParameters); }
private (string typeName, Dictionary <string, object> conditions, Dictionary <string, (object Min, object Max)> parameters) ClampingConditionsParameters(ProfileDeepData data) { var clampingCondtions = new Dictionary <string, object>() { { "CLAMP_Type", data.ClampingForce }, { "CLAMP_Force", data.ParameterClamp }, { "CLAMP_HeightMeasure", data.IsHeightMeasureEnabled }, { "CLAMP_HeightValue", data.Height }, { "CLAMP_Temperature", data.Temperature }, }; var clampingParameters = new Dictionary <string, (object Min, object Max)>(); return("Clamping", clampingCondtions, clampingParameters); }