diff --git a/docs/fpp-spec.html b/docs/fpp-spec.html index b650dfd21..deee2bdcb 100644 --- a/docs/fpp-spec.html +++ b/docs/fpp-spec.html @@ -6020,8 +6020,7 @@ product container Container2 default priority 10 ] format string-literal [ -throttle expression -[ every expression ] +throttle throttle ]

@@ -6052,6 +6051,15 @@ product container Container2 default priority 10
+
+

throttle is defined as follows:

+
+
+

expression +[ +every expression +]

+

7.5.2. Semantics

@@ -6088,29 +6096,49 @@ parameters. A numeric format is allowed for any argument whose type is a numeric type.

  • -

    The optional expression e following throttle specifies the maximum number -of times to emit the event before throttling it. -The type of e must be convertible to -Integer and must evaluate to an integer -in the range [0,231).

    -
  • -
  • -

    The optional expression e following every specifies the maximum time period -to elapse before clearing the event throttle. e must satisfy the following -rules:

    +

    The optional throttle syntax is for throttling events. +It has the following meaning:

    • -

      Convertible to the anonymous struct type {seconds: U32, useconds: U32}

      +

      The expression e following throttle specifies the maximum throttle +count. +The type of e must be convertible to +Integer and must evaluate to an integer +in the range \$[0, 2^31)\$. +When the FSW asks the framework to emit events, a throttle count +starts at zero and goes up by one with each event emitted. +When the throttle count equals the maximum throttle count, no more events +are emitted until the throttle count is reset.

    • -

      seconds must evaluate to an integer in the range [0,231)

      +

      The optional expression e following every specifies the throttle +period. +e must satisfy the following rules:

      +
      +
        +
      • +

        The type of e must be convertible to the +anonymous struct type T = { seconds: U32, useconds: U32 }.

      • -

        useconds must evaluate to an integer in the range [0,106)

        +

        After conversion to T, e must evaluate to an +anonymous struct value +{ seconds = s :U32, useconds = u :U32 }.

      • -

        seconds + useconds must be greater than zero

        +

        s must be in the range \$[0, 2^31)\$, u must be in the range +\$[0,10^6)\$, and \$s + u\$ must be greater than zero.

        +
      • +
      +
      +
      +

      If a throttle period \$p\$ is specified, and the throttle count +goes from zero to nonzero at time \$t\$, then the throttle count is +automatically reset to zero at time \$t + p\$. +If no throttle period is specified, then the throttle count must be +reset in some other way (typically this is done by command).

      +
    @@ -11853,7 +11881,7 @@ equivalent.

  • diff --git a/docs/fpp-users-guide.html b/docs/fpp-users-guide.html index e18d524c8..d5828e2df 100644 --- a/docs/fpp-users-guide.html +++ b/docs/fpp-users-guide.html @@ -15700,7 +15700,7 @@ serialized according to its diff --git a/docs/index.html b/docs/index.html index 949fcaa1f..11deeafad 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - + F Prime Prime (FPP)