Next: The Visualization Log
Up: CASiNO's Debugging Mechanisms
Previous: Important Notes on the
  Contents
  Index
Setting Kernel Speeds
It is possible to change the speed at which the CASiNO Kernel operates.
Manipulation of kernel speed requires inclusion of the following
header file
#include<FW/kernel/Kernel.h>
Valid speeds are:
enum Speed { QUARTER_SPEED = -2,
HALF_SPEED = -1,
REAL_TIME = 0,
DOUBLE_SPEED = 1,
QUADRUPLE_SPEED = 2,
SIM_SPEED = 666,
UNKNOWN_SPEED = 999 };
If the speed of the CASiNO kernel is set to DOUBLE_SPEED then
10 second timers will expire in 5 wall-clock seconds, 30 second
timers will expire in 15 wall-clock seconds, etc. At DOUBLE_SPEED
the CASiNO kernel compresses its time relative to true
external time by a factor of 2. This is useful for stress-testing
of protocol implementations, since it essentially allows one to
increase load by compressing the notion of time, rather than actually
generating the load.
If the speed of the CASiNO kernel is set to HALF_SPEED
then 10 second timers will expire in 20 wall-clock seconds, 30 second
timers will expire in 60 wall clock seconds, etc.
AT HALF_SPEED, the CASiNO kernel dilates its time relative to true
external time by a factor of 2. This is useful for debugging implementations of
protocols with very short timers. By dilating all the timers uniformly (simply
by slowing down the CASiNO kernel) the programmer can work normally in
standard debuggers without having to ``race the system clock''.
Changing and inquiring about the speed of the CASiNO kernel is acheived
using the following methods
void Kernel::SetSpeed(Speed newspeed);
Speed Kernel::GetSpeed(void);
For more information on setting the speed of the CASiNO kernel,
please refer to the appropriate section of the User Guide, titled
``The CASiNO Kernel Itself''.
Next: The Visualization Log
Up: CASiNO's Debugging Mechanisms
Previous: Important Notes on the
  Contents
  Index
CASiNO-dev@cmf.nrl.navy.mil