command void reset();
/* Submit a value to the averager, to be averaged into the next average. */
- command void submit(val_t);
+ command void submit(val_t value);
- /* Submit a null value to the averager. Each null submitted counts as one
- * of the expected values for calculating the average. Each null submitted
- * reduces the divisor for the subsequent average by one.
+ /* Return the number of values submitted since the last
+ * <code>reset()</code> or <code>average()</code>.
*/
- command void null();
+ command uint16_t count();
- /* Signalled after the expected number of samples + nulls have been delivered
- * and their set have been used to calculate a new average.
+ /* Ask for the average of the values submitted since the last
+ * <code>reset()</code> or <code>average()</code>. <code>average()</code>
+ * also performs a <code>reset()</code>.
*/
- event void average(val_t);
+ command val_t average();
}