Skip to content

ATF Target Manager Sample

Gary edited this page Mar 17, 2015 · 3 revisions

Table of Contents

Description

TargetManager is a sample that shows how to use the TargetEnumerationService to discover, add, configure and select targets. Targets are network endpoints, such as TCP/IP addresses, PS3™ DevKits (to be added) or Playstation®Vita DevKits. TargetEnumerationService is implemented as a MEF plugin that supports the ITargetConsumer interface for querying and enumerating targets. It consumes target providers created by the application.

To learn about TargetManager's implementation, see Target Manager Programming Discussion.

ATF Features Demonstrated by TargetManager

  • Use of Managed Extensibility Framework (MEF) to put applications together.
  • Use of the application shell framework, including CommandService, SettingsService and ControlHostService.
  • Use of TcpIpTargetProvider and Deci4pTargetProvider to add, display and edit TCP/IP and Deci4p target providers. Each target provider is responsible for discovering and reporting targets of its specific type and their parameters. Each target provider is implemented as a MEF plugin that supports the ITargetProvider interface.
  • Use of TargetEnumerationService to enumerate available target providers. TargetEnumerationService combines all targets' information into a heterogeneous list view for displaying and editing. Currently it supports targets of type Deci4p and TCP/IP, although it is designed to easily support other target types in the future.

Run TargetManager

  1. Double-click the TargetManager.exe in \bin\wws_atf\Release.
  2. A dialog appears listing all targets.

Menu Options

  • File: choose Exit to exit TargetManager.
  • Edit:
    • Keyboard Shortcuts: use the Customize Keyboard Shortcuts window to set up keyboard shortcuts.
    • Load or Save Settings: use the Load and Save Settings window to save current TargetManager application settings or load application settings from a file.
    • Preferences: set application preferences, such as command icon size.
  • Window:
    • Tile Horizontal: automatically added by ATF; does nothing in this sample.
    • Tile Vertical: automatically added by ATF; does nothing in this sample.
    • Tile Overlapping: automatically added by ATF; does nothing in this sample.
    • Targets; check to display the Targets list control.
  • Help
    • About: display an information dialog.

How to Use TargetManager

Click on one of the Add New... buttons at the bottom of the dialog to add a target of that type. The buttons available depend on the computer's configuration, although you can always add a TCP/IP target. Once added, you can edit the Endpoint and Scope items for each connection.

TargetManager Modules

Modules perform these functions:

  • Program.cs: Contains the Main program. It creates a TypeCatalog listing the ATF classes used, which are instantiated using MEF. It uses TargetEnumerationService along with TcpIpTargetProvider and Deci4pTargetProvider, so no other modules are needed.

Topics in this section

Clone this wiki locally