Is there a way to have a Sensor without a file for configuration? | Thales IoT Developer Community
July 16, 2015 - 5:19pm, 4129 views
Taking the BooleanSensor as an example, the documentation states that its required:
Creation of a BooleanSensorConfiguration class instance and the dedicated configuration file for permanent storing of the necessary parameters, additional cus-tom parameters can also be added.
ButtonSensorConfiguration always requires a file path on its constructor. Is there a way to circunvent this and pass the parameters using other method, like implementing (and somehow passing) a BooleanMonitorRules to the BooleanSensor?
Thanks!
Hello,
The file is mandatory. It is needed for preservation of parameter values (which can also be modified remotely from server) in case of power outage or stopping the application. You can of course pass the parameters from your code like in the SampleMidlet application but you must specify the path to the file.
Regards,
Bartłomiej
I understand why would you want to have a file. But I already have different parameters for other parts of the application; I'd like to have a single file for all parameters and I'd feed each sensor its own with a different set of parameter values.
Also, some things I'd like to change like the sensor descritpion is already passed as an interface (BooleanSensorDescription), why not go with an interface for both?
Interesting for a change request to let the customer implement his or her own parameter storing mechanism.
The idea was to provide the customer the ready to use mechanism that would require as low effort as possible to get the fully working solution and to ****** that the parameters configured remotely will always be available even after module reset, power outage or some application crash.