# RefreshMode enumeration
{: .no_toc }

Says how often the data of a collector changes. A collector returns one member from its [**RefreshMode**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/IDiagnosticCollector.md#refreshmode) property, and [**RunByRefreshMode**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/DiagnosticEngine.md#runbyrefreshmode) runs the collectors that return one member. The enumeration is declared in a module of the package, **RefreshModeModule**, which has no page of its own; the members are written with the name of the enumeration, as in `RefreshMode.Static`.

```tb check_build check_run
Dim c As IDiagnosticCollector
Set c = New DiskInfoCollector

Select Case c.RefreshMode
    Case RefreshMode.Static
        Debug.Print "collected once"
    Case RefreshMode.Dynamic
        Debug.Print "changes all the time"
    Case RefreshMode.SemiDynamic
        Debug.Print "changes slowly"
End Select
Debug.Print CLng(RefreshMode.Static) & " " & CLng(RefreshMode.Dynamic) & " " & CLng(RefreshMode.SemiDynamic)
' Output:
' changes slowly
' 0 1 2
```

| Member | Value | Meaning |
|:-------|------:|:--------|
| **Static** | 0 | The data does not change while the program runs, such as the version of the operating system or the model of the processor. |
| **Dynamic** | 1 | The data changes all the time and is read again for each report, such as the load of the processor or the memory in use. |
| **SemiDynamic** | 2 | The data changes slowly, such as the free space of a disk or the network configuration. A program reads it again when it wants to. |

The mode is a label. The package does not keep the result of a **Static** collector or skip it in a later run, and it does not schedule anything: [**RunAll**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/DiagnosticEngine.md#runall) runs every collector each time it is called. A program that reads the **Static** data once and the **Dynamic** data every second calls **RunByRefreshMode** for each mode, or keeps the results of the first call itself.

The collectors of the package have these modes:

| Mode | Collectors |
|:-----|:-----------|
| **Static** | [**OSInfoCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#osinfocollector), [**CPUInfoCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#cpuinfocollector), [**LocaleCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#localecollector), [**EnvironmentCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#environmentcollector), [**RuntimesCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#runtimescollector) |
| **Dynamic** | [**CPULoadCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#cpuloadcollector), [**MemoryInfoCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#memoryinfocollector), [**UptimeCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#uptimecollector), [**ProcessInfoCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#processinfocollector) |
| **SemiDynamic** | [**DiskInfoCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#diskinfocollector), [**NetworkInfoCollector**](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md#networkinfocollector) |

## See Also

- [IDiagnosticCollector](/tB/Packages/Contributed/TBMANLIB_Diagnostic/IDiagnosticCollector.md) interface -- the **RefreshMode** property
- [DiagnosticEngine](/tB/Packages/Contributed/TBMANLIB_Diagnostic/DiagnosticEngine.md) class -- **RunByRefreshMode**
- [Collectors](/tB/Packages/Contributed/TBMANLIB_Diagnostic/Collectors.md) -- the mode of each collector of the package
