Click or drag to resize

PhysicalName::ParentList

Returns a PhysicalNameList containing the PhysicalName objects for all repeated capabilities defined on the parent instance.

const PhysicalNameList<TRepCap>& ParentList(ViSession Vi) const;
Parameters
Vi

[in] ViSession handle for the driver session.

Return Value

Returns a PhysicalNameList containing the PhysicalName objects for all repeated capabilities defined on the parent instance.

Remarks

For nested repeated capabilities, each child instance exists in a list maintained on the parent instance. The ParentList function returns that list, which contains the current physical name and all of its "sibling" physical names.

Example

The following example demonstrates use of the ParentList function.

C++
ViStatus _VI_FUNC acme4321_ConfigureArmCount(ViSession Vi, ViConstString RepCapIdentifier, ViInt32 ArmCount)
{
    // The Trace repeated capability is a child repeated capability of a Channel repeated capability.
    // 
    // Assume the following repeated capability physical names are defined in the following order for the Trace repeated capability:
    // 
    //     "C1:T1"
    //     "C1:T2"
    //     "C1:T3"
    //     "C2:T1"
    //     "C2:T2"
    //     "C2:T3" 
    // 
    PhysicalName<Trace> trace("C2:T3");

    for (auto& it : trace.ParentList(Vi)
    {
        cout << it.FullName();
    }

    // Prints the following:
    // 
    //    C2:T1
    //    C2:T2
    //    C2:T3
    // 
}

Download a complete CHM version of this documentation here.