Description
Reducers (RDXs) provide a means of selecting one in every N consumed events for delivery to their providing faces; all intermediary events are discarded. The period and phase of event delivery is configurable. These objects are generally associated with intrinsically concurrent applications.
Creation Attributes
Name
Instance name (see Object Names)
Dimensions
Instance dimensionality (see Object Dimensionality)
Presence
Instance presence flag (see Object Presence)
Reentrancy
Instance reentrancy (see Object Reentrancy)
Visibility
Instance visibility flag (see Object Visibility)
Period
This determines the ratio between the received and delivered events. If set to '1' then the reducer would have no effect because all of its events would be delivered. If set to 'X' then (with zero phase) it would deliver events; 0, X, 2X etc.
Phase
This determines the particular events that are delivered by the receiver and must be a value in the range 0 to Period-1. If the phase is set to 'Y' and the period is 'X' then the delivered events will be; Y, Y+X, Y+2X etc.
Connection Attributes
Event propagator objects have two types of connection. Those that provide events to their consuming faces, and those that consume events from their providing faces. The attributes associated with any particular connection therefore depend on the providing and consuming object types (see Automatic Connections).
All automatic connections require;
Timeout
This attribute determines whether the connection will poll or block (see Connection Timeout).
Signature
This attribute is a string that describes the mapping from elements in the consumer, to elements in the provider. See Connection Mappings.
Dimensions
This attribute determines the dimensionality of the connection array owned by each consuming element. By default, this will provide the consuming element with one connection for each provider element. Collector, Multiplexor and Manual connection consumers can have multi-dimensional connection arrays, but in all other cases, this attribute will be '1'. See Connection Mappings.
Repeat Count
This attribute determines the number of times that each 'provider element to consumer element' connection is repeated. If the repeat count is greater then one, then the Dimensions attribute (above), and the resulting connection access functions, will both have an 'extra' dimension. Only Collector, Multiplexor and Manual connection consumers can have repeat counts that are greater than '1'. See Connection Mappings.
Name
This attribute determines the connection's 'name' which is used to construct access function names (see Connection Names).
There are no specific attributes required for connections that provide events to a reducer's consuming face.
There are no specific attributes required for connections that consume events from a reducer's providing face.
Manual Connections
Manual connections provide a means of directly accessing target objects. These are created automatically from CDL diagrams and accessed using their access function names (see Manual Connections).
Reducer connections provide the following member functions;
WaitEvent()
This member function issues an 'open' request to the reducer (see RDX WaitEvent function).
Close()
This member function closes a previously opened reducer (see RDX Close function).
Automatic and Manual Connections
The following member functions can be used to retrieve information from both automatic and manual connections;
IsOpen()
This member function returns TRUE if the connection is 'Open' or FALSE otherwise.
EventNum()
This member function returns the retrieved event's sequence number. Numbering starts from zero (the first retrieved event).
Example
See Reducing and Repeating Events.