Implements a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns cappedStatus if limit reached, otherwise returns result of child.
More...
|
| | Throttle (int limit, TimeSpan timeFrame, RunStatus limitStatus, Composite child) |
| | Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns cappedStatus if limit reached, otherwise returns result of child.
|
| | Throttle (TimeSpan timeFrame, Composite child) |
| | Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
|
| | Throttle (int Limit, TimeSpan timeFrame, Composite child) |
| | Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
|
| | Throttle (int Limit, int timeSeconds, Composite child) |
| | Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
|
| | Throttle (int timeSeconds, Composite child) |
| | Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
|
| | Throttle (Composite child) |
| | Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success to once per 250ms. Returns Failure if limit reached, otherwise returns result of child.
|
| override void | Start (object context) |
| override void | Stop (object context) |
|
| override IEnumerable< RunStatus > | Execute (object context) |
|
| TimeSpan | TimeFrame [get, set] |
| | time span that Limit child Successes can occur
|
| int | Limit [get, set] |
| | maximum number of child Successes that can occur within TimeFrame
|
Implements a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns cappedStatus if limit reached, otherwise returns result of child.
Created 10/28/2012.
◆ Throttle() [1/6]
| ff14bot.Behavior.Throttle.Throttle |
( |
int | limit, |
|
|
TimeSpan | timeFrame, |
|
|
RunStatus | limitStatus, |
|
|
Composite | child ) |
Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns cappedStatus if limit reached, otherwise returns result of child.
- Parameters
-
| limit | max number of occurrences |
| timeFrame | time span for occurrences |
| limitStatus | RunStatus to return when limit reached |
| child | composite children to tick (run) |
◆ Throttle() [2/6]
| ff14bot.Behavior.Throttle.Throttle |
( |
TimeSpan | timeFrame, |
|
|
Composite | child ) |
Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
- Parameters
-
| timeFrame | time span for occurrences |
| child | composite children to tick (run) |
◆ Throttle() [3/6]
| ff14bot.Behavior.Throttle.Throttle |
( |
int | Limit, |
|
|
TimeSpan | timeFrame, |
|
|
Composite | child ) |
Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
- Parameters
-
| Limit | max number of occurrences |
| timeFrame | time span for occurrences |
| child | composite children to tick (run) |
◆ Throttle() [4/6]
| ff14bot.Behavior.Throttle.Throttle |
( |
int | Limit, |
|
|
int | timeSeconds, |
|
|
Composite | child ) |
Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
- Parameters
-
| Limit | max number of occurrences |
| timeSeconds | time span for occurrences in seconds |
| child | composite children to tick (run) |
◆ Throttle() [5/6]
| ff14bot.Behavior.Throttle.Throttle |
( |
int | timeSeconds, |
|
|
Composite | child ) |
Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success within a given time span. Returns Failure if limit reached, otherwise returns result of child.
- Parameters
-
| timeSeconds | wait in seconds after child success before another attempt |
| child | composite children to tick (run) |
◆ Throttle() [6/6]
| ff14bot.Behavior.Throttle.Throttle |
( |
Composite | child | ) |
|
Creates a 'throttle' composite. This composite limits the number of times the child returns RunStatus.Success to once per 250ms. Returns Failure if limit reached, otherwise returns result of child.
- Parameters
-
| child | composite children to tick (run) |
◆ Execute()
| override IEnumerable< RunStatus > ff14bot.Behavior.Throttle.Execute |
( |
object | context | ) |
|
|
protected |
◆ Start()
| override void ff14bot.Behavior.Throttle.Start |
( |
object | context | ) |
|
◆ Stop()
| override void ff14bot.Behavior.Throttle.Stop |
( |
object | context | ) |
|
◆ Limit
| int ff14bot.Behavior.Throttle.Limit |
|
getset |
maximum number of child Successes that can occur within TimeFrame
◆ TimeFrame
| TimeSpan ff14bot.Behavior.Throttle.TimeFrame |
|
getset |
time span that Limit child Successes can occur