I have C++ app is running on my device which is a bit modified version of Raspberry PI. Application is reading data from a serial port and I need a device to reboot after some particular data is received. I've been wondering about integrating this functionality with watchdog but have no idea how to do it. Maybe there is a possibility to send some signal from my app to watchdog to tell that it's time to reboot?
P.S. Application starts as systemd service.