Alljoyn Node

Alljoyn Node

Any questions please contact [email protected] AllJoyn Node AllJoyn Thin Client Other Proximal or Cloud Devices 72° Device System Bridge AllJoyn Common Interface Others OSS Z-Wave example Bridge • • • • • Adapter Network Access Stack Go to Visual Studio Gallery and search for “DSB” or Download here An Visual Studio extension developed by Microsoft IoT Explorer for AllJoyn A Modbus variant used for communications over TCP/IP networks, connecting over 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 1. Install the AllJoyn Device System Bridge Template 2. Launch Visual Studio 2015, click File > New > Project. 3. In the New Project dialog box, click Installed > Templates > Visual C# > Windows > AllJoyn Device System Bridge to create a new AllJoyn Device System Bridge App project Access to non-AllJoyn Network specific In case of Modbus TCP, the network stack does the following: DSB • Connects to the Modbus Gateway Network Stack • Sends Modbus TCP request to the Modbus MyModbusGateway Library Device • Listens and parses Modbus TCP response from the Modbus Device Instantiates and manages virtual devices on behalf of each device from the non-AllJoyn network Adapter DSB Translates device schemas into internal Network Stack device objects MyModbusGateway Library Initialize Modbus Gateway • Connect to the Modbus Gateway Adapter DSB Initialize Modbus Sensor Device • Create ModbusSensorDevice class as a child of Network Stack IAdapterDevice MyModbusGateway Library • Define device property and attributes: GetPropertyValue() • ModbusSensorAttribute::ReadAsync() • Creates a Modbus read request • Sends the Modbus read request to the device Adapter DSB • Listens for the Modbus response from the device • Parses the response and updates Value.Data of the attribute Network Stack MyModbusGateway Library 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 1. Install the AllJoyn Studio 2. Launch Visual Studio 2015, click File > New > Project. 3. In the New Project dialog box, click Installed > Templates > Visual C# > Windows > Universal to create a new AllJoyn App project Add and Remove Interfaces Automatically add the generated files as a WinRT Component To modify the interfaces after the solution is created… Go to AllJoyn > Add/Remove Interfaces... to launch the Interface manager 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. 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. ModbusSensorDevice::Initialize() • Define Signals • Implicit Signal Adapter • Explicit Signal DSB Define a Event Handler of the Signal Network Stack MyModbusGateway Library Call the Event Handler in GetPropertyValue() 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. 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 [email protected] Subscribe Join WinHEC LINE Community We want to hear from you! @winhec Please Complete the Evaluation Form and return it to our reception. Your input is highly important to us! Thank you!! .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    33 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us