Difference between revisions of "Edge reasoners"

From AMTech WikiDocs
Jump to: navigation, search
Line 1: Line 1:
Allows to configure reasoners to be executed by M2MBrigdes of an [[M2MBridge_network|M2MBridge Network]]
+
=Edge Reasoners=
=Select an observation that must=
+
Allows to configure reasoners to be executed by M2MBrigdes of an [[M2MBridge_network|M2MBridge Network]]. A reasoner consists of two fundamental parts:
===be generated by the bridge that executes the reasoner===
+
* An observer
===configured at the [[Observations_production_and_consumption|observation production configuration]]===
+
* A list of one or more actions
 +
 
 +
==Observer==
 +
The observer is the conditional part. It's the condition that must be met in order to trigger the execution of actions associated to the reasoner. It starts by selection a type of observation among the types of observations configured in the [[Observations_production_and_consumption|observation production configuration]] of the bridge. When you decide to create a reasoner you will be asked for the type of observation that this reasoner will act on. Later on you will be allowed to also add constraints on this type of observation.
 
[[File:erSelectObservation.png|850px|thumbnail|center|Select observation type]]
 
[[File:erSelectObservation.png|850px|thumbnail|center|Select observation type]]
===Set constrains on observation properties if required similar to those on the thing properties explained in [[Observers#Filter_criteria|section]], however some kind of constraints are not allowed (like ''proximity area'' based constraint) and a new one '''isRequired''' is included to ensure that the observation instance contains a given field.===
+
 
 +
===Constraints===
 +
The constraints that can be specified for the observer in an edge reasoner are very similar to those explained in [[Observers#Filter_criteria|this section]]. However, some kind of constraints are not allowed in this context. That's the case, for example, of ''proximity area'' based constraints. There are also some additions like '''isRequired''', which is a new constraint that allows you to require the presence of a certain property in the observation.
 
[[File:erSetObservationFilters.png|950px|thumbnail|center|Select observation type]]
 
[[File:erSetObservationFilters.png|950px|thumbnail|center|Select observation type]]
 
[[File:erSetObservationFilters2.png|950px|thumbnail|center|Select observation type]]
 
[[File:erSetObservationFilters2.png|950px|thumbnail|center|Select observation type]]
=Add actions=
+
 
===Select the target M2MBridge instance===
+
==Actions==
===Select the target thing instance that will execute the command===
+
Regarding actions you will be allowed to create two types of actions:
===Select the observation type to be sent as a command to selected thing instance===
+
* Send command
 +
* Custom action
 +
 
 +
===Send command===
 +
For the action send command you will be asked for several properties:
 +
* The target M2MBridge instance
 +
* The target plugin (thing instance) that will receive the command
 +
* The command (observation type) to be sent
 
[[File:erSendCommand.png|950px|thumbnail|center|Select observation type]]
 
[[File:erSendCommand.png|950px|thumbnail|center|Select observation type]]
===Bind values by constants, observation properties or javascript code explained in [[Binding|section]]===
+
To fill the properties of the command to be sent, you will be able to specify bindings in a way that is very similar to the specification of [[Binding|bindings for cloud reasoners]].
 
[[File:erBindingActionsProperties.png|950px|thumbnail|center|Select observation type]]
 
[[File:erBindingActionsProperties.png|950px|thumbnail|center|Select observation type]]
 +
 +
===Custom command===
 +
Custom commands are a very powerful tool that allows you to build an action for the execution of custom code in a controlled environment. Once you
 +
 +
====Context====

Revision as of 01:38, 16 August 2019

Edge Reasoners

Allows to configure reasoners to be executed by M2MBrigdes of an M2MBridge Network. A reasoner consists of two fundamental parts:

  • An observer
  • A list of one or more actions

Observer

The observer is the conditional part. It's the condition that must be met in order to trigger the execution of actions associated to the reasoner. It starts by selection a type of observation among the types of observations configured in the observation production configuration of the bridge. When you decide to create a reasoner you will be asked for the type of observation that this reasoner will act on. Later on you will be allowed to also add constraints on this type of observation.

Select observation type

Constraints

The constraints that can be specified for the observer in an edge reasoner are very similar to those explained in this section. However, some kind of constraints are not allowed in this context. That's the case, for example, of proximity area based constraints. There are also some additions like isRequired, which is a new constraint that allows you to require the presence of a certain property in the observation.

Select observation type
Select observation type

Actions

Regarding actions you will be allowed to create two types of actions:

  • Send command
  • Custom action

Send command

For the action send command you will be asked for several properties:

  • The target M2MBridge instance
  • The target plugin (thing instance) that will receive the command
  • The command (observation type) to be sent
Select observation type

To fill the properties of the command to be sent, you will be able to specify bindings in a way that is very similar to the specification of bindings for cloud reasoners.

Select observation type

Custom command

Custom commands are a very powerful tool that allows you to build an action for the execution of custom code in a controlled environment. Once you

Context