ismb / jemma

Java-based Energy Monitoring and Management Application
GNU Lesser General Public License v3.0
40 stars 36 forks source link

FlexGatewayButtons to be separated as optional bundle or fragment ? #196

Closed riccardo closed 9 years ago

riccardo commented 9 years ago

Feedback by Roberto Pierpaoli (on JEMMA ML)

During the execution I have noticed the following error messages logged:

  1. [org.energy_home.jemma.ah.io.flexgateway.FlexGatewayButtons] : Exception on Run java.io.FileNotFoundException: /dev/input/event0 (Permesso negato) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at org.energy_home.jemma.ah.io.flexgateway.FlexGatewayButtons.run(FlexGatewayButtons.java:79) at java.lang.Thread.run(Thread.java:745) I think this one is because I'm not using the FlexGateway, but only the key.

I guess (but not sure) that the that code should me moved to a specific FlexGateway-only bundle (or maybe a Fragment ?).

nport commented 9 years ago

The purpose of this bundle is to provide 'visual' and 'audible' feedbacks to the user. It contains also some code for getting the status of some buttons. It listen for several OSGi events generated by the jemma bundles and then, accoring to a state machine, drives the hardware to provide these feedbacks. For this reason it is platform dependent and the current sourcecode available on GitHub works fine only on the FlexGateway.

riccardo commented 9 years ago

Thanks Nicola: I just modified the related README file so it's more clear that this is an optional bundle.

nport commented 9 years ago

Hi Riccardo,

I would change the description in this way:

This bundle implements a state machine to properly drive FlexGateway's buzzer and leds according to the events coming from other JEMMA bundles. Moreover it detects the status of the buttons available on the FlexGateway. Therefore it is optional and it make sense to install it when JEMMA is deployed on FlexGateway devices (see ... link to the web page where you describe the FG)."

Of course it would be great to provide the detailed documentation about the events generated by the other bundles that are used in this one and about the state machine.