Datalogic .NET SDK

GetMetric (Method)

 

Syntax

 

   public static Int32 GetMetric(PerformanceMetrics metricId);

 

 

Class                           : Device

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

This function retrieves one of a set of predefined metrics collected by the device.

 

 

Parameters Table

 

Type

Parameter

Description

[in]

PerformanceMetrics

metricId

A Device.PerformanceMetrics enumerated value specifying which metric to retrieve.

 

 

 

 

[returns]

Int32

 

 

A value corresponding to the index is returned on success.

[on error]

-1

 

 

 

 

Example

      

   private void btnBatteryInfo_Click(object sender, EventArgs e)

   {

      

       /* Get Device.GetMetric() and add it into a listView control */

       listView1.Items.Add(new ListViewItem(new string[]

                           { "Perf.Metrics: Battery_Age:", Device.GetMetric(Device.PerformanceMetrics.Battery_Age).ToString() }));

   }

 

 

 

See Also

 Device.PerformanceMetrics (Enum), Example #024.

 

Copyright © Datalogic ADC. All Right Reserved