qns.entity.timer package
Submodules
qns.entity.timer.timer module
- class qns.entity.timer.timer.Timer(name: str, start_time: float, end_time: float = 0, step_time: float = 1, trigger_func=None)[source]
Bases:
qns.entity.entity.Entity
A Timer is an Entity that trigger the function trigger_func one-shot or periodically.
- install(simulator: qns.simulator.simulator.Simulator) None [source]
install
is called beforesimulator
runs to initialize or set initial events- Parameters
simulator (qns.simulator.simulator.Simulator) – the simulator
- class qns.entity.timer.timer.TimerEvent(timer: qns.entity.timer.timer.Timer, t: Optional[qns.simulator.ts.Time] = None, name: Optional[str] = None, by: Optional[Any] = None)[source]
Bases:
qns.simulator.event.Event
TimerEvent is the event that triggers the Timer’s trigger_func
Module contents
- class qns.entity.timer.Timer(name: str, start_time: float, end_time: float = 0, step_time: float = 1, trigger_func=None)[source]
Bases:
qns.entity.entity.Entity
A Timer is an Entity that trigger the function trigger_func one-shot or periodically.
- install(simulator: qns.simulator.simulator.Simulator) None [source]
install
is called beforesimulator
runs to initialize or set initial events- Parameters
simulator (qns.simulator.simulator.Simulator) – the simulator