Difference between revisions of "V2/Concepts/Intro to Metric"

From Senfi Docs
Jump to: navigation, search
(Created page with "<h1 class="main-heading">Metric</h1> A metric is a discrete reading or unit of data. It can be produced/measured by sensors, equipment, or complex systems. An example of a me...")
 
m (changed "the metrics is used to store" to "the metrics are used to store")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<h1 class="main-heading">Metric</h1>
 
<h1 class="main-heading">Metric</h1>
  
A metric is a discrete reading or unit of data. It can be produced/measured by sensors, equipment, or complex systems. An example of a metric is temperature (eg. 37). A metric may or may not have units associated (eg. degrees Celsius).
+
A metric is a discrete reading or unit of data. It can be produced/measured by sensors, equipment, or complex systems. An example of a metric using raw values from the sensing device (e.g. thermometer) is temperature (eg. 37), or derived values (eg. <tt>is_temperature_high</tt>). A metric may or may not have units associated (eg. degrees Celsius).
 +
 
 +
You can decide to compute the derived values before sending, or send the raw values to Senfi and make use of [[V2/Concepts/Intro_to_Computed_Measurement|computed measurement]] to calculate it.
 +
 
 +
In a computed measurement, the metrics are used to store the output calculated by the script from the input measurements' metrics.
 +
 
 +
Each metric has a ''name'' (for display), and a ''code'' (for integration). You should also specify a valid type for the metric.
 +
; Name: Any valid text (eg. ''Temperature Difference'')
 +
; Code: Combination of lowercase alphanumeric characters and underscore (eg. <tt>temperature_difference</tt>)
 +
; Type: One of the following: boolean, float, integer, string
 +
; Unit: Unit associated to metric (e.g. ''Degrees Celsius'')
 +
; Readable: Decides if Metric can be read
 +
; Writable: Decides if Metric can be written into
 +
; Brick Point Class: Decides the Brick point class(es) that the Metric belongs to (View [https://brickschema.org/ontology/1.2/classes/Point here] for more information on Brick Point Class)
 +
 
 +
There are also options to choose if a Measurement has lift or movable metrics. These are specialized metrics built for lift Measurement or Measurement with moving properties (e.g. robot, position tracking).
 +
 
 +
<div class="important">Metric type cannot be changed after creation</div>
 +
 
 +
==== What's Next ====
 +
-----
 +
* [[V2/Concepts/Intro to Tag|What is a Tag]]

Latest revision as of 07:10, 4 April 2022

Metric

A metric is a discrete reading or unit of data. It can be produced/measured by sensors, equipment, or complex systems. An example of a metric using raw values from the sensing device (e.g. thermometer) is temperature (eg. 37), or derived values (eg. is_temperature_high). A metric may or may not have units associated (eg. degrees Celsius).

You can decide to compute the derived values before sending, or send the raw values to Senfi and make use of computed measurement to calculate it.

In a computed measurement, the metrics are used to store the output calculated by the script from the input measurements' metrics.

Each metric has a name (for display), and a code (for integration). You should also specify a valid type for the metric.

Name
Any valid text (eg. Temperature Difference)
Code
Combination of lowercase alphanumeric characters and underscore (eg. temperature_difference)
Type
One of the following: boolean, float, integer, string
Unit
Unit associated to metric (e.g. Degrees Celsius)
Readable
Decides if Metric can be read
Writable
Decides if Metric can be written into
Brick Point Class
Decides the Brick point class(es) that the Metric belongs to (View here for more information on Brick Point Class)

There are also options to choose if a Measurement has lift or movable metrics. These are specialized metrics built for lift Measurement or Measurement with moving properties (e.g. robot, position tracking).

Metric type cannot be changed after creation

What's Next