1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | IF DeviceId = "" THEN //Edge Metric eError := ERROR.MetricNotFound; _metrics.ItterateRestart( HasNext => HasNext ); WHILE HasNext AND NOT FoundMetric DO _metrics.ItterateNext( itfElement => itfElement, HasNext => HasNext ); IF __QUERYINTERFACE( itfElement, _Metric ) THEN IF _Metric.Name = MetricName THEN FoundMetric := TRUE; eError := ERROR.NO_ERROR; Metric := _Metric; END_IF END_IF END_WHILE ELSE //Device Metric refDevice REF= THIS^.GetDevice( DeviceId := DeviceId, eError => eError ); IF eError = ERROR.NO_ERROR THEN refDevice.GetMetricbyName( MetricName := MetricName, Metric => Metric, |