LJM constants files and related tools.
The LabJack/LJM/ directory is installed for all LJM installations. Of the files contained in it, the most important is ljm_constants.json, which describes the "Modbus map" of all devices LJM supports. This Modbus map describes device registers by name, address, data type, description, etc.
For a web app version of ljm_constants.json, see LabJack's Modbus Map, which is part of the ljsimpleregisterlookup project. ljsimpleregisterlookup also produces ljscribe's automated documentation, which is interleaved throughout the T-series Datasheet.
generate_c_header.py outputs generated content to gen_output/. Currently, it's a C header file which contains a constants version of ljm_constants.json. Test code for gen_output/ is in gen_test/.
Non-LabJack employees: Since in ljm_constant.json is used to generate T-series Datasheet documentation and the Modbus Map lookup tool, changes in ljm_constant.json are considered sensitive. It's easy to write a description that will confuse or mislead. For that reason, contributors not lucky enough to work at LabJack are encouraged to submit Issues instead of directly submitting Pull Requests. LabJack employees will vet Issues carefully.
LabJack employees: LabJack employees should get themselves added to LabJack's GitHub organization first. Then:
- Navigate to ljm_constants.json on GitHub
- Hit the edit button to begin editing. (This is a pencil icon, as of writing.)
- Make your changes in the browser window.
- Scroll to the bottom of the page to make a commit message.
- Create a new branch. (Don't commit directly to the
master
branch, please.) - Commit changes.
- Submit a pull request.
- Wait for the pull request to be addressed. Or bug someone to address it sooner.
Code contributions not related to ljm_constants.json should follow conventions as set forth in ljmmm.py. Code should have reasonable tests.