[in] ViSession handle for the driver session.
GetCacheEntry Function
Retrieves a CacheEntry structure for the specified attribute on the specific repeated capability physical name.
Syntax
Section titled “Syntax”template <typename T>CacheEntry<T>& GetCacheEntry(ViSession Vi, ViAttr attributeId, const std::string& strQualifiedPhysicalName = std::string());Parameters
Section titled “Parameters”Vi
attributeId
[in] The attribute ID of the cache entry to retrieve (e.g. ACME4321_ATTR_BANDWIDTH).
strQualifiedPhysicalName
[in] The qualified repeated capability physical name of the cache entry to retrieve for the specified attribute (e.g. Channel!!CH1). This parameter should be specified for attributes associated with a repeated capability. Note that the qualified physical name must always be used, even if the repeated capability associated with the attribute has not been configured to use qualified physical names via the Driver Settings Editor.
Return value
Section titled “Return value”The cache entry associated with the specified attribute ID and repeated capability physical name.
Remarks
Section titled “Remarks”This function is used in scenarios where the driver developer wishes to take direct control over the state caching functionality of the driver for specific attributes.
Example
Section titled “Example”The following example demonstrates use of the GetCacheEntry function.
ViStatus _VI_FUNC acme4321_Configure(ViSession Vi, ViReal64 Frequency, ViReal64 Gain){ auto status = VI_SUCCESS;
// Retrieve the cache entry for the Bandwidth attribute // auto& entry = GetCacheEntry<ViReal64>(Vi, ACME4321_ATTR_BANDWIDTH);
if (entry.IsValid()) { // ... }
return status;}