Open Lighting Architecture: ola::LinearBackoffPolicy Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ola::LinearBackoffPolicy Class Reference

## Detailed Description

A backoff policy which is: t = failed_attempts * duration For a duration of 1 and a max of 5 we'd produce: 0, 1, 2, 3, 4, 5, 5, 5, ...

Inheritance diagram for ola::LinearBackoffPolicy:

## Public Member Functions
| LinearBackoffPolicy (const TimeInterval &duration, const TimeInterval &max)
TimeInterval | BackOffTime (unsigned int failed_attempts) const
| Calculate the backoff time.

## Member Function Documentation

## ◆ BackOffTime()

TimeInterval ola::LinearBackoffPolicy::BackOffTime | ( | unsigned int | failed_attempts | ) | const
| inlinevirtual

Calculate the backoff time.

Parameters

  failed_attempts | is the number of unsuccessful connection attempts since the last successful connection.

Returns
  how long to wait before the next attempt

Implements ola::BackOffPolicy.

The documentation for this class was generated from the following file:

- include/ola/util/Backoff.h