ME405 Library  Version 0.38
Python library in support of ME405 class
task_share.py File Reference

This file contains classes which allow tasks to share data without the risk of data corruption by interrupts. More...

Classes

class  task_share.BaseShare
 Base class for queues and shares which exchange data between tasks. More...
 
class  task_share.Queue
 A queue which is used to transfer data from one task to another. More...
 
class  task_share.Share
 An item which holds data to be shared between tasks. More...
 

Functions

def task_share.show_all ()
 Create a string holding a diagnostic printout showing the status of each queue and share in the system. More...
 

Variables

list task_share.share_list = []
 This is a system-wide list of all the queues and shared variables. More...
 
dictionary task_share.type_code_strings
 This dictionary allows readable printouts of queue and share data types. More...
 

Detailed Description

This file contains classes which allow tasks to share data without the risk of data corruption by interrupts.

Author
JR Ridgely
Date
2017-Jan-01 JRR Approximate date of creation of file
2021-Dec-18 JRR Docstrings changed to work without DoxyPyPy

It is intended for educational use only, but its use is not limited thereto. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ show_all()

def task_share.show_all ( )

Create a string holding a diagnostic printout showing the status of each queue and share in the system.

Returns
A string containing information about each queue and share

Variable Documentation

◆ share_list

list task_share.share_list = []

This is a system-wide list of all the queues and shared variables.

It is used to create diagnostic printouts.

◆ type_code_strings

dictionary task_share.type_code_strings
Initial value:
1 = {'b' : "int8", 'B' : "uint8",
2  'h' : "int16", 'H' : "uint16",
3  'i' : "int(?)", 'I' : "uint(?)",
4  'l' : "int32", 'L' : "uint32",
5  'q' : "int64", 'Q' : "uint64",
6  'f' : "float", 'd' : "double"}

This dictionary allows readable printouts of queue and share data types.