Sensor's network

From AMTech WikiDocs
Revision as of 11:01, 3 March 2016 by Amarrero (Talk | contribs) (Observation instances in simulator)

Jump to: navigation, search

Observations and observation types

Observations are the kind of objects that are used by sensors, devices, pieces of software (things in general) to notify about state change, sensor's readings, etc. Like thing's instances, or any other object in our architecture, they have a type that defines its attributes. Usually we differentiate between an observation instance and an observation type but the former is usually called just observation.

Observation types, as any other type, is a JSON-LD that defines the attributes of an observation.

To be able to create an observation you need to firstly define its type. When you create a new observation type, you will find there are a number of core attributes that are present in all observations. In addition to those like name and description that you can find in any object, you will find:

topic 
This is a String. It contains the destination path where this observation will be stored. We will explain later in this document the characteristics of a topic. Like paths in a filesystem you can specify a list of tokes separated by the character '/' to express an specific position in topic's tree. For instance, you can have /amtech as a topic but you can also express something more specific like /us/nevada/las_vegas/hotel_x/main_parking/parking_lot_1/movement_sensor as the topic of an observation generated by the movement sensor that is located in the parking lot 1 of the main parking of Hotel X in Las Vegas. A topic specification can have placeholders. Those will be explained later in this document.
producer 
A String used to specify the producer of this observation.
location 
If known, this is the location where this observation took place. It's expressed as a JSON String that contains a WKT specification. The structure of this JSON is explained in the Location's page.
ocurrence_time 
This is the date and time an observation occurred. It's specified by the producer of the observation.
detection_time 
This is the date and time an observation is detected in the system. The producer can specify it but it will always be overriden by our system.
targetthings 
This is a JSON String that specified the things that are affected in some way by this observation. This is a concept that is better explained in the Observer's page

Observation instances in simulator

The simulator is a page in the Creator's UE that allows the user to send observations as if they were generated by a thing in the IoT. There you can create your own observation's instances. Once created, you can select one or more observations and hit the Send button in order to run a simulation. Observations are actually sent to the sensor's network and you can see the result by consuming then from the corresponding topic.

Topics

Structure, MQTT reassembling

Proximity enrichment

Placeholders

Geolocation placeholders

Target things