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
Показать файл Открыть проект

Открытые методы

Метод Описание
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