Skip to content

Training ‐ 3. Driver Development: Creating Driver Framework and Adding to Build

Michael Elmore edited this page Nov 14, 2023 · 3 revisions

Requirements

  • Java Programming Language: Entry Level Experience
  • Lab 2 complete

Create Sensor Module from sensorhub-driver-template

Copy Driver Template

  • Right-click and copy sensorhub-driver-template

step1

Paste Template Back Into Sensors Directory

  • Right-click the sensors folder and paste

step2

Name Module

Assign a new name, in this case, sensorhub-driver-simulation

step3

Successfully Created Module

step4

Updating Package Name

Refactor Package Name

  1. Navigate to the driver package and right-click on the package
  2. Select Rename

step5

Change Package Name

  1. Provide a new name; in this case, simulated
  2. Select Refactor

step6

Refactored Package Name

step7

Updating Driver Build Scripts

Editing Driver build.gradle

Open sensorhub-driver-simulation/build.gradle

step8

Update Driver Name

Edit description: This field contains the name that will be assigned to your driver and is visible in OpenSensorHub

“Simulated Sensor Driver”

step9

Update Driver Description

Edit ext.details: This field contains the description assigned to your driver and is visible in OpenSensorHub

“Driver Simulation - OpenSensorHub Driver Development Labs”

step10

Update Manifest Details

Edit the Details within the ext.pom block

id – nickaname, e-mail, etc
name – self-explanatory
organization – company name
organizationUrl – self-explanatory

step11

Adding sensor-driver-simulation to Build Target

Updating and Building

Clone this wiki locally