TimeoutOptions Class
This class provides timeout options. The AntCollection class uses the options pattern and
propagates a timeout to
AntDevices that are instantiated by AntCollection.
Namespace: SmallEarthTech.AntPlusAssembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.2+4dd3b18a61cb7a7c9070bf010b9a118f4696f0c4
public sealed class TimeoutOptions
Public NotInheritable Class TimeoutOptions
public ref class TimeoutOptions sealed
[<SealedAttribute>]
type TimeoutOptions = class end
- Inheritance
- Object TimeoutOptions
The application host builder retrieves configuration options from various sources such as the command line or
appsettings.json. If the configuration can't find TimeoutOptions, the collection will default to
MissedMessages.
If both
Timeout and
MissedMessages are defined, Timeout is ignored and MissedMessages is used.
Prefer MissedMessages as this will scale the ANT device timeout based on the specific data broadcast rate of an ANT device.
Asset trackers broadcast 16 times a second and Geocaches broadcast once every 2 seconds. Other devices typically
broadcast 4 times a second.
For example, your appsettings.json file would have this entry -
{
"TimeoutOptions": {
"MissedMessages": 8,
"Timeout": null
}
}
The command line could define the timeout "--TimeoutOptions:MissedMessages=8".
Timeouts can be disabled by setting Timeout to -1 and ignoring or setting MissedMessages to null.
| MissedMessages |
Gets or sets the number of missed messages before an ANT device goes offline.
|
| Timeout |
Gets or sets the timeout before an ANT device goes offline.
|