Presentation is loading. Please wait.

Presentation is loading. Please wait.

Home API Architecture Brian Christian Software Engineer Intelligent Home Systems Group Microsoft Corporation.

Similar presentations


Presentation on theme: "Home API Architecture Brian Christian Software Engineer Intelligent Home Systems Group Microsoft Corporation."— Presentation transcript:

1 Home API Architecture Brian Christian Software Engineer Intelligent Home Systems Group Microsoft Corporation

2 Programming Model  Object model  Object types  Discovering and creating objects  Property change events, subscriptions  Asynchronous calls  Property routes

3 Client application TVTimerLight Eventsubscriptions Propertyroute Container object Filteredevents Get/Set Properties VCRSensor Home API objects Home API Services Devices on home networks Client Application View Living room

4 Service Providers… 1394 Stack Control Stack TVLightVCRSensor Home API Services IEEE 1394 ControlNetwork SceneManagerTimer  Bridge the gap between Home API and underlying networks, protocols, services

5 Tuner Display Audio ChannelChannelListPresets myTV.Tuner.Channel = “CNN” IDispatch IHomeObject TV Object Object Model  Persistent OLE Automation objects with properties corresponding to name, ID, controls, and device state  Some properties are sub-objects (e.g., Tuner)

6 IDispatch IHomeObject IHomeObject  Get/SetProperty()  IsOfType()  IsPropertyImplemented()  SubscribeTo/UnsubscribeFromProperty()  AsyncGet/SetProperty()  WaitForAsyncGet/Set()

7 Tuner Display Audio ChannelChannelListPresets IDispatch IHomeObject TV Object Object Types  Object types imply a set of properties, property semantics  Objects can be of multiple types  IHomeObject::IsOfType(Type_GUID)

8 Discovering Objects  Containers form namespace with Children property  Bind names and/or enumerate containers  Set tv = GetObject(“home:Living Room/TV”)  For Each light in livingRoom.All(HOMEAPI_Light) ‘do something with light Next light Root Den Living Room TVLightLightPhone

9 Creating Objects  Set timer = GetObject(“home:new:HomeAPI.Timer”) timer.LowPeriod = 60 timer.LowPeriod = 60 timer.Count = 1 timer.Count = 1 myApplication.Add timer myApplication.Add timer Root Applications myApplication ExpressionTimer

10 Timer Client app. Callback Other client Output Subscriptions Events, Subscriptions  subID = timer.SubscribeToProperty( _ “Output when Output = 1”, callback ) “Output when Output = 1”, callback ) Output when Output = 1

11 Asynchronous Calls  callID = vcr.AsyncSetProperty( “Transport.TapePosition”,_ 0.5, RESULT_AS_EVENT, callback ) Public Sub AsyncSetResult ( callID, status ) 0.5, RESULT_AS_EVENT, callback ) Public Sub AsyncSetResult ( callID, status ) ‘handle callback here End Sub ‘handle callback here End Sub  Can also poll or block until call completes Time Client app. Callback AsyncSetProperty AsyncSetResult VCRVCR

12 TimerLight TimerLight OutputBrightness property route object Property Routes  myContainer.PropertyRoutes.Add _ timer,“Output”, light, “Brightness” timer,“Output”, light, “Brightness”

13 Run Without Running  Apps always running  Configure and exit  Create Expressions, Timers, Property Routes  delegate execution to Home API system

14 Rich features, easy to use Network Protocol Stacks Home networks Devices IEEE 1394 ControlNetwork Architecture Overview Client application TVTimerLight Eventsubscriptions Propertyroute Container object Filteredevents Get/Set Properties VCRSensor Home API objects Home API Services Living room

15 Extensibility  What about…  Media streaming?  Security?  Protocol-specific features?  Example: DirectShow ® for media streaming

16 DirectShow Integration  Hypothetical code example: Dim filterGraph As IMediaControl Dim filterGraph As IMediaControl Set filterGraph = myTV.ServiceProvider( _ Set filterGraph = myTV.ServiceProvider( _ DirectShowMediaControl_Service ) DirectShowMediaControl_Service ) filterGraph.RenderFile(“video.mpg”) filterGraph.RenderFile(“video.mpg”) video.mpg IEEE 1394

17 Client FilterGraph IMediaControl ObjectHandler IHomeObject Control Object ServiceProvider IEEE 1394 Associations DirectShow Integration (2) 1394 Drivers

18 Summary  Goal: make application development easy  Programming model: rich features, easy to use  Extensible to support media streaming, etc.  Complements other home networking initiatives  Will be included in future Windows releases

19 Security Entertainment Safety Comfort Convenience Energy savings Control Style http://www.homeapi.orghttp://www.homeapi.org Call To Action  Ship controllable home devices  Become Home API participant  Deliver Windows-based home control applications using HAPI

20


Download ppt "Home API Architecture Brian Christian Software Engineer Intelligent Home Systems Group Microsoft Corporation."

Similar presentations


Ads by Google