Clearly making use of a watchdog requires a proper configuration of several key parameters.
Mplayer video code#
As usual, a “hello world” instance of an RR var program using a watchdog is produced by executing for instance crearr -o w -rr watchdog, which produces a code an excerpt of which is depicted in Fig. This variable monitors and controls a watchdog timer. A slightly more complex example is given by “watchdog”, a reflective and refractive integer. This fine-grained remote control of mplayer has been possible by exploiting the so-called “slave mode protocol” designed by the authors of mplayer. This is because “mplayer” is both reflective and refractive: Setting one such variable refracts, that is, it triggers a predefined action. This is obtained through the following simple callback and guard: An important remark here is that the “SystemIsSlow” callback requests the adjustments just by setting variable “mplayer” with integer value represented by symbolic constant HARDFRAMEDROP. If that is the case a possible strategy to adjust the performance would be to change the frame dropping policy of the mplayer so as to gracefully degrade the user quality of experience. 3), which may be due to several reasons, including an insufficient amount of available CPU. Notifications also include exceptions, whose nature is identi- fied, and performance failures (see Fig. One such notification is “mplayer started”. Default value for that address is “localhost” (the node where the program is being executed.) In so doing the instrumented mplayer creates a stream of notifications di- rected to the already mentioned “mplayer server” running concurrently with the RR vars program in the right-hand side window. This is an instrumented version of mplayer which forwards messages to a service defined by the TCP address in environment variable “RRVAR CLIENT” and port number 1500. In the left-hand side window the actual mplayer program is launched so as to play an MPEG-4 clip. The latter is a process that waits for and reacts on messages on UDP port 1500. 1 is used here-actually the only difference between the previous code and this one is the declaration of variable “mplayer”, which implicitly executes an “mplayer server”.
Mplayer video movie#
The latter is a reflective and refractive variable used to monitor and control an instance of the mplayer movie player.
Mplayer video windows#
Figure 2 produces a more complex example: The right-hand side windows redefines “example.c” so as to make use of two variables, “cpu” and “mplayer”.
The Windows Task Manager is also displayed to show how the evolution of the contents of reflective variable “cpu” matches the one reported by that system utility. Our parser produces a pseudo-code which is interpreted at run-time each time a change or a fault is detected. Such string is parsed against a grammar similar to that of C language expressions. noting is the fact that the guard is specified as a string.