ES Libraries Documentation

Online documentation:
Home
What Sensor Data?
Collecting Sensor Data
Formatting Sensor Data
Store/Transfer Data
Research
Contributing
Project Github Page

Contributing Code

There are a number of steps that you need to take to add to these open-source libraries. First, review Github's guide to contributing to an open-source project.

Adding a Sensor

To add a new sensor, you need to edit the SensorManager and SensorDataManager libraries. To implement your sensor, you'll need to:

  1. Decide whether your sensor is best implemented as a push (AbstractPushSensor), pull (AbstractPullSensor), or environment (AbstractEnvironmentSensor) sensor. This will determine where your code will be implemented and what AbstractSensor type it will inherit from.
  2. Implement the data structure that will store your sensor's data, in the data package. Implement a processor that creates an instance of your sensor's data in the process package.
  3. Implement a default configuration for your sensor in the config package. You will also need to add an entry to getDefaultConfig() in SensorConfig.
  4. The ES Sensor Manager needs to be able to find your sensor. Add an int SENSOR_TYPE and String SENSOR_NAME to SensorUtils. Add an entry for your sensor in SensorEnum.
  5. Add a data formatter to convert your sensor data instance into JSON in the data manager data formatter package.
  6. The data formatter needs to be able to find your formatter. Add an entry in getJSONFormatter() in DataFormatter.java.
  7. Test your sensor. You may want to modify and use the Demo App.
  8. Update the sensors documentation.