Next: C Throttle Creation & Installation Up: C API Previous: C API

C "Catchall" Throttling Functions (VxWorks only)




There are three functions associated with "catchall" throttling.
  void catchall_init()
This function creates a new SLAC filter(replacing any previously existing filters on the IOC, thus erasing any previous throttles), sets the "catchall" throttle, and enters an infinite loop where it calls checkThrottleStatus(), sleeps for 1 second, and repeats this loop until the IOC is rebooted, or the function below is called.

When invoking the function, it is best to use a task spawning function rather than just entering the function from the command line. At SLAC, we use the following line for starting "catchall" throttling on VxWorks:
  taskSpawn( "tCatchall_Throttle",250,0x08, 5000,catchall_throttle )
The first argument is the task name, the second argument is the priority(lower since we want "primary" tasks to take priority over our catchall task), the third argument is a flag that sets floating-point coprocessor support(very important), the fourth argument the stack size of 5000, and the fifth and final argument is the function name.
  void catchall_off()
This function will cause the filter to delete the catchall throttle, and will also exit the status message output loop. If you would like to remove the catchall throttle but keep the status message check loop, you may enter cml_remove(1) at the command-line shell.

Note that calling catchall_off() or cml_remove(1) does not remove other non-catchall related throttles that may have been set at the command-line shell or by other applications.
  void set_catchall_sleeprate(int numSecs)
You may use numSecs to set the number of seconds that the throttle status message check loop sleeps. The deault sleep rate is one second. You may not set the sleep rate to a value that is less than 1.

Another section exists with a description of "catchall" throttling.


James Silva
2003-02-20