Package sysmon :: Module system :: Class SystemPart
[hide private]
[frames] | no frames]

Class SystemPart

source code

Known Subclasses:

Represents a part of a system.

Instance Methods [hide private]
 
__init__(self) source code
 
update(self)
Performs an update of the part's information.
source code
 
callback(self) source code
 
do_update(self)
Perform the actual update.
source code
 
set_delay(self, delay)
Sets the delay between updates.
source code
 
delay(self)
Returns the current delay between updates.
source code
 
set_system(self, system)
Sets the system that this part is in.
source code
 
system(self) source code
Static Methods [hide private]
 
null()
Returns a null part to be used when no real part is available.
Method Details [hide private]

update(self)

source code 

Performs an update of the part's information.

This method is called periodically (depending on the delay setting), so there is ordinarily no reason to call it from outside of the system.

do_update(self)

source code 

Perform the actual update.

Part implementations should override this method.

set_system(self, system)

source code 

Sets the system that this part is in.

A part may only be in one system at once - if a part is in two systems at once IRL, it may be best to have a representation of it in each system, or to make it its own system.