Scoprire il micro framework con c
This presentation is the property of its rightful owner.
Sponsored Links
1 / 15

Scoprire il Micro Framework con C# PowerPoint PPT Presentation


  • 98 Views
  • Uploaded on
  • Presentation posted in: General

Scoprire il Micro Framework con C#. Raffaele Rialdi. Twitter: @raffaeler. Email: [email protected] Articoli e codice: http://www.iamraf.net. Blog: http://blogs.ugidotnet.org/raffaele. Profilo MVP: https://mvp.support.microsoft.com/profile/raffaele. Il mondo dei device. Ieri

Download Presentation

Scoprire il Micro Framework con C#

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Scoprire il micro framework con c

Scoprire il Micro Frameworkcon C#

Raffaele Rialdi

Twitter: @raffaeler

Email:[email protected]

Articoli e codice: http://www.iamraf.net

Blog:http://blogs.ugidotnet.org/raffaele

Profilo MVP:https://mvp.support.microsoft.com/profile/raffaele


Il mondo dei device

Il mondo dei device

  • Ieri

    • PC  Full Windows

    • Apparati industriali  Windows Embedded / CE

    • PDA, Cellulari  Windows CE

    • Piccole schede  Micro Framework

  • Domani

    • PC  Full Windows

    • Apparati industriali  Windows Embedded / CE

    • PDA, Cellulari  Full Windows vNext (SoC)

    • Piccole schede  Micro Framework


Caratteristiche dell hardware

Caratteristiche dell'hardware

  • Circa 256K di RAM, 512K di ROM

    • WinCE è intorno ai 10MB RAM / 10MB ROM

  • CPU 32 bit tipicamente tra 27 e 100MHz

    • ARM 7 in poi, Analog Devices Blackfin, Renesas SH2/SH2A

    • Memory Management Unit non necessaria

    • … Porting Kit!


Caratteristiche del mf

Caratteristiche del MF

  • Nasce nel 2001 dal progetto "Smart Personal Object Technology" (SPOT) usata per gli orologi MSN

  • Codebase indipendente da CF o fx.net

    • Open source http://netmf.codeplex.com

  • Subset del full fx.net

  • Il runtime del CLR interpreta il codice IL

  • Pieno controllo delle periferiche hardware

  • Supportato da VS2010 (anche express)

    • Wizard, emulatore, esempi, help

    • Tool diagnostici e conversione font truetype


Architettura

Architettura

HTTP(S)

Managed Application

SDK

Application Services

SSL

DPWS

XML Parser

Advanced Graphics

Managed Libraries

Threading

Collections

Reflection

Sockets

USB client

I/O: USB,

UART, SPI, I2C

Basic

Graphics

Porting Kit (PK)

Security

File System

Touch Panel

Managed Run-Time

CLR, Interpreter, Executive, and Interop

PAL – Platform Abstraction Layer

approximately 40 functions

(preferred)HAL - Hardware Abstraction Layer

approximately 60 functions

(optional)Host OS

Hardware


Ambiente di sviluppo

Ambiente di sviluppo


Librerie supporto base

Librerie – Supporto Base

  • Suddivise tra i namespace System.* e SPOT.*

    • ArrayList (unica collection), Hashtable, Queue, Stack

    • XmlWriter, XmlReader, XmlTextReader

    • Thread, Timer, AutoResetEvent, …

    • Reflection

    • IO: File, streams, SerialPort

    • Crypto API

    • GC, delegate, AppDomain, String, Uri, WeakReference, …


Librerie hardware

Librerie - Hardware

  • Microsoft.SPOT.Hardware

    • Battery, PowerState, PowerEvent, SleepEvent

    • Cpu

    • I2CDevice

    • Port, InputPort, OutputPort, InterruptPort, TristatePort

    • SPI

    • Watchdog, WatchdogEvent

  • Microsoft.SPOT.Hardware.UsbClient

  • SDK Specifici dei produttori OEM. Per es. GHI Electronics:

    • CAN, PWM, RealtimeClock, OneWire

    • USB client (mouse, kbd, …), USB host (mouse, kbd, …)


Librerie user interface

Librerie – User Interface

  • Implementa WPF! (versione super-ridotta)

    • Niente XAML o binding, solo API essenziali

    • Microsoft.SPOT.Presentation

  • Controlli

    • Border, Canvas, Image, ListBox, Panel, ScrollViewer, StackPanel, Text, …

    • No Button:http://www.nielsderdaele.be/post/2010/10/12/WPF-Based-Touch-Button-for-NET-Micro-Framework-41.aspx

  • Disegno

    • Brush, Color, Pen, ImageBrush, DrawingContext, …

    • Ellipse , Line, Polygon, Rectangle, Shape

  • Touch

    • Ink, Touch, TouchEvent, TouchPanel, InkCanvas

  • Event routing e input providers


Librerie network

Librerie - Network

  • Network:

    • Socket

    • HttpWebRequest, HttpWebResponse and HttpListener

      • Esistono esempi di Webserver pronti all'uso

    • HTTP/1.1 compreso chunking e keep-alive

    • SSL con certificati X.509!

  • Transport:

    • 802.11 [WiFi] supportato (necessita di supporto sdk OEM)

    • 802.15.4 [ZigBee] implementato ma ancora non documentato


Librerie dpws

Librerie - DPWS

  • Implementa WCF (Device Profile for Web Services)!

    • Può essere client o server

    • Implementa WS-Discovery

    • Generazione proxy con MFSvcUtil

  • Implementazione ridotta:

    • http://msdn.microsoft.com/en-us/library/ee435399.aspx

    • Solo Http binding

    • WSDL 1.1, SOAP 1.2, WS-Addressing, WS-MetadataExchange, WS-Transfer, WS-Discovery, WS-Eventing


C nel micro framework

C# nel Micro Framework

  • Non implementati:

    • Generics

    • Linq

      • Workaround:http://blogs.oberon.ch/tamberg/2009-02-06/implementing-linq-on-the-dotnet-mf.html

    • Expression trees

    • anonymous types

    • partial classes

    • nullable types

    • tipi puntatori (e.g. IntPtr)

    • supporto limitato per unsafe code blocks

      • Solo unsafe/fixed in un numero di casi limitati e su array

    • custom attributes


Real world samples

Real-world samples

  • http://www.tinyclr.com/ by GHI

  • http://www.netduino.com/projects/ by Netduino

  • Micro Framework sources (+ contributions) by NetMF team

    • http://netmf.codeplex.com/documentation


Votate le feature per la prossima release

Votate le feature perla prossima release!

  • http://netmf.codeplex.com/

  • Login via LiveId

  • Issue Tracker

  • Votate!

    • REST: http://netmf.codeplex.com/workitem/751

    • Generics: http://netmf.codeplex.com/workitem/750

    • Video Streaming: http://netmf.codeplex.com/workitem/749

  • Il team del Micro Framework legge tutte le richieste

    • È possibile collaborare al source tree ufficiale (direttamente sul TFS di codeplex)


Domande

Domande ?

Uno grazie speciale a Lorenzo Tessiore e Zach Libby del team di Micro Framework per la disponibilità e i suggerimenti


  • Login