Device Simulation Framework Design Guide

You can use the Device Simulation Framework (DSF) for USB Devices to test your USB devices. DSF simulates USB devices that are using only software, so you do not need any special hardware.

The Device Simulation Framework for USB Devices provides an architecture and programming framework to simulate USB devices in software. The framework consists of a simulated EHCI controller and set of Component Object Model (COM) objects that implement a generic USB device. USB device simulators create and configure these COM objects to function like a specific USB device according to a USB device class specification or according to a unique device configuration. The COM objects implement the USB protocol on behalf of the device simulator, and the device simulator must move data in and out of the COM objects that implement the device's endpoints.

For example, a test application can create a simulated EHCI controller, create a simulated device, connect the device to the controller, and then use the device to simulate hardware interactions with the target system while using Microsoft Win32 or other system APIs to interact with the device's driver. The operating system will view the simulated EHCI controller and attached devices as "real" hardware.

If you are developing a driver for a USB device, you can use a USB device simulator to:

  • Test your driver before prototype hardware is available.

  • Test potential hardware and driver changes before committing to a hardware update.

  • Automate testing of your driver.

  • Execute code paths and code sequences and force data values that would not otherwise be possible with real hardware.

Even if your device uses system-supplied class drivers, you can still use a USB device simulator to simulate the various USB and device class protocol sequences that your device implements and write a test application to interact with it.

The framework also includes an external USB hub simulator and an additional support for HID devices. In general, USB device simulation enables faster development and more comprehensive and automated testing of your device and driver.

For more information about how to set up and install the Device Simulation Framework (DSF) for USB Devices, see Device Simulation Framework User's Guide.

This section includes the following topics:

Prerequisite Knowledge for DSF

DSF Architecture

Bus Simulators and Device Simulators

COM Objects in DSF

DSF Object Model

DSF Core Simulators

Sample USB Device Simulators

Designing a USB Device Simulator

Deploying a USB Device Simulator

Testing a USB Driver with a USB Device Simulator

Developing DSF Applications in Managed Code

Using Visual Studio to Develop 64-bit DSF Applications

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010