ScEpTIC.emulator.timers package
Submodules
ScEpTIC.emulator.timers.timer module
- class ScEpTIC.emulator.timers.timer.Timer(name, interrupt_signal, period=0, periodic=False)
Bases:
object
Generic timer (ignores mcu and energy status)
- check()
Checks if the timer has expired, triggers the associated interrupt, and restarts the timer if necessary
- restart()
Restart the timer
- set_period(period)
Updates the timer period :param period: period of the timer in seconds
- start()
Starts the timer if the period is positive
- stop()
Stops the timer
ScEpTIC.emulator.timers.timers_manager module
- class ScEpTIC.emulator.timers.timers_manager.TimersManager(vmstate)
Bases:
object
Timers manager For now, ScEpTIC supports timers under energy emulation mode and does not account for power off periods
- check_timers()
Check timers expiration
- create_timer(name, interrupt_signal, period=0, periodic=False)
Creates a new timer :param name: name of the timer :param interrupt_signal: interrupt signal to trigger when timer expires :param period: period of the timer in seconds :param periodic: whether the timer is periodic
- set_timer_period(name, period)
Sets the period of a given timer :param name: name of the time :param period: period of the timer in seconds
- start_timer(name)
Starts a given timer :param name: name of the timer
- stop_timer(name)
Stops a given timer :param name: name of the timer