Application Example: Networked Embedded Device
The following example shows how the C++ libraries and tools from Applied Informatics can be used to build a ticketing and admission control device. The system's (simplified) requirements are as follows:
- The system checks print-at-home tickets containing a barcode.
- The system has a database of valid barcodes, downloaded from a server using a secure network connection (HTTPS). Periodically, updates to the database are fetched from the server as well.
- The system has a touch screen-based user interface.
- Feedback about scanned tickets is given via the user interface, as well as audiovisual (sounds, light effects).
- The system has a web-based user interface for remote monitoring and remote configuration.
Implementation
The system is implemented in various processes that communicate with each other. The data acquisition application interfaces with the barcode scanner and sends the scanned barcodes to the processing application. The processing application checks the barcode's validity and notifies the user interface and audiovisual feedback application of the result. This application also has an embedded web server that provides the web interface for remote monitoring and configuration. The audiovisual feedback application controls LEDs for light effects and plays sound effects. The graphical user interface application controls the touch screen.
Remoting for IPC
Inter-process communication between the central processing application and the other applications is implemented with Applied Informatics Remoting. The services that the applications provide are implemented as C++ classes. The Remoting code generator and the Remoting runtime enable efficient invocation of the service methods across process boundaries.
Embedded Web Server and Database Access
The embedded web server, as well as SQL database access (SQLite) is implemented with the POCO C++ Libraries. Many features provided by the POCO C++ Libraries are also used in other parts of the system (e.g. threads, HTTPS client, XML parser, etc.).
Additional Implementation Options
The system could also be implemented with the Open Service Platform. In this case, some of the applications (e.g., data acquisition or audiovisual feedback) can be implemented as plug-ins of the main application, thus reducing IPC overhead while still maintaining modularity.
Fast Infoset could be used to compress XML data transferred between the server and the device.