NotificationCounter

MacroModule
genre Fields
author Jan-Martin Kuhnigk
package FMEwork/ReleaseMeVis
definition NotificationCounter.def
see also FieldTracer, FieldBypass
keywords performance, trigger, count, listen, field, notification, touch, update, debug

Purpose

To count notifications at a single field. Connectors for drag&drop connection of image, MLBase and parameter fields are available. Alternatively, the target field can be specified by its instance name in the parent network.

Usage

For image fields, connect the output image field of interest to the input connector of the NotificationCounter. Press ‘reset’ to reset the counter to 0. Observe how the numNotifications value increases for each touch on the connected field.

Details

See ‘Parameters’ section.

Windows

Default Panel

../../../Modules/Macros/Helpers/mhelp/Images/Screenshots/NotificationCounter._default.png

Input Fields

inImage

name: inImage, type: Image

The image field the module listens to in “Image” mode.

inObject

name: inObject, type: MLBase

The MLBase object field the module listens to in “Object” mode.

Parameter Fields

Visible Fields

Active Input Field

name: mode, type: Enum, default: Image

Defines the current operation mode. Choose between Image (=> inImage field), Object (inObject field), Parameter (inParameter field) and External (the parent network field with the name specified in inExternalFieldName. When the mode is updated, a counter reset it automatically performed.

Values:

Title Name
Image Image
Object Object
Parameter Parameter
External External

[Drag&Drop Input Parameter Here]

name: inParameter, type: Trigger

Field to connect a parameter field to in Active Input Field ‘parameter’.

External (Parent Network) Field Name

name: inExternalFieldName, type: String

The name of a field in the parent network that is to be monitored in ‘External’ mode.

Reset

name: reset, type: Trigger

Resets the notification counters to 0

Count valid notifications separately

name: countValidNotificationsExtra, type: Bool, default: FALSE

Use additional counter to count valid notifications, i.e. with valid images (Image mode) or non-null pointers (Object mode).

Available in ‘Image’ or ‘Object’ mode only. Checks the validity of the input image (via field.isValid()) or object (via field.getMLBaseType() != “”) to conditionally increase an additional counter, the Number of Valid Notifications. Note that enabling this mode should be considerably slower due to the additional checking efforts.

Total Number of Notifications

name: numNotifications, type: Integer, persistent: no

The current number of input notifications (internal name is)

Number of Valid Notifications

name: numValidNotifications, type: Integer, persistent: no

Number of notifications with valid images (image mode only) or non-null object pointers (object mode only)

Available in ‘Image’ or ‘Object’ mode only, and only active when Count Valid Notifications Separately is enabled: The current number of input notifications with a valid image (Image mode) or base object (Object mode).