ME 305 Group 6 Documentation
Public Member Functions | List of all members
shares_05.Share_05 Class Reference

A standard shared variable. More...

Public Member Functions

def __init__ (self, initial_value=None, initial_payload=None)
 Constructs a shared variable. More...
 
def write (self, item)
 Updates the value of the shared variable. More...
 
def read (self)
 Access the value of the shared variable. More...
 
def storeData (self, payload)
 Updates the payload value of the shared variable. More...
 
def readData (self)
 Access the payload value of the shared variable. More...
 

Detailed Description

A standard shared variable.

Values can be accessed with read() or changed with write()

Constructor & Destructor Documentation

◆ __init__()

def shares_05.Share_05.__init__ (   self,
  initial_value = None,
  initial_payload = None 
)

Constructs a shared variable.

Parameters
initial_valueAn optional initial value for the shared variable.
initial_payloadAn optional value for the second data store variable.

Member Function Documentation

◆ read()

def shares_05.Share_05.read (   self)

Access the value of the shared variable.

Returns
The value of the shared variable

◆ readData()

def shares_05.Share_05.readData (   self)

Access the payload value of the shared variable.

Returns
The payload value of the shared variable

◆ storeData()

def shares_05.Share_05.storeData (   self,
  payload 
)

Updates the payload value of the shared variable.

Parameters
payloadThe new payload for the shared variable

◆ write()

def shares_05.Share_05.write (   self,
  item 
)

Updates the value of the shared variable.

Parameters
itemThe new value for the shared variable

The documentation for this class was generated from the following file: