APPENDIX F

image

Class MTop and Diskstat

This appendix documents the MTop and Diskstat classes as used in the mtop project in Chapter 3. These are used to gather information to display on an LED matrix, such as:

  • General CPU usage (class MTop)

  • General disk I/O usage (class Diskstat)

Include Files

With the default build and default install PREFIX=/usr/local, your installed librpi2 header files should be located in /usr/local/include. In your program use:

#include <librpi2/mtop.hpp>

If necessary, add the compiler option -I/usr/local/include.

Linking

With the default build and default install PREFIX=/usr/local, your installed librpi2 library should be ...

Get Exploring the Raspberry Pi 2 with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.