Click or drag to resize

ParameterStyleRepCap::GetPhysicalNames

Returns the PhysicalNameList containing all of the PhysicalName objects currently defined for the repeated capability.

static const PhysicalNameList<T>& GetPhysicalNames(ViSession Vi);

static const PhysicalNameList<T>& GetPhysicalNames(ViSession Vi, const PhysicalName<TParent>& parentPhysicalName);
Parameters
Vi

[in] ViSession handle for the driver session.

parentPhysicalName

[in] The physical name of the parent repeated capability. This parameter is only available in the overload for nested repeated capabilities.

Return Value

The PhysicalNameList containing all of the PhysicalName objects currently defined for the repeated capability.

Remarks

Only one of the above overloads will be available for a particular repeated capability. The first overload (without the parentPhysicalName parameter) will be available for non-nested repeated capabilities, while the second overload must be used for nested repeated capabilities.

Example

The following example demonstrates use of the GetPhysicalNames function.

C++
ViStatus _VI_FUNC acme4321_ConfigureArmCount(ViSession Vi, ViConstString RepCapIdentifier, ViInt32 ArmCount)
{
    // Assume a Trace repeated capability is defined as a child of a Channel repeated capability and has the 
    // following physical names defined in the following order.
    // 
    //     "C1:T1"
    //     "C1:T2"
    //     "C1:T3"
    //     "C2:T1"
    //     "C2:T2"
    //     "C2:T3"
    //     "C3:T1"
    //     "C3:T2"
    //     "C3:T3"
    // 

    auto channels = Channel::GetPhysicalNames(Vi);

    for (const auto& channel : channels)
    {
        cout << channel.FullName();
    }

    // The above loop prints the following:
    // 
    //    C1
    //    C2
    //    C3
    // 

    auto traces = Trace::GetPhysicalNames(Vi, "C2");

    for (const auto& trace : traces)
    {
        cout << trace.FullName();
    }

    // The above loop prints the following:
    // 
    //    C2:T1
    //    C2:T2
    //    C2:T3
    // 
}

Download a complete CHM version of this documentation here.