Quick viewing(Text Mode)

Alljoyn Device Management

Alljoyn Device Management

Any questions please contact winhectpe@.com

• The “medium” to enable AllJoyn applications to communicate via published APIs • Communication is via messages that map directly to APIs in high-level programming languages

• Based on discovery of applications/services

Can run over Wi-Fi, Wi-Fi Direct, , PLC and Consumer (client)

Producer (server) If required, authentication occurs on demand between the two apps when a method is invoked or to receive a signal.

PIN code, PSK, or ECDSA (Elliptical Curve Digital Signature Algorithm). Once authenticated, all messages between these two devices are encrypted using AES-128 CMM. Servicing, reduced code size

Optimized performance, full integration

Reduced code size, integrated with Windows SDK

AllJoyn Studio accelerates development for Windows

UWP Samples AllJoyn Standard Client API () MSAJAPI.dll

An Visual Studio extension developed by Runtime Class Description Watcher Searches for producers that advertise the target service Reports the success or failure of joining a session, and exposes a JoinSessionResult Consumer instance for the session if the join was successful.

Producer Advertises a service and exposes handlers for AllJoyn events.

Exposes methods and handlers to send and receive signals. Used Signals by both producers and consumers. Consumer Interacts with a service after it has been discovered. Arguments passed to methods in CalledEventArgs EventAdapters.ServiceEventAdapter. Used by method implementations in IService to report the success Result or failure of the call, as well as any return values. ReceivedEventArgs Arguments passed to a signal in Signals.

signals, properties and methods. low-overhead, inter-process communication with a type format for data representation.

Extends D-Bus Specification XML with XML tags for holding textual descriptions while also applying AllJoyn principles to the specification. "com.contoso.Sensor” vs “com.contoso.Sensor.Humidity”

The "Foo" interface created by Contoso Ltd., which owns the contoso.com domain Properties Signals Describe additional functionality or constraints

Producer  Consumer (direction="out") Consumer  Producer (direction="in") Default: "null" authentication Strong authentication: pre-shared key (PSK) / certificate key exchange (ECDSA).

... • Allow access to a producer's state • Access values: “read” and “readwrite” • Annotation - “org.freedesktop.DBus.Property.EmitsChangedSignal”

Value Action when property change occurs true Emit a signal denoting the changed property and the new value Invalidates Emit a signal denoting the changed property but NOT the new value false Emit no signal The property will never change value and never emit a changed signal. const This will be introduced in the AllJoyn 16.04 release; until then, use "true". • Modify the state of a producer • May have input and output arguments • No return message: "org.freedesktop.DBus.Method.NoReply".

• Inform consumers of an event that they could not determine by querying the producer • “out” arguments only. • Should never be state-based. Provide feedback as error, warning, and informational messages

ajxmlcop.exe doorExample.xml

GitHub

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.example.Door; Implement the Producer 1. Create a class for the producer’s service. Use Quick Action to fill in the necessary components. 2. Create a new AllJoynBusAttachment 3. (Optional) Populate the About data for the producer through AllJoynBusAttachment.AboutData 4. Initialize the producer with the AllJoynBusAttachment 5. Instantiate the newly created Service for the producer 6. Start the producer [email protected] Subscribe https://channel9.msdn.com/Blogs/Internet-of-Things-Blog/Creating-AllJoyn-Producers-and-Authoring- AllJoyn-Introspection-XML?ocid=EntriesInArea

https://channel9.msdn.com/Blogs/Internet-of-Things-Blog/Using-the-AllJoyn--Studio-Extension

https://wiki.allseenalliance.org/irb/interface_design_guidelines_1.1 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!! 