C# 클래스 Netduino.Core.Services.Emulator2

Extension of standard Emulator to provide events for key state changes
The standard emulator and derived classes go through several stages of initialization. However, external classes, like a view model don't get to participate in the "notification" of state changes. Thus it is difficult for a view model to know when it is safe to attach to the emulators LCD changed event.

This class is designed to add events to the standard emulator for the Initialize and Uninitialize states and to simplify registration of GPIO pins and LCD display components

상속: Emulator
파일 보기 프로젝트 열기: mlinnen/Netduino-Emulator

공개 메소드들

메소드 설명
Emulator2 ( ) : System

Creates a new instance of an Emulator2

InitializeComponent ( ) : void

Triggers the Initialize event

StartEmulator ( ) : void

Start the emulator engine on a new thread

Uses Environment.GetCommandLineArguments()

StartEmulator ( string Args ) : void

Start the emulator engine on a new thread

UninitializeComponent ( ) : void

Triggers the Uninitialize event

보호된 메소드들

메소드 설명
RegisterPin ( string Name, Cpu Pin ) : GpioPort

Registers a GPIO pin in the system

Useful method for registering a pin

NOTE: This should only be called from an overload of the LoadDefaultComponents() Method

RegisterPin ( string Name, Cpu Pin, GpioPortMode ExpectedMode, GpioPortMode AllowedMode ) : GpioPort

Registers a GPIO pin in the system

Useful method for registering a pin

NOTE: This should only be called from an overload of the LoadDefaultComponents() Method

RegisterPin ( string Name, Cpu Pin, VirtualKey Key ) : GpioPort

Registers a GPIO pin in the system

Useful method for registering a pin that acts as a button

NOTE: This should only be called from an overload of the LoadDefaultComponents() Method

메소드 상세

Emulator2() 공개 메소드

Creates a new instance of an Emulator2
public Emulator2 ( ) : System
리턴 System

InitializeComponent() 공개 메소드

Triggers the Initialize event
public InitializeComponent ( ) : void
리턴 void

RegisterPin() 보호된 메소드

Registers a GPIO pin in the system

Useful method for registering a pin

NOTE: This should only be called from an overload of the LoadDefaultComponents() Method

protected RegisterPin ( string Name, Cpu Pin ) : GpioPort
Name string Name for the pin
Pin Microsoft.SPOT.Hardware.Cpu Pin number
리턴 GpioPort

RegisterPin() 보호된 메소드

Registers a GPIO pin in the system

Useful method for registering a pin

NOTE: This should only be called from an overload of the LoadDefaultComponents() Method

protected RegisterPin ( string Name, Cpu Pin, GpioPortMode ExpectedMode, GpioPortMode AllowedMode ) : GpioPort
Name string Name for the pin
Pin Microsoft.SPOT.Hardware.Cpu Pin number
ExpectedMode GpioPortMode Expected mode for the pin
AllowedMode GpioPortMode Allowed modes for the pin
리턴 GpioPort

RegisterPin() 보호된 메소드

Registers a GPIO pin in the system

Useful method for registering a pin that acts as a button

NOTE: This should only be called from an overload of the LoadDefaultComponents() Method

protected RegisterPin ( string Name, Cpu Pin, VirtualKey Key ) : GpioPort
Name string Name for the pin
Pin Microsoft.SPOT.Hardware.Cpu Pin number
Key VirtualKey Virtual Key to attach to the pin
리턴 GpioPort

StartEmulator() 공개 메소드

Start the emulator engine on a new thread
Uses Environment.GetCommandLineArguments()
public StartEmulator ( ) : void
리턴 void

StartEmulator() 공개 메소드

Start the emulator engine on a new thread
public StartEmulator ( string Args ) : void
Args string Command line arguments
리턴 void

UninitializeComponent() 공개 메소드

Triggers the Uninitialize event
public UninitializeComponent ( ) : void
리턴 void