Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

dranuag

Member Since 04 Mar 2015
Offline Last Active Jul 10 2017 09:36 AM
-----

#65736 .NET/Mono/NETMF Monitor and Command midleware for embedded projects

Posted by dranuag on 02 September 2016 - 01:10 PM

Hi,

I published on Codeplex v.1.2.0 of the "Monitor and Command" solution. The solution has been upgraded to Visual Studio 2015 Community Edition and this version adds the following :
- enhanced "device disconnection" detection and handling in the Core.Server library;  
- a new "Android Phone Controller" demo showcasing how to build Xamarin.Android clients referencing  the .NET client library.

Check https://monitorandco...ses/view/624328 for a detailed description of the content of that new version.

I also published on GitHub some Wiring/C++ code demonstrating how to integrate Particle's Photon devices with the middleware : https://github.com/c...rparticlephoton

A new YouTube video showcases those additions/enhancements.

Paul

 




#63995 Is this possible - Mixed Visual Studio Solution (.NET Mainstream and .NET Mic...

Posted by dranuag on 27 August 2015 - 06:49 AM

Ian, 

 

Regarding the "Add as link" functionality of Visual Studio, here is the reference from MSDN : https://msdn.microso...(v=vs.105).aspx

 

Paul 




#63983 Is this possible - Mixed Visual Studio Solution (.NET Mainstream and .NET Mic...

Posted by dranuag on 26 August 2015 - 10:11 AM

Hi Ian, 
 
Depending on the situation, there are several ways to "share code" between .NET, NETMF, Silverlight, WindowPhone, Windows 8, Universal App & Mono projects. 
 
The obvious one, that does not apply for NETMF, is to define your Types in a "Portable Class Library" project, specifying the targets you want to address. 
 
The not-so-obvious one, is to define your Types in a "Class Library" project, and then "add as link" the corresponding files in the projects where you want to use them, assuming that the namespaces referenced by the code that exists on those projects/targets. If not, you can, under some conditions, use precompilation directives to adapt the code for each target. 
 
I use those techniques in a solution hosted on Codeplex, that can be downloaded for reference. In that solution, I want to share a Message entity, defined in the Models project, between .NET, NETMF and Windows Phone 8.1 projects. 
 
Thus, I have : 
  • defined the corresponding Types in the Models project, that will compile a .NET 4.5 library; 
  • added "as link" those files in the "PortableModels" project, a "Portable Class Library" project targeting WindowsPhone 8.1, that will compile a portable library supported by WP 8.1; 
  • added "as link" those files in the MFClient project, a "NETMF Class Library" project. 
 
Since NETMF 4.2/4.3 does not support enums, that I use in the Message class, I have used precompilation directives to remplace them by int for NETMF projects:  
 
#if !MF_FRAMEWORK_VERSION_V4_2 && !MF_FRAMEWORK_VERSION_V4_3
        [DataMember]
        public ContentTypes ContentType { get; set; }
#else
        public int ContentType { get; set; }
#endif
 
I use the same technique to share the code of a MessageClientclass, defined in a "NETMF Class Library" project ,between two NETMF projects that will compile that class (and others) targeting NETMF42 & NETMF43. Check the projects MFClientShared, MFClient & MFClient43 from the solution.
 
Hope it helps,
 
Paul 



#63982 .NET/Mono/NETMF Monitor and Command midleware for embedded projects

Posted by dranuag on 26 August 2015 - 08:22 AM

Hi, 
 
I released today a stable version of the solution
 
I did learn a few things about networking and .NET/Mono x-platform development in the troubleshooting process and it lead to the improvement of the stability/reliability of the libraries : the Core.Server/Demo.WpfMonitor project, running on a Windows laptop, and the Core.Server/Test.ServerConsole project, running on a Raspberry Pi with Mono, have both been running smoothly over a test period of ten days, logging up to 1.000.000 messages sent by a Netduino 3 Wifi and a Raspberry Pi, with multiple connection/disconnections of a NetduinoPlus and a Windows Phone performed during the same period.
 
I also added :
- several features to facilitate troubleshooting/debugging;
- a test project Test.MFDeviceConsole, simulating a NETMF 4.2/4.3 device.
- two demo projects, one extending the Core.Server to present additional monitoring data on a WFP UI, the other sending BS18D20 temperature sensor data with a Netduino 3 Wifi;
 
Finally, I splitted the MFClient library project into two projects, one for NETMF 4.2 & one for NETMF 4.3, sharing common code.
 
Paul



#62693 .NET/Mono/NETMF Monitor and Command midleware for embedded projects

Posted by dranuag on 14 May 2015 - 10:10 PM

Hi,
 
I published today on Codeplex my ".NET/Mono/NETMF Monitor and Command middleware for embedded projects" Visual Studio 2013 solution. 
 
The solution produces .dll that you can reference to your .NET/Mono/NetMF (and WindowsPhone) projects to add client/server messaging capabilities allowing to monitor and control the processes using them. This could have many different usage, but I designed it primarily with embedded projects in mind, thus the Mono & NETMF support that I needed for my Netduino Plus and other devices. 
 
I did a short demo video featuring my Netduino Plus, a Raspberry Pi and a Windows Phone as remote controller.
 
The solution is still Beta, since I now want to enter a phase of extended "under load" and "on the long run" tests to assess the robustness of the software.
 

The solution and its usage, explained and documented the Codeplex pages, is released under the BSD licence, so feel free to test/use/comment it.

 

Paul




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.