[in] ViSession handle for the driver session.
PhysicalName::ParentList
Returns a PhysicalNameList containing the PhysicalName objects for all repeated capabilities defined on the parent instance.
Syntax
Section titled “Syntax”const PhysicalNameList<TRepCap>& ParentList(ViSession Vi) const;Parameters
Section titled “Parameters”Vi
Return value
Section titled “Return value”Returns a PhysicalNameList containing the PhysicalName objects for all repeated capabilities defined on the parent instance.
Remarks
Section titled “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
Section titled “Example”The following example demonstrates use of the ParentList function.
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 //}