py_canoe.core.simulation.Simulation

The Simulation object represents CANoe's measurement functions in the Simulation mode. With the help of the Simulation object you can control the system time from an external source during the measurement. CANoe automatically goes into Slave mode at the measurement start if you access the Simulation object.

Source code in src\py_canoe\core\simulation.py
29
30
31
32
def __init__(self, app: 'Application', enable_events: bool = False):
    self.com_object = app.com_object.Simulation
    if enable_events:
        win32com.client.WithEvents(self.com_object, SimulationEvents)

animation property writable

Return the current animation speed of the simulation. The value is a float between 0 and 1, where 0 means no animation and 1 means full animation speed.

current_time property

Return the current simulation time in ticks. The value is an integer representing the number of ticks since the start of the simulation.

current_time_high property

Return the high part of the current simulation time in ticks. The value is an integer representing the high part of the number of ticks since the start of the simulation.

notification_type property writable

Return the current notification type of the simulation. The value is an integer representing the notification type.

increment_time(ticks)

Increment the simulation time by the specified number of ticks.

Source code in src\py_canoe\core\simulation.py
64
65
66
def increment_time(self, ticks: int):
    """Increment the simulation time by the specified number of ticks."""
    self.com_object.IncrementTime(ticks)

increment_time_and_wait(ticks)

Increment the simulation time by the specified number of ticks and wait for the simulation to process the time increment.

Source code in src\py_canoe\core\simulation.py
68
69
70
def increment_time_and_wait(self, ticks: int):
    """Increment the simulation time by the specified number of ticks and wait for the simulation to process the time increment."""
    self.com_object.IncrementTimeAndWait(ticks)