Difference between revisions of "Interruptions"

From LinuxMCE
Jump to: navigation, search
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{uncat}}
+
[[Category:configuration]]
 +
[[Category:Programmer's Guide]]
 +
[[category:development]]
  
<table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>The Orbiter can change screen to display messages in response to events, such as when you insert a new plug and play device and need to tell the system if you want to use it.  However sometimes you don't want to be interrupted. For example, when you're watching TV you probably don't want to be alerted because a new device is detected on the network.  However, you probably do still want to be alerted if someone is ringing the door. In general, low priority tasks will not interrupt you if you are watching tv or doing some computing application, like browsing the web.  These prompts are queued and you will only see them when you either stop the activity, or manually switch to another screen, like the main menu, which the system understands to mean it's ok to interrupt you. So, if you are trying to add plug and play devices, or do other tasks that would normally popup messages on the screen, but you are not seeing the messages because you are watching a movie or browsing the web, then simply switch screens to the main menu and then the popup messages will appear.
+
The Orbiter can change screen to display messages in response to events (such as inserting a new plug and play device).  However, sometimes you don't want to be interrupted.
 +
 
 +
When you're watching TV, for example, you probably don't want to be alerted just because a new device is detected on the network.  Still, you probably want to be alerted if someone is ringing the doorbell.  
 +
 
 +
In general, low priority tasks will not interrupt you if you are watching TV or browsing the web.  These prompts are queued and will only be displayed when you stop the activity or manually switch to another screen (like the main menu). The system interprets this to to mean it's ok to interrupt you.
 +
 
 +
If you are trying to add plug and play devices (or do other tasks that would normally display popup messages on the screen) but you are not seeing the messages (because you are watching a movie or browsing the web), you can simply switch screens to the main menu and the popup messages will then appear.
 +
 
 +
{{p}}
  
 
== Technical Explanation for Developers ==
 
== Technical Explanation for Developers ==
  
In the Screen table in the pluto_main database is a field AllowInterruptions, which by default is 1, or true.  If it's left at the default, then if that screen is currently active on the orbiter when the orbiter gets a request to display an alert or change screens, it will always do it.  If the setting for the screen is 0, which it normally is for full-screen media screens like the dvd playback, live tv, etc., then the following rules will be evaluated to see if the user should be interrupted.
+
In the Screen table in the pluto_main database is a field AllowInterruptions, which by default is 1 ( or true).  If it's left at the default, then when that screen is active on the orbiter and the orbiter gets a request to display an alert or change screens, it will always do it.  If the setting for the screen is 0 (which it normally is for full-screen media screens like the dvd playback, live tv, etc.), then the following rules will be evaluated to see if the user should be interrupted.
  
 
First, Goto_Screen takes a Parameter #251 Interruption, which is defined in AllScreens.h:
 
First, Goto_Screen takes a Parameter #251 Interruption, which is defined in AllScreens.h:
enum eInterruption {interuptAlways=0, /* always interupt his activity and change screens */
+
 
interuptNever=1, /* never interupt, only change the screen if the system is idle */
+
<pre>enum eInterruption {interuptAlways=0, /* always interupt his activity and change screens */
interuptNoVideo=2, /* will interrupt a web browser but not a movie */
+
interuptNever=1, /* never interupt, only change the screen if the system is idle */
interuptOnlyAudio=3 /* will not interrupt a web browser, only when audio is playing */
+
interuptNoVideo=2, /* will interrupt a web browser but not a movie */
};
+
interuptOnlyAudio=3 /* will not interrupt a web browser, only when audio is playing */
 +
};</pre>
  
 
This value can also be specified when using the pre-generated class helpers to do screen changes: DCE::Screen_[screen name].
 
This value can also be specified when using the pre-generated class helpers to do screen changes: DCE::Screen_[screen name].
  
 
If the interrupt is not interuptAlways, then the function OkayToInterrupt() in Orbiter.cpp will determine if it's okay to interrupt.  If the answer is 'no', then it looks at another paramter to Goto_Screen: #253 Queue.  If that parameter is 0, the screen change is lost.  If it is 1, then if the screen doesn't change because of Interrupt rules, the screen change is added to a queue (m_listPendingGotoScreens) and the next time the screen changes the entries in the queue will be evaluated to see which ones are safe to do then.  See Orbiter.cpp::ServiceInterruptionQueue()
 
If the interrupt is not interuptAlways, then the function OkayToInterrupt() in Orbiter.cpp will determine if it's okay to interrupt.  If the answer is 'no', then it looks at another paramter to Goto_Screen: #253 Queue.  If that parameter is 0, the screen change is lost.  If it is 1, then if the screen doesn't change because of Interrupt rules, the screen change is added to a queue (m_listPendingGotoScreens) and the next time the screen changes the entries in the queue will be evaluated to see which ones are safe to do then.  See Orbiter.cpp::ServiceInterruptionQueue()

Latest revision as of 03:46, 20 October 2012


The Orbiter can change screen to display messages in response to events (such as inserting a new plug and play device). However, sometimes you don't want to be interrupted.

When you're watching TV, for example, you probably don't want to be alerted just because a new device is detected on the network. Still, you probably want to be alerted if someone is ringing the doorbell.

In general, low priority tasks will not interrupt you if you are watching TV or browsing the web. These prompts are queued and will only be displayed when you stop the activity or manually switch to another screen (like the main menu). The system interprets this to to mean it's ok to interrupt you.

If you are trying to add plug and play devices (or do other tasks that would normally display popup messages on the screen) but you are not seeing the messages (because you are watching a movie or browsing the web), you can simply switch screens to the main menu and the popup messages will then appear.



Technical Explanation for Developers

In the Screen table in the pluto_main database is a field AllowInterruptions, which by default is 1 ( or true). If it's left at the default, then when that screen is active on the orbiter and the orbiter gets a request to display an alert or change screens, it will always do it. If the setting for the screen is 0 (which it normally is for full-screen media screens like the dvd playback, live tv, etc.), then the following rules will be evaluated to see if the user should be interrupted.

First, Goto_Screen takes a Parameter #251 Interruption, which is defined in AllScreens.h:

enum eInterruption {interuptAlways=0, /* always interupt his activity and change screens */
	interuptNever=1, /* never interupt, only change the screen if the system is idle */
	interuptNoVideo=2, /* will interrupt a web browser but not a movie */
	interuptOnlyAudio=3 /* will not interrupt a web browser, only when audio is playing */
	};

This value can also be specified when using the pre-generated class helpers to do screen changes: DCE::Screen_[screen name].

If the interrupt is not interuptAlways, then the function OkayToInterrupt() in Orbiter.cpp will determine if it's okay to interrupt. If the answer is 'no', then it looks at another paramter to Goto_Screen: #253 Queue. If that parameter is 0, the screen change is lost. If it is 1, then if the screen doesn't change because of Interrupt rules, the screen change is added to a queue (m_listPendingGotoScreens) and the next time the screen changes the entries in the queue will be evaluated to see which ones are safe to do then. See Orbiter.cpp::ServiceInterruptionQueue()