[in] ViSession handle for the driver session.
SelectorStyleRepCap::ExpandSingleActiveSelector
Translates the active repeated capability selector into a single physical name.
Syntax
Section titled “Syntax”static ViStatus ExpandSingleActiveSelector(ViSession Vi, PhysicalName<T>& physicalName);Parameters
Section titled “Parameters”Vi
physicalName
[out] A PhysicalName object containing the physical name corresponding to the currently active selector for the repeated capability.
Return value
Section titled “Return value”Returns a VI_SUCCESS if the operation was successful or a failure ViStatus otherwise. If the currently active selector represents more than one physical name, then the error code IVIC_ERROR_BADLY_FORMED_SELECTOR is returned.
Remarks
Section titled “Remarks”If the currently active selector represents a virtual name, this function translates that virtual name to the corresponding physical name.
This function is useful in scenarios where an operation is only valid for a single repeated capability physical name. For example, attribute getters and functions that have output parameters can only return a single value, so the user can never invoke such operations on more than one repeated capability at a time. Thus, such operations must internally validate that only a single physical name is active when they are called. The ExpandSingleActiveSelector function is provided for this purpose.
Example
Section titled “Example”The following example demonstrates use of the ExpandSingleActiveSelector function.
ViStatus _VI_FUNC acme4321_ConfigureMeasurement(ViSession Vi, ViReal64 Frequency, ViReal64 Bandwidth){ // ...
PhysicalName<Channel> channel; auto status = Channel::ExpandSingleActiveSelector(Vi, channel); ReturnOnError(status);
// ...}