Editing Python Smart Terminal Technical Details

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:
  
 
= Some Thread Details =
 
= Some Thread Details =
 
+
!! document how the threads communicate, queue details .....
There are two threads set up in the application, one meant to communicate from the gui to the helper thread and one the other way around.  Queues are supposed to be thread save so we should be ok so far.  Thread processing is quite localized in the code so you should be able to check it out pretty easily: search for '''queue_to_helper''' and '''queue_fr_helper'''.  Generally what is posted to the queues is a tuple with three parts: (action, function, function_args ). In this tuple action is a string ( like "call"..."stop" )  function is a function reference, and function_args are arguments to the function.  Not all parts may be used for each action.  You should read the code to see what happens.
 
 
 
One example that exists at, this time of writing, is how the helper thread outputs to the gui thread since it is not supposed to interact with direct calls.  What happens is that the helper thread posts a tuple:  ( "info", None, ( "print me", ) ).  "info" indicates that the helper thread wants to post an "info message" to the gui. None indicates that there is no explicit function call involved ( it is implied in the action "info" and ("print me") is the data that is to be displayed.
 
 
 
This is all I will document for now because smaller detail may change.  Since the code is localized you should be able to figure out more details yourself, if no email me.
 
  
 
= Finding the Arduino - Comm Port Details =
 
= Finding the Arduino - Comm Port Details =

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)