Table Of Contents

Wait on Notification from Multiple (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Waits until at least one of the notifiers within an array receives a notification and returns the notification.

    This node continues to execute if the notifier receives a notification. If a notifier reference becomes invalid because another node releases it, this node stops waiting and returns an error.

    For a single notifier, use Wait on Notification instead.

    Programming Patterns

    Use Send Notification to send a notification to this node.

    connector_pane_image
    datatype_icon

    notifiers

    An array of notifier references.

    datatype_icon

    ignore previous

    A Boolean value that determines whether to ignore notifications that are sent to the notifier before this node executes.

    True If the notifier contains a notification before this node executes, this node ignores the previous notification and waits until the notifier receives another notification.
    False If the notifier contains a notification that was sent before this node checks for it, then this node does not wait.

    How Do Message Timestamps Affect Behavior?

    Each unique instance of this node remembers the timestamp of the last notification it receives. If this node receives only one notification, the node stops remembering which notification the timestamp refers to, and there is only one item in the notifiers array.

    If ignore previous is set to True, this node always waits for a new notification, even if the notification currently in the notifier is one it has never seen before.

    If ignore previous is False, each instance of this node determines if any notifiers have a notification with a more recent timestamp than the notification most recently received by this node. If one or more of the notifiers has new notifications, this node returns all notifications in the notifications output.

    Default: False

    datatype_icon

    timeout in milliseconds

    Number of milliseconds that the node waits for the notifier to receive a message before timing out.

    Default: -1 — The node never times out.

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    notifiers out

    An array of the notifier references from which messages were received.

    The index of each element in this array aligns with the index of the corresponding element in the notifications output array. You can use the index values to determine which notification came from which notifier. For example, the first notification in the notifications array came from the first notifier in the notifiers out array.

    If an error occurs, this array contains references to the notifiers that caused an error.

    datatype_icon

    notifications

    An array of the last notifications the notifiers receive.

    The data type of the elements in this array changes to match the data type of the notifier unless the notifier is an array. If the data type of the notifier is an array, the data type of this output becomes a cluster of arrays.

    datatype_icon

    timed out?

    A Boolean that indicates whether any notifier received a notification before the node timed out or an error occurred.

    True The notifier did not receive a notification before the node timed out, or this node generated an error.
    False At least one notifier received a notification, or an error occurred before this node executed.
    datatype_icon

    error out

    The node produces this output according to standard error behavior.

    This node can return the following error codes.

    1122 The reference became invalid while the node was waiting for it.
    spd-note-note
    Note  

    This is not a comprehensive list of errors this node can return.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Preventing Deadlock

    If you experience deadlock when you use this node repeatedly with different notifiers, you can replace this node with Wait on Notification from Multiple with Notifier History, which stores timestamps for each individual notifier to prevent deadlock.

    Removing Notifications

    This node does not remove the notification from the notifier. The notification remains in the notifier until all Wait on Notification nodes return the notification. While the notification remains in the notifier, each Wait on Notification node will return a given notification only one time. If you want to remove a notification from a notifier before all Wait on Notification nodes return the notification, use Cancel Notification.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics