The development of the Sentinel Gas Detection Instrument’s Software
A case study about the development of embedded software for a gas detection instrument for Schauenburg Systems.
Schauenburg Systems (www.schauenburg.co.za) supplies safety equipment for the mining industry. Their MIMACS (Mine-Wide Integrated Monitoring and Control System) system provides real-time monitoring and control of mining operations to warn of possible safety conditions and prevent life threatening conditions. Sentinel GDI is part of the MIMACS system. Parsec was tasked with the development of the instrument. Sentinel GDI meets the SANS 1515 standard, as adopted by the SABS, which is required by the mining industry.
Sentinel GDI collects data from up to four on-board gas sensors. The concentration values are shown on a built-in screen. If any gas concentration value is not within the defined safety range for that gas, various alarm indications are activated to alert the operator of the hazard. All gas concentration values are continuously logged to internal non-volatile memory, providing a history of gas exposure. A wireless communication link provides communications to the Sentinel GDI.
The objective for Parsec was to develop and certify the Sentinel GDI in as short a time frame as possible, ensure a design with maximum flexibility and provide for future functional requirements.
The OpenUP (Open Unified Process, http://epf.eclipse.org/wikis/openup/) design philosophy was used to design the Sentinel GDI software. The requirements were captured using the Unified Modelling Language (UML). The captured requirements defined the major functionality required by Schauenburg at the start of development. It provided a clear guide of what was to be developed, and how the final product was to be tested. A rough estimate of the required development effort can also be given.
The requirements guided the architecture design of the system. A sound architecture minimises inter-dependency between system functional components, and allows for additional requirements to be added later without major re-design.
This approach ensured that an instrument with basic functionality was delivered in a very short time frame. Additional functionality was added in weekly/bi-weekly releases after the initial basic release. (Agile software development methodology). The testing effort was also done incrementally – testing the added functionality as it was released. And since the architecture minimised interdependency, regression testing effort was minimised. Having smaller incremental releases also ensured that Sentinel was quickly adapted to different logistical and operational environments in the mining industry.
The phased approach of the software releases required an efficient method of upgrading the Sentinel GDI’s software. It also implies that new functionality will be added to the initial software, which may have a detrimental effect on maintainability and stability of the instrument later.
The Sentinel GDI must allow for various real-time configuration options without re-programming of the software.
Embedded processors have limited internal ROM and RAM memory available.
Minimise life-cycle cost of Sentinel GDI.
The use of object-orientated design principles and tools with a sound extensible system architecture was critical to allow future requirements to be accommodated. The system architecture also has a significant impact on cost during the maintenance and support phases of the product. A layered architecture was used to isolate the domain layer objects from the interface/display layer objects. Since the display layer is prone to changes, this division already proved invaluable – changes required in the display layer had no impact on the domain layer. And changing of the flash log files had no impact on the display layer for example. Assigning responsibilities to classes in the different layers allows for clean maintainable code. Responsibilities are documented during the design stage. The design was done using Enterprise Architect (EA) modelling tool. The figure shows a typical design. Reviewing the implementation using model diagrams is much more effective than reviewing endless lines of code, really doing justice to the phrase ‘a picture says a thousand words’! EA generates code directly from the design model, also providing the documented responsibilities as comments. Coding the required functionality adds more detail to the generated code base. The EA model (including documented responsibilities) is updated from the modified source, allowing the model to stay in synch with the implementation. Structuring the design model by using packages, allows EA to automatically generate all the required documentation with a few clicks.
The software was implemented in the C++ language which fully supports the object-orientated design approach. Parts of the standard compiler’s library were re-written to optimize RAM usage.
The embedded FreeRTOS operating system (OS) ensures that high priority tasks are executed timeously. Lower priority tasks are scheduled when execution time is available. The use of the operating system made coding of the different tasks independent of their execution requirement, resulting in well defined, easy-maintainable code. Different priorities ensure a responsive system. The FreeRTOS OS further supports the implementation of different tasks in a RAM efficient way.
An ‘over-the-air’ upgrade of the instrument’s software via the wireless communications interface was included from the initial basic software release. This was critical to ensure un-interrupted field operations. Upgrading all the deployed instruments’ software on a site is done via the wireless communications link in less than fifteen minutes.
All the configuration settings can be downloaded to an individual or multiple instruments via the wireless communications link. New settings are verified to be correct and then saved in non-volatile flash memory to allow the instrument to re-configure itself after a software upgrade.
Parsec prides itself on its ISO9001 accredited processes which guided this project through the different phases of its lifecycle.
The application of object orientated design principles in the OpenUp process provided the best solution for the implementation of the Sentinel GDI. The instrument could be sold into the market during a critical window of opportunity. New features identified by the Schauenburg Systems sales team and customers using the Sentinel GDI have already been added to the device, proving the flexibility of the design methodology and system architecture.
Parsec is a technology force capable of developing, manufacturing and supplying state-of-the-art embedded solutions in the form of sub-systems or products to a wide spectrum of clients in the global defence / aerospace, telecommunications, industrial market and mining sectors.
Our purpose is to enhance the competitiveness of our partners and clients by enabling them to remain focused on their core competencies, while relying on Parsec’s expertise, capabilities and value added services. We therefore promote a strategy to partner with other product or service companies that outsource their design and/or production requirements to Parsec.