Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "IoT/M2MIWG/Machine-to-machine model"

< IoT
Line 1: Line 1:
 
{{:DocumentationGuidelines/DraftHeader}}
 
{{:DocumentationGuidelines/DraftHeader}}
  
 +
= Requirements =
 +
 +
== Tree structure ==
 +
 +
* REST-like resource model
 +
* ease the management of access rights
 +
* improved extensibility
 +
 +
== Core model + extensions ==
 +
* CORE
 +
** Application State
 +
*** Data
 +
*** Events
 +
*** Commands
 +
*** Settings?
 +
** Communication capabilities
 +
* Extensions
 +
** Validation
 +
*** enum
 +
*** min/max
 +
*** length
 +
*** see JSR-303??? / "Built-in constraint definitions" in particular
 +
*** see XSD Restrictions?
 +
** Units
 +
** Access rights
 +
** Archiving policy?
 +
** Logical grouping/tagging
 +
*** useless at development time?
 +
** i18n
 +
** Monitoring
 +
*** define a prefered way to update resource tree
 +
** Rules
 +
*** Use it for monitoring?
 +
*** Use it to react to commands?
 +
*** Drools?
 +
** Notification
 +
** "Local" communication protocol?
 +
*** use openHAB binding mechanism???
 +
** Web Service/REST mapping???
 +
 +
= Open questions =
 +
 +
* Versioning?
 +
* Is there really a difference between settings and data?
 +
* Is a path a valid way to identify data/events/commands...? (vs UUID or anything else)
  
 
= Examples =
 
= Examples =

Revision as of 12:21, 8 September 2011

Warning2.png
Draft Content
This page is currently under construction. Community members are encouraged to maintain the page, and make sure the information is accurate.


Requirements

Tree structure

  • REST-like resource model
  • ease the management of access rights
  • improved extensibility

Core model + extensions

  • CORE
    • Application State
      • Data
      • Events
      • Commands
      • Settings?
    • Communication capabilities
  • Extensions
    • Validation
      • enum
      • min/max
      • length
      • see JSR-303??? / "Built-in constraint definitions" in particular
      • see XSD Restrictions?
    • Units
    • Access rights
    • Archiving policy?
    • Logical grouping/tagging
      • useless at development time?
    • i18n
    • Monitoring
      • define a prefered way to update resource tree
    • Rules
      • Use it for monitoring?
      • Use it to react to commands?
      • Drools?
    • Notification
    • "Local" communication protocol?
      • use openHAB binding mechanism???
    • Web Service/REST mapping???

Open questions

  • Versioning?
  • Is there really a difference between settings and data?
  • Is a path a valid way to identify data/events/commands...? (vs UUID or anything else)

Examples

Application model

-- author: Benjamin Cabé
-- revision: 1.0
Application "HomeAutomation"
 
 
CommunicationCapabilities {
 
}
 
 
Data {
 Rooms
  Room1
   TempSensor1
    value (int)
    batteryLevel (int)
    macAddress (string)
   Curtain1
    position (int)
    macAddress (string)
  Room2
   TempSensor1 (WavenisTemperatureSensor)
}
 
Events {
 TemperatureTooHot
 Intrusion, ACK
}
 
Settings {
  ????
}
 
Commands {
 ToggleCurtains(OPEN=default|CLOSE)
}


typedef model

-- author: Benjamin Cabé
-- revision 1.0
include 'tcpip'
 
Type "WavenisSensor" {
  serialNumber: string,
  macAddress: tcpip.MacAddress,
  batteryLevel: float,
  [...]
}
 
Type "WavenisTemperatureSensor" extends "WavenisSensor"{
  temperature: float
}


rules model

-- author: Benjamin Cabé
-- revision 1.0
Rules for application "HomeAutomation" v1.0
 
rule "trigger TemperatureTooHot"
  when
    (Rooms/Room1/TempSensor1 + Rooms/Room2/TempSensor1) / 2 > 25.0
  then
    TemperatureTooHot()
end


i18n model

-- author: Benjamin Cabé
-- revision 1.0
i18n for application "HomeAutomation" v1.0
 
en:
  Data/Rooms=House rooms
  Data/Rooms/Room1=Living Room
  Data/Rooms/Room1/TempSensor1=Temperature
  [...]
 
fr_FR:
  Data/Rooms=Pièces de la maison
  Data/Rooms/Room1=Salon
  Data/Rooms/Room1/TempSensor1=Température
  [...]

Back to the top