<<<<<<<<<<<<<<<<<

signal_scale_filter(signal_data)Signal_Datasignal_scale_filter(signal_data)

NAME

signal_scale_filter - scales signal_data.

DESCRIPTION

The signal_scale_filter is a simple example of a signal_data filter. It is primarily intended as a demo for filter writers, to show what methods need to be supplied by the user, how to access and manipulate incoming data, and how to write the results to the output connection signal_data object. This filter simply multiplies each requested piece of data by the "scale" instance variable supplied by the user.

SUPERCLASS

signal_filter

INSTANCE VARIABLES

scale Scale factor by which incoming data will be multiplied. Initialized to 1.0, in which case it does a straight copy of the data from signal_in to the requesting connection signal_data output.

MESSAGES

generate_data: start_packet end_packet start_index This method should NOT be called directly from the shell or another object. It is an internal method called during a "request_data:" from a connection. This "generate_data:" is intended as a demo for filter writers and is well commented. Basically, an index into the signal_in SIGNALTYPE's data is gotten for the argument "start_packet". "start_index" is the corresponding index for the output connection's SIGNALTYPE data. For each channel in the requestor's channel_list, the input datum is multiplied by the "scale" and put in the output data. The indices into the data are incremented (with a macro) for each requested time-step. Pointers to the "labels" and "objects" arrays are simply copied from the signal_in to the connection. When called, the signal_in is (hopefully) guaranteed to have all the data needed for the request. However, since the signal_data pipeline is still undergoing tests and development, a number of validity checks are performed prior to accessing the data.

scale= value Set the scale to value.

scale? Get the scale value.

EXAMPLE

SEE ALSO

signal_data signal_filter signal_reader


Please send comments and suggestions to
consult@rpi.edu