Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

Feature/reporter #36

Merged
merged 8 commits into from
Jan 28, 2015
Merged

Feature/reporter #36

merged 8 commits into from
Jan 28, 2015

Conversation

huertas
Copy link
Contributor

@huertas huertas commented Jan 6, 2015

No description provided.

remove reporter supervisor and ReporterChild classes and place aggregating function in MonitorChild class
@huertas huertas modified the milestone: 3.0 Jan 6, 2015
@huertas huertas self-assigned this Jan 6, 2015
* @param device: device targeted.
* @param tick: tick origin.
*/
case class AggPowerReport(topic: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to differentiate PowerReport and AggPowerReport ? Can't we rather use a PowerReport extended with a traitAggregateReport[PowerReport] which provides the details of aggregated values?

Remove the AggPowerChannel, the PowerChannel manage aggregated PowerReport system instead of the AggPowerChannel now
* Wait to retrieve power reports of all targets from a same monitor to aggregate them
* into once power report.
*/
def aggregate(aggPowerReport: PowerReport, powerReport: PowerReport): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we don't use the abstract type as a type parameter?

AggregatedReport base trait is used to differentiate between simple power report and aggregated power report but always keep the same PowerReport type
use a class (Power.scala) instead of a double to represent power value. You can use this expression for exemple : 1.W to create a power
refactor: some other improvements are applied to aggregation system
add a file reporter
add a jfreechart reporter

def receive: PartialFunction[Any, Unit] = LoggingReceive {
case MonitorStart(_, id, freq, targs) if muid == id && frequency == freq && targets == targs => start()
case MonitorStart(_, id, freq, targs, agg) if muid == id && frequency == freq && targets == targs && aggFunction == agg => start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to compare the aggregate functions?

add several string interpolation
add toString() function within PowerReport instead of the toString() function in reporters
chore(README): update README
@@ -17,6 +17,8 @@ We all stand on the shoulders of giants and get by with a little help from our f
* [Akka](http://akka.io) (version 2.3.6 under [Apache 2 license](http://www.apache.org/licenses/LICENSE-2.0)), for asynchronous processing
* [Typesage Config](https://github.com/typesafehub/config) (version 1.2.1 under [Apache 2 license](http://www.apache.org/licenses/LICENSE-2.0)), for reading configuration files.
* [Apache log4j2](http://logging.apache.org/log4j/2.x/) (version 2.1 under [Apache 2 license](http://www.apache.org/licenses/LICENSE-2.0)), for logging outside actors.
* [JFreeChart](http://www.jfree.org/jfreechart/) (version 1.0.19 under [LGPL license](https://www.gnu.org/licenses/lgpl.html)), for creation of interactive and animated charts.
* [Scala IO](http://jesseeichar.github.io/scala-io-doc/0.4.3/index.html#!/overview) (version 0.4.3), for an extensions of IO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(version 0.4.3 under [BSD-2-Clause license](http://www.scala-lang.org/license.html))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it's a BSD-3-Clause license

@mcolmant mcolmant merged commit 232b3e8 into develop Jan 28, 2015
@mcolmant mcolmant deleted the feature/reporter branch January 28, 2015 16:21
@mcolmant
Copy link
Contributor

close #33

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants