Subscribe to News

OSAmI-ES Device model

Author : Jesus Bermejo

From TechnologicalWiki

Jump to: navigation, search

Contents

Device Model Class Diagram

Image:OSAmI-ES Device Model.png

[edit] Events and Device Monitoring

The proposed approach consists on each driver being accountable for posting events notifying changes on the state of its associated actuator devices through the OSGi Event Admin service.

As a general rule, on each state change an event will be posted under the topic "osami/device/statechanged", and its properties will convey information about the type, identity, altered state variable name and new value, and timestamp.

Bearing the different types of devices supported by the platform (class diagram above) the events to be fired are specified in the following tables.

[edit] AcousticSignal

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "AcousticSignal"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • activated: Boolean value


[edit] LuminicSignal

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "LuminicSignal"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • activated: Boolean value


[edit] Light

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "Light"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • lightOn: Boolean value


[edit] PowerSupply

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "PowerSupply"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • powerSupplyOn: Boolean value


[edit] DoorLock

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "DoorLock"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • locked: Boolean value


[edit] WaterValve

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "WaterValve"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • closed: Boolean value


[edit] CoolingDevice

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "CoolingDevice"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • currentValue: Integer value
  • maxLevel: Integer value
  • minLevel: Integer value


[edit] GradualLight

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "GradualLight"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • currentValue: Integer value
  • maxLevel: Integer value
  • minLevel: Integer value


[edit] Blind

Topic osami/device/statechanged
Properties
  • id: device identifier
  • devicetype: "GradualLight"
  • statevarname: modified state variable's name
  • value: new value
  • timestamp: value of System.currentTimeMillis at change instant (Long)
State variables
  • state: Either "stopped", "opening", or "closed"


[edit] License

Apache License, Version 2.0


[edit] Bundles

Bundle Repository: http://repository.osami-commons.org/

  • OSAmIDeviceModel_1.0.0.jar


[edit] Source Code

Host: cvs.forge.os4os.org

Repository path: /cvsroot/osami

Modules:

  • DeviceAbstraction/DeviceModel/OSAmIDeviceModel
Main Collaborators