3.4. Building Your First RTA Program

Now we'll look at how to use RTA to expose a table inside a running program. The five basic steps for doing so are:

  1. Defining the problem.

  2. Reviewing the code.

  3. Installing RTA.

  4. Building and linking.

  5. Testing.

3.4.1. Defining the Problem

We want to expose the UI program to an array of structures that contain a user-editable string and two integers. One of the integers, zalarm, is set by the user. The other, zcount, is incremented on each transition of zalarm from one to zero or from zero to one. We print a message to the console each time a transition occurs. The string, zname, is considered a configuration value and is saved in a disk file whenever it is updated. Since zcount is a statistic, we mark it as read-only. This ...

Get Linux Appliance Design 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.