Timeout Options Class
This class provides timeout options. The AntCollection class uses the options pattern and
propagates a timeout to AntDevices that are instantiated by AntCollection.
Definition
Namespace: SmallEarthTech.AntPlus
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
C#
public sealed class TimeoutOptionsVB
Public NotInheritable Class TimeoutOptionsC++
public ref class TimeoutOptions sealedF#
[<SealedAttribute>]
type TimeoutOptions = class end- Inheritance
- Object TimeoutOptions
Remarks
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.
The command line could define the timeout "--TimeoutOptions:MissedMessages=8".
For example, your appsettings.json file would have this entry -
json
{
"TimeoutOptions": {
"MissedMessages": 8,
"Timeout": null
}
}Timeouts can be disabled by setting Timeout to -1 and ignoring or setting MissedMessages to null.
Constructors
| TimeoutOptions | Initializes a new instance of the TimeoutOptions class |
Properties
| 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. |
Methods
| Equals | (Inherited from Object) |
| GetHashCode | (Inherited from Object) |
| GetType | (Inherited from Object) |
| ToString | (Inherited from Object) |