Package aisutils :: Module normalize :: Class Normalize
[hide private]
[frames] | no frames]

Class Normalize

source code

Queue.Queue --+
              |
             Normalize

Provide a channel that normalizes messages. Try to model it like a Queue.

Instance Methods [hide private]
 
__init__(self, maxsize=0, ttl=30, verbose=False)
param ttl: number of seconds that a message fragment can live
source code
 
cull(self)
Drop messages older than the ttl
source code
 
put(self, uscgNmeaStr, block=True, timeout=None)
Put an item into the queue.
source code

Inherited from Queue.Queue: empty, full, get, get_nowait, join, put_nowait, qsize, task_done

Inherited from Queue.Queue (private): _empty, _full, _get, _init, _put, _qsize

Method Details [hide private]

__init__(self, maxsize=0, ttl=30, verbose=False)
(Constructor)

source code 

param ttl: number of seconds that a message fragment can live

Overrides: Queue.Queue.__init__

put(self, uscgNmeaStr, block=True, timeout=None)

source code 

Put an item into the queue.

If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Full exception if no free slot was available within that time. Otherwise ('block' is false), put an item on the queue if a free slot is immediately available, else raise the Full exception ('timeout' is ignored in that case).

Overrides: Queue.Queue.put
(inherited documentation)