CacheEntry::Invalidate |
Invalidates a cache entry so that the next set or get operation results in communication with the instrument.
void Invalidate();
The following example demonstrates use of the Invalidate function.
ViStatus _VI_FUNC acme4321_set_FREQUENCY(ViSession Vi, ViConstString RepCapIdentifier, ViReal64 AttributeValue)
{
auto status = VI_SUCCESS;
// We want to couple the frequency to the bandwidth, so we must invalidate the cached bandwidth
// whenever the frequency changes.
//
// Retrieve the cache entry for the Bandwidth attribute
//
auto entry = GetCacheEntry<ViReal64>(Vi, ACME4321_ATTR_BANDWIDTH);
// Invalidate the entry
//
entry.Invalidate();
return status;
}