Heartbeat

class simframe.frame.Heartbeat(updater=None, systole=None, diastole=None)[source]

Bases: object

This class controls an update including systole and diastole.

A full cardiac cycle constists of a systole operation, the actual update and a systole operation. All three are of type Updater.

The beat function calls systole, updater, diastole in that order and returns the return value of the updater. Any positional or keyword arguments are only passed to the updater, NOT to systole and diastole.

Attributes:
diastole

Updater that is called at the end of the cardiac cycle.

systole

Updater that is called in the beginning of cardiac cycle.

updater

Updater that is performing the update instruction.

Methods

beat(owner, *args[, Y])

This method executes systole, updater, and distole in that order and returns the return value of the updater.

Attributes Summary

diastole

Updater that is called at the end of the cardiac cycle.

systole

Updater that is called in the beginning of cardiac cycle.

updater

Updater that is performing the update instruction.

Methods Summary

beat(owner, *args[, Y])

This method executes systole, updater, and distole in that order and returns the return value of the updater.

Attributes Documentation

diastole

Updater that is called at the end of the cardiac cycle.

systole

Updater that is called in the beginning of cardiac cycle.

updater

Updater that is performing the update instruction.

Methods Documentation

beat(owner, *args, Y=None, **kwargs)[source]

This method executes systole, updater, and distole in that order and returns the return value of the updater.

Parameters:
  • owner (Frame) – Parent frame object to which updater belongs

  • Y (Field, optional, default : None) – Field that should be updated

Notes

*args and **kwargs are only passed to updater, NOT to systole and diastole

Returns:

ret

Return type:

Return value of updater.