Public Member Functions | |
def | __init__ |
DataDistributorPoll constructor. | |
def | start |
Start the polling thread. | |
def | stop |
Stop the polling thread. | |
def | __poll |
Internal routine to drain the data distributor client socket. | |
def | receive |
Receive a sampled value of the data and sender information. | |
Private Attributes | |
__dataCopy |
Use of this class involves the starting of a thread that constantly receives the data arriving in the base class's socket. Keeping the socket drained of data allows the user of this class to get the most recent data received, thus avoiding getting data with a bursty time structure. Whenever the application calls the receive() method, it gets the most recent data sample. Because of the reference counting method used by Python objects, no copy of the data needs to be made to avoid the data changing from underneath the application. The application can hold onto the data reference as long as it likes. Whenever new data appears a new reference is created, and is possibly deleted before the application gets access to it, leaving any existing reference alone. When the application tries to get access to the latest data, it gets a copy of the most recent reference, and the previous reference is deleted, if it has gone out of scope.
Definition at line 28 of file DataDistributorPoll.py.
|
DataDistributorPoll constructor.
Definition at line 30 of file DataDistributorPoll.py. |
|
Internal routine to drain the data distributor client socket.
Definition at line 61 of file DataDistributorPoll.py. |
|
Receive a sampled value of the data and sender information.
Definition at line 69 of file DataDistributorPoll.py. |
|
Start the polling thread.
Definition at line 45 of file DataDistributorPoll.py. |
|
Stop the polling thread.
Definition at line 53 of file DataDistributorPoll.py. |
|
Definition at line 80 of file DataDistributorPoll.py. |