add_exception_function, add_echo_function — assign functions for exceptions or echoes on a point.
add_exception_function (symbol, s_exp); add_echo_function (symbol, s_exp);
When a Gamma or Lisp program is run in conjunction with the real-time datahub, process points may change at any time, causing point change events to occur. A point change event is referred to as an exception. It is possible to bind any Gamma or Lisp expression to a symbol to be evaluated when an exception occurs. If a program can both write a point on the datahub and react to exceptions on that point, it is possible that the datahub will "echo" a point written by the program itself. If this is not handled, an infinite loop between the program and the datahub could occur. The datahub tags point echoes so that a different function can be called in the program when that echo arrives back at its origin. Only the originating task will see a point exception as an echo. All other tasks will see a normal exception.
When an exception handler (the s_exp argument) is being evaluated the special variables this, value and previous are all bound:
this The symbol which received the exception.
value The current value of this as a result of the exception.
previous The value of this immediately prior to the exception.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.