Click or drag to resize

CacheEntry::SetValid

Sets the valid state of a cache entry to true.

void SetValid();
Example

The following example demonstrates use of the SetValid function.

C++
ViStatus _VI_FUNC acme4321_Configure(ViSession Vi, ViReal64 Bandwidth, ViReal64 Gain)
{
    auto status = viPrintf(GetVisaSession(Vi), "CONFIG:BAND %0.15g;CONFIG:GAIN %0.15g\n", Bandwidth, Gain);
    ReturnOnError(status);

    // Retrieve the cache entry for the Bandwidth attribute
    // 
    auto entry = GetCacheEntry<ViReal64>(Vi, ACME4321_ATTR_BANDWIDTH);

    entry.SetValid();

    return status;
}

Download a complete CHM version of this documentation here.