usingthreading module¶
The trial of the pendulum code Started 12 Nov 2019 by Keita Mouhamed Moustapha
-
usingthreading.
Thread_send_polling
(LorenzSerials)¶ To send command by Speed Optimized Polling Mode with threading
-
usingthreading.
caller
(func, args)¶ Second caller funtion for TASKS list Calls the function passed to the TASKS list
- Parameters
function_name – (function) function to be called
args – (tuple) parameters
- Returns
result
-
usingthreading.
callerstar
(args)¶ First caller function for TASKS list Accepts a tuple of two args parameters
- Parameters
args – (object) LorenzSerial object
args – (int) a = 0 by default
- Returns
(function) caller function
-
usingthreading.
createLorenzSerials
(LorenzCOM)¶ Create a list of lorenz serial handles from the found COMs :param LorenzCOM: (List of COMs) found lorenz COMs
-
usingthreading.
findLorenz
(portsFound)¶ Find the Lorenz sensors’ COM from the available serial ports
- Parameters
portsFound – (list of objects) detected serial ports
- Returns
(list of COMs) found lorenz COMs
-
usingthreading.
get_ports
()¶ Get all available ports
- Returns
(list of objects) detected serial ports
-
usingthreading.
orderd_Thread_send_polling
(lock, LorenzSerial)¶ To send command by Speed Optimized Polling Mode with threading
-
usingthreading.
ordered_threading
()¶ Call the orderd_Thread_send_polling for threading
-
usingthreading.
process_send_rand
(LorenzSerial, a)¶ Gets sensor values from the Lorenz sensor
- Parameters
args – (object) LorenzSerial object
args – (int) a = 0 by default
- Returns
(int) sensor value
-
usingthreading.
send_polling
(LorenzSerials)¶ Gets sensor values from the Lorenz sensor and print the values on the console
- Parameters
LorenzSerials – (list of objects) LorenzSerials objects
- Returns
(int) sensor value
-
usingthreading.
test_ordered_pool
()¶ Start polling values from the sensors in parallel but with multiple methods
- Parameters
core_number – (int) number of cores to use for parallel processing by default = 4
- Returns
(list of int) four sensor values