Class w.c.s.c.ConnectionTracker(object):

Part of wader.common.statem.connection View In Hierarchy

I keep track of a connection for accounting purposes

I detect connection changes and will add usage items whenever a new connection mode change happens
Method __init__ Undocumented
Method set_conn_mode Sets the initial accounting mode
Method connection_started Call it to start tracking the connection stats
Method add_current_usage Adds the current usage statistics to the database
Method get_current_usage Undocumented
Method on_notification_received ConnectStateMachine will notify us of SIG_NEW_CONN_MODE notifications
def __init__(self):
Undocumented
def set_conn_mode(self, _mode):

Sets the initial accounting mode

Specially useful for devices with just one serial port that neither notify us of connection mode changes nor lets us monitor it
def connection_started(self):
Call it to start tracking the connection stats
def add_current_usage(self, restart=True):
Adds the current usage statistics to the database
def get_current_usage(self):
Undocumented
def on_notification_received(self, notification):
ConnectStateMachine will notify us of SIG_NEW_CONN_MODE notifications
API Documentation for wader-core, generated by pydoctor at 2008-08-27 16:53:37.