Development Notes DHD20150827 Restructuring ============= Mainly driven by by the IoT Launchpad project, the OpenTRV board code (firmware) is currently being heavily refactored to improve separation of concerns and ease of deployment for different purposes by experienced (and hobby/maker) users. The main part of this is to push the entire core run-time down to a library to keep clutter out of the 'main' code that a user needs to deploy an application. This is currently the OTRadioLink library but note two things: 1) It is going to be renamed something like OTV0P2BaseCombo soon. 2) It contains a stack of sub-libraries that could be built independently, at least nominally, but are welded together into this 'combo' lib to try to minimise 'dependency hell', especially for less advanced uses. Most uses should need only this combo library and some application/sketch code. Very specialised functionality, not used in the vast majority of targets, but still worthy of distribution for optional use by anyone, will be put into separate libraries such as with OTProtocolCC. (OpenTRV-supporting Arduino libraries will have an "OT" prefix.) So, for example, the OpenTRV valve should use the OTV0P2BaseCombo library, plus probably a valve drive + FS20 protocol library, the COHEAT application that we are using as a proxy for the EnergyDeck deployment environment would need those plus the OTProtocolCC library, and a typical Launchpad sensor deployment may require some extra specialist sensor driver libraries. Stuff that needs doing ====================== Here is a grab-bag of things that need doing soon (next few weeks ideally): * Understand and fix the unit-test failure in the mainline code. * Fix REV9 reset problems (CLI/Serial/IDLE are potential villains). * Finish first full cut of OTV0P2BaseCombo library, and improve impl eg wrap up RND8 as a class and only expose reset on a separate instance for unit testing, not available at run time for system PRNG. * Create valve-control and FS20/FHT8V library (and wrap existing code up in sensible non-spaghetti classes, and avoid random static data, eg to support multiple FS20 valves at once.) * AES-GCM stuff and providing security where the bearer doesn't, at least to a preliminary level, and getting code size << 8kB, with LOTS of test cases for correctness. Possibly rebased on https://github.com/kokke/tiny-AES128-C impl. * Multi-DS18B20 support, eg up to 4 in a string, with stats maybe sent as an integer array in JSON for example. * Support for D21SM run-time discovery and possible reporting of attached sensors and actuators, possibly queryable via concentrator. * Possible provision of tiny programmable interpreter add-on to CLI to manage modular sensors. * Get CI (Continuous Integration) servers working, firstly for Java code then for Arduino software libs and mainline emulated and/or on real boards. There is a bunch of radio/comms stuff to be done also: * Extension of OTRadioLink (and derived classes) to provide at compile- and/or run- time info on direct support for ID, sequence numbering and security (eg auth/enc), so that for example the JSON stats generator can automatically provide ID and seq if the bearer difference, and software AES-GCM support can be omitted if the bearer is good enough. * Support for other radio implementations for Launchpad, GSM and LoRa. (To be derived from OTRadioLink.) * Further work on radio/RFM23B stuff such as TX power control. * Support for RFM69CW module for REV7 and new boards. (To be derived from OTRadioLink.) * Support for faster/better carriers, etc, on RFM23B and RFM69CW.