This example demonstrates use of the Watchdog driver in a KasperskyOS-based solution.
Example directory in the SDK
The code of the example and build scripts are available at the following path:
/opt/KasperskyOS-Community-Edition-<platform>-<version>/examples/watchdog_system_reset
List of programs
Client – application that uses the Watchdog driver interface to interact with the watchdog timer.Watchdog – watchdog timer driver.DCM – system program that provides functionality for dynamically creating IPC channels.The client library of the Watchdog driver is statically linked to the Client program.
Initialization description
The solution initialization description file named init.yaml is generated during the solution build process based on the ./einit/src/init.yaml.in template. Macros in @INIT_*@ format contained in the template are automatically expanded in the resulting init.yaml file. For more details, refer to init.yaml.in template.
Security policy description
The security policy description files for a KasperskyOS-based solution are located in the ./einit/src directory.
The security.psl file contains description of the solution security policy. This file is a top-level file into which a portion of the solution security policy description in the form of the PSL file dynld.psl is included via the use declaration. (The declarations in the PSL files are annotated to explain the purpose of these declarations.) The dynld.psl file contains the part of the security policy description that is used when dynamically linking the solution components.
Resources
The ./resources/xdl/watchdog_system_reset directory contains the Client.edl file, which is the EDL description for the Client program.
Operating scenario
The Client program performs the following actions:
Watchdog driver settings and prints them to standard error.Building and running the example
The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.
See Building and running examples section.
Page top