Introduction
One way to optimize the behavior of the Meditech system is adopting the more reliable tools, programming languages and technologies depending on the different tasks that should be accomplished. This implies obviously a multi-language environment, essential to reach the better simplification level; for example, following this primary directive, all where it is possible the MySQL database will be accessed via low level SQL queries with bash scripting techniques as well as the hardware control software is developed in gcc++.
This approach maybe a bit more complex than the choice of a unified development language, possibly at high level. In fact we should include in the pros of this fragmented approach also a better costs optimization involving hardware solutions just when it is not possible to solve them with software.
In the initial Meditech design one of the development platforms included in the project was Qt but then this directive changed, as Python revealed the better language to develop the main scripting sources controlling the Meditech sub-processes and a good way for the User Interface design, with some more extra effort.
Based on these considerations at the actual date the Meditech development scheme has totally excluded the Qt environment replaced by Python beside to the Linux scripting tools, SQL language, PHP and few other development components and libraries.
Involved software components
In the scenario described above every different software environment adopted in the system should be viewed as a set of one ore more specialized package(s) set. The following diagram shows the general scheme.
First of all this methodology tend to take the maximum advantage working in a multi-task environment. As it has been already discussed in the previous posts, Meditech is a modular system using an internal set of three specialized Raspberry PI devices, plus a fourth unit dedicated to the camera features but other can be added if needed. The same described vertical task approach has been adopted in all the devices as the software model.
In the scheme we identify different classes of applications, harmonized and integrated by an inter-process controller developed in python.
The software sections in detail
On-demand processes
These are processes that most include the network connection (e.g. launching a task on another unit of the system); are bash scripts that launch a task execution when the behavior needs it. A typical example is the process TTS (Text-To-Speech) playing a synthesized sentence in response to a command. The task-on-demand can be called by other processes or by the main inter-process controller; they have the characteristic that we should always expect and exit condition.
Background processes
This group includes that startup Linux services, like the peripheral controls, Apache2 web server, the Php engine etc. Then there are Meditech-specific processes that starts when the device is powered-on and runs indefinitely. A typical example is the infrared controller running over the lirc ervice (Linux Infrared Controller) managing the Infrared controller interface, the primary interaction method with the system.
Networking
Beside the OS networking services, including but not only the SSh server, web server, MySQL server, NTP server and more, there are other Meditech-specific networking services based on bash scripting commands to manage some special network features like the remote database update, image streaming, continuous data processing intra-networking data exchange etc.
Database storage
This the class of tasks related to the local MySQL database management and the remote server update (when there is an active Internet connection). Where the SQL queries are recursive tasks these are embedded in bash scripts (to simplify the calls) while in the interactive UI the database is used as data collector and the information retrieved from the sensors are represented graphically on the screen widgets with Python and PythosnSQL programs.
Hardware control
The control panel and the data acquisition from the probes is developed under GCC commands that are embedded in bash scripts.
User Interface and interactivity
The Meditech UI is developed in Python and the visualization of the various widgets is controlled by the inter-process control developed in Python too.
Internet web access
This class of tasks is divided in a double client-server mechanism to enable the remote support from any authorized remote Internet connection (it is sufficient a browser). on the Meditech side the Apache2 + MySQL and PHP engine grant the remote access from the same LAN. Using a could server when an Internet connection is active and the remote assistance support has been enabled by the local operator the data are sent real-time over a cloud MySQL server. A PHP-based web site grant the accessibility from remote to the data and enable the chat support with the local Meditech device.
Top Comments