void CheckMeasure() { MeasureDeviceInfos.RemoveAll(x => (DateTime.Now - x.DateTime).TotalSeconds > 120); foreach (var measureDeviceInfo in MeasureDeviceInfos) { List<XMeasureParameterValue> measureParameters = null; if (measureDeviceInfo.Device.KauDatabaseParent != null && measureDeviceInfo.Device.KauDatabaseParent.DriverType == XDriverType.KAU) { measureParameters = measureDeviceInfo.GetRSR1Measure(); } else if (measureDeviceInfo.Device.KauDatabaseParent != null && measureDeviceInfo.Device.KauDatabaseParent.DriverType == XDriverType.RSR2_KAU) { measureParameters = measureDeviceInfo.GetRSR2Measure(); } if (measureParameters != null && measureParameters.Count > 0) { var deviceMeasureParameters = new XDeviceMeasureParameters(); deviceMeasureParameters.DeviceUID = measureDeviceInfo.Device.UID; foreach (var measureParameter in measureParameters) { deviceMeasureParameters.MeasureParameterValues.Add(measureParameter); } OnMeasureParametersChanged(deviceMeasureParameters); } } }
void OnMeasureParametersChanged(XDeviceMeasureParameters deviceMeasureParameters) { GKCallbackResult.GKStates.DeviceMeasureParameters.Add(deviceMeasureParameters); }