This module holds a set of regular expressions to help with lexing the iperf input.
The ExpressionBase is an Abstract Base Class that provides a logger for children and requires that they implement an expression property.
| ExpressionBase() | An Abstract Base class for regular expression containers |
This is a concrete implementation of the ExpressionBase.
| HumanExpression() | The Human Expression matches the human-readable iperf output |
The expression is composed of parts from Oatbran so I will not re-define the base components. The following is an approximation of the expression (all the parts that are in all-capital letters are from oatbran, as are the number classes which are used because the latex output is not that easy to read in sphinx):
![threads &\gets L\_BRACKET + OPTIONAL\_SPACES + \mathbb{Z} + R\_BRACKET\\
interval &\gets \mathbb{R} + OPTIONAL\_SPACES + DASH + \mathbb{R} + SPACES + `sec'\\
transfer &\gets \mathbb{R} + SPACES + [`GKM'] + ? + `Bytes'\\
bandwidth &\gets \mathbb{R} + SPACES + [`GKM'] + ? + (`bits'| `bytes') + `/sec'\\
expression &\gets threads + SPACES + interval + SPACES + transfer + SPACES + bandwidth\\](_images/math/4525337e92e9fce39fd0582e59150eec26f71415.png)
The CSVExpression matches csv-output format (-y c).
| CsvExpression() | The Csv Expression holds the expression to match iperf’s csv format |
As with the above, the main regular expressions are defined in the oatbran module and the following is just a rough approximation of the regular expression used:

This does not look like it was actually implemented. I think it was a stillborn idea.