Nofitiers principally allow a programmer to pause a program pending an instruction. This component can be used in loops that read data. After the instruction is received, the loop can then begin to do the work it was designed to do. Also a notifier can be used to pause a VI pending receipt of data. It is this ability to wait till data arrives that makes notifiers unique. The data that causes the notifier to stop waiting is called a notification. For all the previously mentioned methods it is only this type that is able to do without constant polling of a variable within a loop to check for new values.
The rate at which notifications are sent out and the rate at which notifications are received have to be synchronized. This should be done in order to prevent message loss since the notification transfer system has no buffer to store unread notifications like the queue system. A feedback system can be set up in order to prevent notification message loss. This scenario mostly occurs when a notifier is used for continuous data transfer.
Notifiers can be used in conjuction with other forms of data transfer like Queues to indicate when data has arrived to be read.
The Advantage
- No need to keep checking for changes or availability of information, the notifier will indicate when data has been received.
The Disadvantage:
- If send and receive rate of notifications are not synchronized some notifications can be missed
- No buffering of notifications
Generally notifiers are good for sending individual messages but not continuous data, though they can be configured to do so.
Implementation:
A typical setup for reading from and writing to a notifier is indicated in Figure 1.
Notifiers |
---|
No comments:
Post a Comment