Contenu principal

getAvailableGPIOSources

R2026b

Query radio sources that can drive GPIO signals

Since R2026b

Description

sources = getAvailableGPIOSources(radio,bank) returns the radio sources sources that can drive the GPIO signals in the GPIO bank bank on the radio associated with the radio object radio.

Use this function to determine which radio sources are valid for a GPIO bank so that you can assign valid source mappings to configure automatic transmit/receive (ATR) behavior or manual GPIO control. To assign GPIO source mappings, use the setGPIOSource function.

example

Examples

collapse all

Query which radio sources can drive GPIO signals in a GPIO bank.

Create a radio object and select a GPIO bank.

radio = radioConfigurations("MyRadio");
banks = getGPIOBanks(radio);
gpioBank = banks(1);

Query the radio sources that can drive GPIO signals in the selected bank. The available sources depend on your radio model and the GPIO bank. This example shows results for a USRP N310 radio.

availableSources = getAvailableGPIOSources(radio,gpioBank)
availableSources = 5×1 string array
    "PS"
    "RF0"
    "RF1"
    "RF2"
    "RF3"

Input Arguments

collapse all

Radio object, specified as a radio object that corresponds to a radio setup configuration you saved using the Radio Setup wizard.

To create a radio object, call the radioConfigurations function with the name of your radio setup configuration. For example, for a radio setup configuration named MyRadio, call radio = radioConfigurations("MyRadio").

GPIO bank identifier, specified as a string scalar that identifies a GPIO bank on the radio.

To query the available GPIO bank identifiers on the radio, use the getGPIOBanks function.

Data Types: string

Output Arguments

collapse all

Available GPIO source list, returned as a string array. Each element in the array represents a radio source that can drive GPIO signals in the specified bank.

The set of available GPIO sources depends on both the radio and the selected GPIO bank. Different GPIO banks on the same radio can support different sets of radio sources.

Data Types: string

Version History

Introduced in R2026b