Queues of world events

A bit of theoretical but nevertheless interesting question

If there is a 'rush' of world events are they queued for the receiver or is there a risk of missing one if the receiver is "busy"?

The experience of world events are quite robust.  I have an app that "speaks" return application parent all two milliseconds to response username of the user in real time, and although there is a queue, he was never noticeable.   Even on slower devices, the user could never say that it was infact two different applications and not one with respect to real-time performance.    Also never 'filled' queue.

Tags: BlackBerry Developers

Similar Questions

  • Prevent the structure elements of the queue of the event?

    Is there a way to prevent a record structure and the queues of the events of the event?

    I have a state machine with a structure of the event in one of the States - the State is waiting for user input before continuing - and I wish that the structure of the event to recognize the events only when the program is in this State. I understand that the current method to catch all events is sometimes (usually) the desired behavior... Heck, I use it to my advantage most of the time. However, this is not one of those times.

    Here is a small example of my configuration:

    (See attachment. I guess that's too big for an extract VI, so it is a standard PNG image)

    The question that I have, is that the Structure of the continuous event of events Records even after pass to the next State. This means that if 'String' is changed at any time, the next time the queue of event happens in the state machine, all updates of the "chain" will run.

    So, how can I implement the code in such a way so that the events will be only intercepted and queue when the structure of event loop is running?


  • What is the fastest method producer consumer. Queue, RT-FIFO, event

    Hi all

    Another question completed for the pro:

    I recently inherited the labview code that uses RT-FIFO for the transfer mechanism in the architecture of the producer consumer.

    The code was first written in 3-4 years and is currently in LV8.6. It is possible that the reasons for the architectural decision no longer exists.

    I am qualified using a producer consumer queued architecture,

    I understand the RT-FIFO Architecture.

    I started using an architecture based on events from the user.

    (I have attached samples of each)

    I also see the existence of a priority queue

    Each method has its own capabilities and gaps, that hand, nobody knows the relative performance of each method.

    (Assuming that the only process)

    I would expect RT-FIFO to be faster, there seems to be a version of low characteristic of a standard queue.

    What is the perfornace hit to use a coding user-friendly queue more

    RT-FIFO description talks about commications between the time-critical and lower priority threads.

    Until today, I thought that the queues had the same capacity.

    I've included an event method that I commonly use for review by peers and help from other users...

    It allows to:

    1. several producers with different types of data

    2. process 37 production order.

    3 allows asynchronous verification of functional notifiers such as stop, start and abort.

    4. in a system not real-time, it can include interactions of façade.

    What I do not understand on this subject, that's what are overhead or thread priority changes that may occur using this architecture (it solves a lot of problems for me).

    Thanks in advance,

    Hi Timmar,

    Here's a KB article on some frequently asked questions about the RT FIFO: http://digital.ni.com/public.nsf/allkb/7AE7075AF1B2C58486256AED006A029F?OpenDocument

    The more relevant question is #4, I posted below.

    What is the difference between RT FIFO and queues? 
    Functionally, RT FIFO and LabVIEW queues are two pads of first in, first out. However, here are the main differences between them:

    • RT FIFOs run deterministically in LabVIEW and evanescent code queues are not. This comes from the fact that queues use block calls during read/write to the resource shared, while RT FIFOs use non-blocking calls.
    • RT FIFO are fixed size while queues develop when items are added to them.
    • RT FIFOs will execute the code, even if there are input errors. They can (and will) produce new errors and spread the existing errors.
    • Queues work with any type of data, while the data types that can be used with RT FIFOs are limited. Generally any type of data involving allocations of extra memory can be used with RT FIFOs to preserve determinism.

    Let us know if you have persistent questions!

    Ryan

  • Learn how to use queues producer consumer event

    Hi all

    I'm trying to understand the good programming techniques for the use of the elements of the queue in a producer / consumer event-driven program. I am looking for some demonstration programs have an idea of the functioning of these looops-based. Currently, I'm not sure on how to deal with errors that occur before an event from the queue (see screen capture below).

    If a queue receives an error, it seems that the queue item is never received. I have an OR statement to stop the producer loop when it receives an error message. However, because the question has never been in queue, dequeue in the consumer just loop element crashes then the consumer don't never closed loop the while loop.

    What are some good techniques to handle errors that are placed in a queue? I could probably cable a timeout on the dequeue, but I prefer not to use this approach if possible.

    Thank you


  • my world event working on the Simulator, but not on the device

    Hi guys,.

    I'm using BB bold 9000. I have attached directly to the device and debugging. I'm getting "background switch detected for myapp (261) that does NOT have the tunnels open - defocus is NOT called" on the device debugging. but it works fine on the Simulator (my ultimate task is slaughtering an application from another application) any idea?

    Thank you

    Thank you guys, it's worked.

  • Application.invokeLater () and event queue size limit

    Analysis of Application.invokeLater () is insufficient. He mentions a "size limit" of the queue of the event but never defines it or said if it is always applied. Therefore, the contract is ambiguous.

    I would really like to know:

    1. am I guaranteed that an executable that I turn to Application.invokeLater () will eventually race, if the event thread doesn't die?

    2. What is the size limit of the event queue and it's always enfoced or only when the event thread did not intervene?

    3 - How is applied the limit? Runnables get just dropped from the back of the queue and nothing happens?

    I tried.

    The platform throws an exception and judge of the application to be unresponsive not once you have planned a not-very-large number of runnables.

    It is a pity that this is not documented and it is a pity that the queue is so short. Now I have to have a queue in my code to avoid this situation.

  • No output message in the reminder of the event reminder register

    Hello world

    Nice day. I've created a diagram that uses the DLL of our client. I have a hard time to create because I am not no matter what background or experience this level of .expertise which involves DLL files. The DLL file is a type of Assembly code .net. The DLL file will be used for sending specific commands (i.e. read the Firmware Version, serial numbers, etc.) using a NFC (Sony S380) Player. It is the only means of communication about the product that is a digital watch. The problem is on the VI Ref callback, which implies a dialog box & a Message string for the property of 'DebugResponseReceived' node, there is no output, but the dialog box Message only gives me a message OK or info that I need to get. If I put a breakpoint to unbundle it by name "e", it gives a message in the property node power & the dialog box. both the Message property Node & dialog box have the same performance. Please see my Code.

    I'd appreciate your help.

    Thank you

    Leo

    A reminder cannot directly return values. You must use the user parameter of event reminder entry register to pass a reference to a queue, the user event or another way to pass data to a primary application. Research on this forum will be examples, for example here is one I posted years ago (note that screenshots are good, but attached the screws aren't; see further on the wire to correct those): http://forums.ni.com/t5/LabVIEW/How-to-interaction-with-Main-VI-from-Net-event-callback/m-p/1064515#...

  • several structures of event

    Experts,

    No harmful effect of having two event Structures, one in the main BD delivery of user interface events (button presses, menu etc.), another running into a Subvi loop, handle events of the user?

    My reason for doing is also blocking calls UI (like brining a dialogue password entry) could not be paid directly to the event Structure. I use the user events (and thus a corresponding event Structure) as the basis of a periodic Task Scheduler and my tasks get unmanaged queued properlyif something blocks the Structure of the event.

    Of course, I would be careful that there is no common event between the two structures. This would be easier, due to the nature of the Subvi in the event user manages the Structure of the event.

    Thoughts?

    Nothing inherently wrong to have multiple structures of event. Our application tend to have dozens and dozens at the same time, due to the fact that the user events, while demanding a bit of wiring and infrastructure, are incredibly useful things.

    The main caveats are:

    1. If you subscribe to a user event, wire the event record Refnum to more than one Structure of the event, or the behavior is undefined. Sometimes, one or more of the event structures don't receive the event. Instead, register the event several times, one for each structure of the event.

    2. As Ben said, save more than once for the same event of filter.

    Another easy way to circumvent the problem of blocking dialogue would be to create another loop whose sole responsibility is to pop up dialog boxes blocking. You can use a queue or user events or else send messages to and from this loop. A single loop should be enough, especially if the pop ups are modal and could only be active anyway. To be honest, I've never had to do this, but it seems it would work very well.

  • event structure vs case structure

    I am developing LabVIEW: tool of control and vision. Front Panel has a lot of buttons, each button will execute a single or a group of the screws.

    I found that:

    1. event structure is good for digital change. i.e. the user change a corordinate and motors are moved.

    2. the structure cases is suitbale where such that use click "run MTF", a case structure is executed to calculate MTF.

    I tried to use the structured event to pick up button click but it isn't reliable workign, such as the user clicks too quickly and LabVIEW does not record events or LabVIEW records the event even twice

    However, I have a number of clicks functional structures. My block diagram will be uncontrollable.

    Any idea/tip/trick be greatly appreciate!

    -best

    If you understand how LabVIEW works and understand the principle of data flow, what I'm going to say the will of sense.

    The idea of a Structure of the event, it's that he's sitting there, don't take no time CPU until an event (usually a change in a Front Panel control) takes place.  Then he does everything you ask in its event arguments.  The trick is to do almost nothing in the structure of the event, but to say another loop, running in parallel, to do something.

    The key here idea is you have two loops, running in parallel, independently, at their own pace.  One, the event loop, waiting for an 'event '.  When it happens it it "sends a message" to another loop (or loops) that make treatment (which may take some time) as defined by the event loop.  The point is that it is very fast to send him the message (which is usually done via a queue), so the event loop is able to respond much more quickly that the user can push buttons on a façade.

    However, when the hands of loop event off the Message 'go do this task' another loop, the task may take longer.  If the tasks are put in a queue and then they get finished, the next task is running.  The key thing here is that the two loops, the loop «Ask» (events) and the loop ' Do ', run indepedently and at their own speed, nor dependent on the other.

    Bob Schor

  • By the way a multicolumn Listbox double-click event line in a secondary

    What I have is a shell at a higher level with the configuration of equipment of high level, as well as common application functions as save the test report and exit/close.

    In this first level is a listbox multicolumn "Test selection".

    When a device is selected in the configuration, one of the many sub-panels charge based on the selected device.  When the secondary is loaded, the table of test selection on the front of the top is filled with items via a reference.  The listbox items differ according to high school who is responsible.

    Normally what we do is use a structure of the event with the event double-click to change States in the program.  Given that States I want to change are in the secondary, and the list box lies in the toplevel, I can't use the event structure to integrate this double click on the secondary line.

    What I want to do currently a property to read to the 'value' of this list box in the secondary in both cases the timeout of a structure of the event or within a parallel loop, then to the decision of the State based on the changing value of the indicator.  However, by doing this I lose the effect "queues" in the table of test selection (can double-click some line items and the structure of the event will be queued double click events).

    Is there a more elegant way to spend this line double-clicked in the secondary?

    It seems that you already pass a reference to the Listbox MC control to the Subvi.  You can use it to record dynamically for the double click event inside the Subvi.

  • Lack of dynamic event (declaring)

    In my application, I have one notifying registered as an event 'user '. There are three structures of the event, each in a while loop; in every structure of the event, the event Notifier is recorded as "dynamic event. In both structures, the delay is set to '-1' (infinite). In the third stcructure, the time is set to 5 ms; the case of timeout takes 500ms to complete (for example, by using 'Wait ms'). A structure of additional event triggers this event notifier.

    What is happening is that the two structures with infinite time-out catch this event (I think), but lack the structure with a short timeout and expiration time of long-running cases. If I do the waiting time is long and the case timeout run quickly, this structure has also intercepts the event. It seems that when executing the timeout case, the event is canceled.

    An example VI is attached.

    Is this a bug or I do something wrong?

    Thank you

    Sergey Liberman

    You're doing it wrong.  You create entries in separate events for each loop.  You're really lucky that the two loops are both able to see the event and run.  Once a loop handles an event, it get cleared out of the queue of the event.  The two structures meet at the same time, but once that one or the other ends, he is allowed out of the queue and the 3rd structure ever sees.

    This has come up before.  This recent thread discussed.

  • size of the event log

    Hello

    Can someone tell me the size of the event log?

    Thank you

    yosoh

    According to the JavaDocs for net.rim.device.api.system.EventLogger:

    "Events are persistent across reboot. The Unit maintains a queue of the event; When the log is too full, new events push 'old' on the front of the queue. About 16 K of data can be stored until the log is too full."

    Tariq

  • Screen pushing problem in the incoming call disconnected event

    When a phone call disconnects I would push a screen containing some information about the appellant

    In the call disconnected event I'm doing this:

    UiApplication.getUiApplication () .requestForeground ();

    UiApplication.getUiApplication () .pushScreen (new CustomScreen());

    It works most of the time.

    But when I close this screen the phone keypad.

    And sometimes my screen does not get pushed and the keypad appears.

    I could be wrong, but I guess that my screen is pushed in the wrong context?

    Can someone point me in the right direction?

    See you soon

    I have a slightly different take on this problem.

    I think that you run this code:

    UiApplication.getUiApplication () .requestForeground ();

    UiApplication.getUiApplication () .pushScreen (new CustomScreen());

    at your disposal, and if you run in the context of phone, not your application.

    The treatment of changes to it it context moves to your application - the best way to proceed is to use a Global event.  Search for informaiton on world events so this is new to you.

  • Post Global event

    Hello.  Looking for ideas on display / listen to world events.  Eager to update the text of a suite labelfield smsSendListener() sendMessage.  Little confused on how to proceed.  When you run ApplicationManager.getApplicationManager (.postGlobalEvent), must the long value match the value of the smsSendListener() object?  At this point, I guess I listen for this value of type long.  SmsSendListener passed as an object I can refer is based on the value of long type when listening to it?  I have a sample of http://supportforums.blackberry.com/t5/Java-Development/Global-Events-and-Global-Event-Listeners/ta-... but also http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/GlobalEventListener.htm... and http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Application.html#addGlo...).  Can someone tell me something that might provide a bit more guidance in this work?  Thank you.

    Take a look at the samples provided by the ApplicationManager class:

    http://www.BlackBerry.com/developers/docs/7.1.0api/NET/rim/device/API/system/ApplicationManager.html

    You 'fire' a value of type long, but associated long value, you send 2 ints and 2 objects.  In your case, for example, you could send the text that you want to use to update the field and the field that you want to update.  The long value must be unique.  Then in the listener, you have to wait the long value.  When a long value, you can convert objects associated with it to anything you want, and then perform an action - in your case, update the text field.

    I hope this is sufficient.

  • programatically controll queue

    can I do my slot task first on the queue of the event...

    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run()

    {

    task;

    }

    });

    None

Maybe you are looking for