Skip to Content
Embedded Programming with Modern C++ Cookbook
book

Embedded Programming with Modern C++ Cookbook

by Igor Viarheichyk
April 2020
Intermediate to advanced
412 pages
9h 58m
English
Packt Publishing
Content preview from Embedded Programming with Modern C++ Cookbook

How it works...

The heartbeats mechanism needs some kind of communication channel to let one component report its status to other components. In a system that is built around multiple processing units, the best choice would be network-based communication over sockets. Our application is running on a single node, and we can use one of the local IPC mechanisms instead. 

We are going to use POSIX pipes mechanisms for our heartbeat transport. When a pipe is created, it provides two file descriptors for communication—one is used to read data, while the other is used to write data.

Besides the communication transport, we need to choose the time interval for taking over. If a monitoring process does not receive a heartbeat message within this interval, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ System Programming Cookbook

C++ System Programming Cookbook

Onorato Vaticone
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 9781838821043Supplemental Content