| xPC Target™ | ![]() |
MATLAB® command line
getxpcpci(target_object, 'type_of_boards') getxpcpci(target_object, 'verbose')
target_object | Variable name to reference the target object. |
type_of_boards | Values are no arguments, 'all', and 'supported'. |
verbose | Argument to include the base address register information in the PCI device display. |
The getxpcpci function displays, in the MATLAB window, which PCI boards are installed in the target PC. By default, getxpcpci displays this information for the target object, tg. If you have multiple target PCs in your system, you can call the getxpcpci function for a particular target object, target_object.
Only devices supported by driver blocks in the xPC Target™ block library are displayed. The information includes the PCI bus number, slot number, assigned IRQ number, manufacturer name, board name, device type, manufacturer PCI ID, base address, and the board PCI ID itself.
For a successful query:
The host-target communication link must be working. (The function xpctargetping must return success before you can use the function getxpcpci.)
Either a target application is loaded or the loader is active. The latter is used to query for resources assigned to a specific PCI device, which have to be provided to a driver block dialog box before the model build process.
The following example displays the installed PCI devices, not only the devices supported by the xPC Target block library. This includes graphics controllers, network cards, SCSI cards, and even devices that are part of the motherboard chip set (for example, PCI-to-PCI bridges).
getxpcpci('all')The following example displays a list of the currently supported PCI devices in the xPC Target block library, including subvendor and subdevice information.
getxpcpci('supported')The following example displays a list of the currently supported PCI devices in the xPC Target block library, including subvendor and subdevice information and base address register contents.
getxpcpci('verbose')When called with the 'supported' option, getxpcpci does not access the target PC.
To display the list of PCI devices installed on the target PC, tg1, first create a target object, tg1, for that target PC. Then, call getxpcpci with the 'all' option. For example:
tg1=xpctarget.xpc('RS232','COM1','115200')
getxpcpci(tg1, 'all')To return the result of a getxpcpci query in the struct pcidevs instead of displaying it, assign the function to pcidevs. The struct pcidevs is an array with one element for each detected PCI device. Each element combines the information by a set of field names. The struct contains more information compared to the displayed list. Its contents vary according to the options you specify for the function.
pcidevs = getxpcpci
![]() | getxpcenv | Item (env collection object) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |