-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
114ef5b
commit 6c1f749
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# .namedminmax | ||
NamedMinMax generates some statistics from several named dataset (instead of only one as [MinMax](MinMax.md) is doing). | ||
|
||
## Syntax | ||
|
||
NamedMinMax are basically **[Lua tasks](Task(lua).md)** and are following the same syntax. | ||
|
||
In the header of the script (comment block at the very beginning of the script), each line starting with `-->>` are Majordome's commands.<br> | ||
Consequently, `--->>` are commented out commands (notice the 3 dashes). | ||
|
||
## Directives | ||
|
||
### Generals | ||
|
||
#### -->> name= | ||
Unique name to identify the NamedMinMax. If not set, uses the filename. | ||
`-->> name=toto` | ||
#### -->> quiet | ||
Remove some trace. This option is useful to avoid logging of very noisy topics. | ||
|
||
#### -->> disabled | ||
This NamedMinMax starts as disabled : stats change and incoming messages are ignored. | ||
|
||
### NamedMinMax owns | ||
None | ||
|
||
### Exposed variables | ||
- **MAJORDOME_Myself** is automatically created and correspond to the current NamedMinMax | ||
- **MAJORDOME_NAMEDMINMAX** - NamedMinMax's name | ||
|
||
## at Lua side | ||
### Exposed objects | ||
Statistics sequencing and retrieving are done through the **MajordomeNamedMinMax**'s API : | ||
- `getContainer()` returns the container (directory) in which this NamedMinMax has been defined | ||
- `getName()` returns NamedMinMax's name | ||
- `isEnabled()` returns a boolean reflecting if this NamedMinMax is enabled or not | ||
- `Enable()` to enable this NamedMinMax | ||
- `Disable()` to disable this NamedMinMax | ||
- `Clear(name)` or `Reset(name)` to reset data statistics : a new collection is starting (only impacting the one the name is provided) | ||
- `getMin(name)`, `getMax(name)`, `getAverage(name)` : some statistics | ||
- `getSum(name)` : sum of all incoming data since last `Reset()` | ||
- `getSamplesNumber(name)` : number of samples received since last `Reset()` | ||
- `FiguresNames()` : return all figures name's |