wiki:RpObservationMeasurement

Observation and Measurement

Table of Contents

    1. Generic Measurement
  1. Sensors
    1. Button Sensor
    2. Light Sensor
    3. Acceleration Sensor
  2. Actuators
  3. Parameters (Node MIBs)

The values measured by sensors are exposed as Observation and Measurement values in SENSEI. That means the values are annotated by meta-data providing additional information on how to interpret the value. Required is the data type as well as the unit of measurement. Also a time stamp is given together with the measurement. Currently there is no standard for time stamp format.

The Observation and Measurement model is constructed as follows:

Generic Measurement

the generic Measurement is described by

  • value (here a generic value is possible described as string)
  • unit of measurement (can be any string, needs to be interpreted by the Resource User)
  • time stamp (can be any string)

Sensors

We have defined a set of Measurements gathered from sensors together with their typical datatypes. The sensors are now direct subclasses of Observation and Measurement

Button Sensor

Below is shown an example measurement coming from a button sensor defined as Button Sensor 12. The Resource Provider has given its own resoures the namespace prefix provider123. A button can either be pressed or released so that a boolean value is appropriate. A unit of measurement is not required for boolean values. Hence the hasUnit property is not given here. The time when the button was detected as pressed is related to the measurement.

The RDF XML syntax for the button sensor is as follows:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [
    <!ENTITY rdf  'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
    <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
    <!ENTITY oam 'http://www.ict-sensei.org/ObservationAndMeasurement#'>
	<!ENTITY provider123 'http://www.resource-provider-123.com/sensors#'>
]>
<rdf:RDF xmlns:rdf="&rdf;" xmlns:rdfs="&rdfs;"
	 xmlns:oam="&oam;" xmlns:provider123="&provider123;">
<oam:Button rdf:about="&provider123;ButtonSensor12" 
         oam:hasTimeStamp="2009-11-09 T 11:20 UTC"	 
	     oam:hasBooleanValue="true">
</oam:Button>
</rdf:RDF>

Light Sensor

The next example shows a Light Sensor measurement with a value given in percent. Therefore a hasDecimalValue property is used here. A Timestamp is given as well.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [
    <!ENTITY rdf  'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
    <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
    <!ENTITY oam 'http://www.ict-sensei.org/ObservationAndMeasurement#'>	
	<!ENTITY provider456 'http://www.resource-provider-456.com/resources#'>
]>
<rdf:RDF xmlns:rdf="&rdf;" xmlns:rdfs="&rdfs;"
	 xmlns:oam="&oam;" xmlns:provider456="&provider456;">
<oam:Light rdf:about="&provider456;LightSensor15" 
        oam:hasTimeStamp="Thu Jan 14 09:15:36 2009"	 
	    oam:hasDecimalValue="0.23"
        oam:hasUnit="percent">
</oam:Light>
</rdf:RDF>

Acceleration Sensor

The following accelerometer measurement provides values for X- , Y- , and Z-axis. We need three properties for all the values here. The unit of measurements is common for all three values. The same applies for the timestamp.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rdf:RDF [
    <!ENTITY rdf  'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
    <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
    <!ENTITY oam 'http://www.ict-sensei.org/ObservationAndMeasurement#'>
    <!ENTITY provider789 'http://www.resource-provider-789.com/resources#'>
]>
<rdf:RDF xmlns:rdf="&rdf;" xmlns:rdfs="&rdfs;" 
			xmlns:oam="&oam;" xmlns:provider789="&provider789;">

<oam:Acceleration rdf:about="&provider789;AccelXYZSensor" 
        oam:hasTimeStamp="1256953732"	 
		oam:hasXvalue="0.12"
		oam:hasYvalue="0.74"
		oam:hasZvalue="0.43"
        oam:hasUnit="percent">
</oam:Acceleration>
</rdf:RDF>

Actuators

So far we have defined simple actuators only. Their status can be either on or off so that they have boolean values.

Parameters (Node MIBs)

The Node MIBs are now subclasses of Observation And Measurement hence its properties are borrowed from Observation and Measurements only:

Last modified 12 years ago Last modified on Oct 21, 2010, 2:08:20 PM

Attachments (7)

Download all attachments as: .zip