Giter Club home page Giter Club logo

alljoyndotnet's Introduction

AllJoynDotNet

A .NET wrapper for the AllJoyn C Library

Note: This is very much a work in progress!

Features:

  • Code generator that auto-generates the Interop from the AllJoyn C-API, including full code-summaries (make sure you pull the submodule for this to work).
  • Library for Windows Universal, Windows Desktop, Xamarin-Android, and Xamarin-iOS.

What's not working:

  • Besides limited creation of bus attachments, no classes has been done for the rest yet.
  • Generated interop code is mostly untested, but so far seems to work in most places.
  • Xamarin-Android hardly works (ER_OS_ERROR when connecting the BusAttachment).
  • Xamarin-iOS hasn't been started yet (help wanted).

FAQ

Windows 10 UWP already has AllJoyn. Do I need this?

  • The WinRT APIs are far too limited, and the provided code-generation tools can't create proper certifiable services. You still need C++ to create a proper client. When running under UWP, no AllJoyn native library is needed, since the one provided with Windows 10 is used (Xamarin Android deploys the native library, and Desktop you have to manually copy them).

Why?

  • Because I don't like to write too much code in C++. I'm faster in C#. Also building AllJoyn clients often mean running on mobile, so we need a cross platform way like Xamarin

A code sample:

// Create the bus attachment
var bus = new BusAttachment("ServiceTest", true);
bus.Start();
bus.Connect();
Debug.WriteLine("Bus started successfully. Unique name: " + bus.UniqueName);
//Create interface
string interfaceName = "org.test.a1234.AnnounceHandlerTest";
string interfaceQcc = "<node>" +
						$"<interface name='{interfaceName}'>" +
						"  <method name='Foo'>" +
						"  </method>" +
						"</interface>" +
						"</node>";
bus.CreateInterfacesFromXml(interfaceQcc);
//Test if the interface is there
var iface = bus.GetInterface(interfaceName);
var secure = iface.IsSecure;
var name = iface.Name;

alljoyndotnet's People

Contributors

dotmorten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alljoyndotnet's Issues

Compilation error for Android

I'm trying to compile the source code for Xamarin.Android but there's some errors:

 •QStatus is not found

 •some casting errors like comparaison of int and intptr

Is there something to do with that?

thanks.

API Delegates might need a different attribute

I have the same motivation as you for creating a more complete managed AllJoyn API than that of Windows.Devices.AllJoyn. I started with having a look at the AllJoyn 14.06.00 C# Unity implementation and , of course, your implementation. As a test case, I do not use a sample like you do, but I started implementing the unit tests in the AllJoyn 15.09.00 core (C++) implementation. I have not tested the AboutListener part yet, but start with the BusListener. I really got stuck! Luckily, In the C# Unity stuff I found that (the structure containing) callbacks need pinning to make sure the garbage collector does not move them around. Apart from that I had to define the delegates with the UnmanagedFunctionPointer with parameter CallingConvention.StdCall!!! I saw your API uses CallingConvention.CDecl., so you might run in the same problems. I am no expert in P/Invoke, but thought this might help you in your efforts! By the way, I am writing my API in VB, since this is my 'native' language.

Error while executing proxyObject.IntrospectRemoteObject()

I am trying to connect two alljoyn application (console app) running over two physical machine (Windows 10 64 bit ) on same network. I'm facing error while executing

proxyObject.IntrospectRemoteObject();

It always returns ER_BUS_REPLY_IS_ERROR_MESSAGE .
Things that i have tried :

  1. Added entry in firewall for app on both machine.
  2. Tried to connect by providing explicit connectSpec with ips.

I executed chat sample came along with alljoyn sample bundle on same machine and those are working good.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.