mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
1.1 KiB
1.1 KiB
Naming a module
UPM attemps to follow a clear naming pattern. Modules should be sensibly named and then placed in ${libdir}/upm and headers in ${includedir}/upm, all modules should be prefixed with libupm-. The upm_module_init will automatically name python UPM modules as pyupm_ and javascript modules as jsupm_. For example for src/grove/ the library built will be libupm-grove.so, the python module pyupm_grove and the js module jsupm_grove.
Choosing a name for a new module
- Pick a name, typically the chip name is the most sensible
- Use it & stick to it
Rules for name picking
- Your lib must belong to the UPM namespace
- Usually picking the name of the chip of your sensor/actuator makes sense. Other times this does not. Try to pick a generic name so people with a similar sensor can inherit your class if they only have minor changes.
- Avoid brand names, often your module can be very generic with little effort
Doubt
If ever, give me a ping via email: brendan.le.foll@intel.com and I'll try suggest decent names for your module.