AllJoyn Node AllJoyn Thin Client Other Proximal or Cloud Devices - - PowerPoint PPT Presentation

alljoyn node
SMART_READER_LITE
LIVE PREVIEW

AllJoyn Node AllJoyn Thin Client Other Proximal or Cloud Devices - - PowerPoint PPT Presentation

Any questions please contact winhectpe@microsoft.com AllJoyn Node AllJoyn Thin Client Other Proximal or Cloud Devices 72 Device System Bridge AllJoyn Common Interface Others OSS Z-Wave example Bridge Adapter


slide-1
SLIDE 1

Any questions please contact winhectpe@microsoft.com

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5

AllJoyn Node Other Proximal or Cloud Devices AllJoyn Thin Client Device System Bridge

Others

72°

AllJoyn Common Interface

slide-6
SLIDE 6
slide-7
SLIDE 7

OSS Z-Wave example

Network Access Stack Bridge

  • Adapter
slide-8
SLIDE 8
slide-9
SLIDE 9
slide-10
SLIDE 10

Go to Visu sual al Studi dio Galler ery and search for “DSB” or Download here

slide-11
SLIDE 11

An Visual Studio extension developed by Microsoft

slide-12
SLIDE 12

IoT T Explor

  • rer

er for AllJoyn lJoyn

slide-13
SLIDE 13
slide-14
SLIDE 14

A Modbus variant used for communications over TCP/IP networks, connecting

  • ver port 502.

Client/Server Model

Transaction ID Protocol ID Frame Field Unit ID Function Code Target Address Data bytes 2 Bytes 2 Bytes 2 Bytes 1 Byte 1 Byte 2 Bytes N bytes

slide-15
SLIDE 15
slide-16
SLIDE 16
  • 1. Install the AllJoyn Device

System Bridge T emplate

  • 2. Launch Visu

sual al Studio dio 2015, click Fi File > New > Proje ject ct.

  • 3. In the New Project dialog

box, click Inst stalled lled > T emp mplates es > Visu sual al C# > Windo dows ws > AllJo Joyn yn Devic ice e Syst stem em Bridg dge to create a new AllJoyn Device System Bridge App project

slide-17
SLIDE 17

Access to non-AllJoyn Network specific In case of Modbus TCP , the network stack does the following:

  • Connects to the Modbus Gateway
  • Sends Modbus TCP request to the Modbus

Device

  • Listens and parses Modbus TCP response from

the Modbus Device

Network Stack

MyModbusGateway Library

DSB

slide-18
SLIDE 18

Instantiates and manages virtual devices on behalf of each device from the non-AllJoyn network Translates device schemas into internal device objects

Adapter Network Stack

MyModbusGateway Library

DSB

slide-19
SLIDE 19

Initialize Modbus Gateway

  • Connect to the Modbus Gateway

Initialize Modbus Sensor Device

  • Create ModbusSensorDevice class as a child of

IAdapterDevice

  • Define device property and attributes:

Adapter Network Stack

MyModbusGateway Library

DSB

slide-20
SLIDE 20

GetPropertyValue()

  • ModbusSensorAttribute::ReadAsync()
  • Creates a Modbus read request
  • Sends the Modbus read request to the device
  • Listens for the Modbus response from the device
  • Parses the response and updates Value.Data of the attribute

SetPropetyValue()

  • ModbusSensorAttribute::WriteAsync()
  • Check input values
  • Creates a Modbus write request
  • Sends the Modbus write request to the device
  • Listens for the Modbus response from the device

Adapter Network Stack

MyModbusGateway Library

DSB

slide-21
SLIDE 21
slide-22
SLIDE 22
  • 1. Install the AllJoyn Studio
  • 2. Launch Visu

sual al Studi dio 2015, click Fi File > Ne New > Projec ject.

  • 3. In the New Project dialog

box, click Inst stalle lled > T emp mplates es > Visu sual al C# > Windo dows ws > Unive versal sal to create a new AllJ lJoyn yn App pp project

slide-23
SLIDE 23

Add and Remove Interfaces Automatically add the generated files as a WinRT Component T

  • modify the interfaces after the solution is created…

Go to AllJoyn lJoyn > Add/Re Remo move ve Inter erfac aces es... ... to launch the Inter erface face manager ger

slide-24
SLIDE 24

Add a “Using” clause to access the WinRT components

Using Windows.Devices.AllJoyn; Using com.microsoft.ModbusAdapter.MyModbusSensor.interface_1;

Implement the Watcher

Create a new AllJoynBusAttachment Initialize the watcher with the AllJoynBusAttachment Register the watcher Added event Start the watcher Register a consumer NOTE: One consumer for one producer.

slide-25
SLIDE 25

Get Attribute Value

Interface_1GetAttributeResult myResult = await myConusmer.GetAttributeAsync(); if(myResult.Status != AllJoynStatus.Ok) return; double myValue = myResult.AttributeValue;

Set Attribute Value

await myConusmer.SetAttributeAsync();

Use the predefined function calls om Interface_1Consumer.

slide-26
SLIDE 26
slide-27
SLIDE 27

ModbusSensorDevice::Initialize()

  • Define Signals
  • Implicit Signal
  • Explicit Signal

Define a Event Handler of the Signal Call the Event Handler in GetPropertyValue()

Adapter Network Stack

MyModbusGateway Library

DSB

slide-28
SLIDE 28

In Watcher_Added event

Register events for the various Signals that the producer will emit.

  • Property changed signals are direct members of the consumer class.
  • Other signals are members of the Signals class under the Main Interface.

Define an Event Handler for the Signal

Send toast notification when received the temperature changed event.

slide-29
SLIDE 29

http://ms-iot.github.io/content/en-US/win10/AllJoyn.htm git.allseenalliance.org/cgit/dsb.git

  • Mock DSB Tutorial and Sample
  • Z-Wave DSB Tutorial and Sample
  • ZigBee DSB Tutorial and Sample
  • REST API DSB Tutorial and Sample (soon, keep checking)
  • GPIO DSB Tutorial
  • BACnet DSB Sample
slide-30
SLIDE 30

allseen-gateway@lists.allseenalliance.org Subscribe

slide-31
SLIDE 31

Join WinHEC LINE Community @winhec hec

We want to hear from you! Please Complete the Evaluation Form and return it to our reception. Your input is highly important to us! Thank you!! 

slide-32
SLIDE 32
slide-33
SLIDE 33