/// <summary> /// Add columns for external sensors. /// </summary> private void StoreExternalSensorValues() { PlxSensors plxSensors = ExternalSensors.GetInstance().PlxSensors; if (plxSensors == null) { return; } foreach (LogColumn column in this.logEventArgs.Row.Columns) { PlxParameter parameter = column.Parameter as PlxParameter; if (parameter != null) { PlxSensorId id = (PlxSensorId)parameter.SensorId; double rawValue = plxSensors.GetValue(id, PlxSensorUnits.Raw); InternalLogProfile.ConvertAndStoreValue(column.Parameter, rawValue, column.Conversion, column); } } }
/// <summary> /// Store values directly from the SSM bytes. /// </summary> /// <param name="rawData"></param> private void StoreDirectSsmValues(byte[] rawData) { foreach (LogColumn column in this.logEventArgs.Row.Columns) { if (!(column.Parameter is SsmParameter)) { continue; } if (column.DependencyMap != null) { continue; } int index = (int)column.PropertyBag[ColumnAddressIndex]; int length = ((SsmParameter)column.Parameter).Length; double rawValue = InternalLogProfile.GetSsmValue(rawData, index, length); InternalLogProfile.ConvertAndStoreValue(column.Parameter, rawValue, column.Conversion, column); } }