Content-type: text/html Manpage of RTConditionedObserver

RTConditionedObserver

Section: Chronolytix (3)
Updated: 2005-07-07
Index Return to Main Contents
 

NAME

RTConditionedObserver - Chronolytix Conditioned Object Observer Class  

SYNOPSYS

#include <RTConditionedObserver.h>

typedef int (*RTPredicate_fp)(RTRegister *regp);

RTConditionedObserver *RTConditionedObserver_Constructor( char *register_name, RTClockMicroSecs usec_response , RTEvent_fp assert_make_efp, RTEvent_fp assert_break_efp, RTPredicate_fp make_pred_pfp, RTPredicate_fp break_pred_pfp, RTClockMicroSecs make_pred_delay, RTClockMicroSecs break_pred_delay, void *event_arg);

const char *RTConditionedObserver_RegisterName(RTConditionedObserver *cond_obp);

void RTConditionedObserver_Free(RTConditionedObserver *cond_obp);  

DESCRIPTION

RTConditionedObserver is the Chronolytix extension of the RTRegister observer such that bi-modal switching with hysterisis can be observed as part of a "built in" part of the Chronolytix system. This behavior, commonly called "debouncing", is required for many types of digital inputs as well as for certain analog inputs as well. The switching sense of "make" and "break" for "on" and "off" allow the user to control the actual register values for "make" and "break". Thus "active high" and "active low" are abstracted into "make" and "break" for the observer.

RTConditionedObserver creates an opaque object that observes the register named register_name. The arguments supply two boolean predicates, make_pred_pfp and break_pred_pfp which are called with the register pointer and return non-zero if the respective predicate is asserted true. The constructor create two RTReactiveTasks, one to activate the "make" event, assert_make_efp and on to activate the "break" event, assert_break_efp with a response time given by usec_response. These two RTReactiveTasks bind the event argument to the passed parameter event_arg, which may optionally be an RTRefCnt_Object reference. The RTEvent this argument will always be the RTConditionedObserver reference. The "debounce" time required from when a predicate is asserted to when the RTReactiveTask is activated is controlled for the "make" predicate and the "break" predicate by the parameters make_pred_delay and break_pred_delay. The sum of these two delays bounds the maximum frequency of RTReactiveTask activation. By varying the delays, a variety of latency regimens, including so-called "edge-triggered", may be affected as may be required. RTConditionedObserver_RegisterName is a convenience function that returns the name of the register associated with the RTConditionedObserver. RTConditionedObserver_Free ends the lifecycle and releases the resources associated with the RTConditionedObserver. Although designed for bi-modal operation, the infrastructure could be used to effect multi-modal rate-limited behavior.

RTConditionedObserver is a Chronolytix Layer 1 function.  

MAGIC

RTConditionedObserver "CdOb"  

BUGS

 

SEE ALSO

RTRegister(Chronolytix),

RTEvent(Chronolytix),

RTReactiveTask(Chronolytix),

RTRefCnt_Object(Chronolytix),


 

Index

NAME
SYNOPSYS
DESCRIPTION
MAGIC
BUGS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 18:30:25 GMT, August 26, 2005