2020LOGGER = logging .getLogger (__name__ )
2121
2222
23- class SlaveScheduler (BaseScheduler ):
24- """A slave scheduler which orchestrates nested tickit simulations."""
23+ class NestedScheduler (BaseScheduler ):
24+ """A scheduler which orchestrates nested tickit simulations."""
2525
2626 def __init__ (
2727 self ,
@@ -31,7 +31,7 @@ def __init__(
3131 expose : Dict [PortID , ComponentPort ],
3232 raise_interrupt : Callable [[], Awaitable [None ]],
3333 ) -> None :
34- """Slave scheduler constructor which adds wiring and saves values for reference.
34+ """NestedScheduler constructor which adds wiring and saves values for reference.
3535
3636 Args:
3737 wiring (Union[Wiring, InverseWiring]): A wiring or inverse wiring object
@@ -40,10 +40,10 @@ def __init__(
4040 by the component.
4141 state_producer (Type[StateProducer]): The state producer class to be used
4242 by the component.
43- expose (Dict[PortID, ComponentPort]): A mapping of slave scheduler
43+ expose (Dict[PortID, ComponentPort]): A mapping of nested scheduler
4444 outputs to internal component ports.
4545 raise_interrupt (Callable[[], Awaitable[None]]): A callback to request that
46- the slave scheduler is updated immediately.
46+ the nested scheduler is updated immediately.
4747 """
4848 wiring = self .add_exposing_wiring (wiring , expose )
4949 super ().__init__ (wiring , state_consumer , state_producer )
@@ -57,22 +57,22 @@ def add_exposing_wiring(
5757 wiring : Union [Wiring , InverseWiring ],
5858 expose : Dict [PortID , ComponentPort ],
5959 ) -> InverseWiring :
60- """Adds wiring to expose slave scheduler outputs.
60+ """Adds wiring to expose nested scheduler outputs.
6161
62- Adds wiring to expose slave scheduler outputs, this is performed creating a
62+ Adds wiring to expose nested scheduler outputs, this is performed creating a
6363 mock "expose" component with inverse wiring set by expose.
6464
6565 Args:
6666 wiring (Union[Wiring, InverseWiring]): A wiring or inverse wiring object
6767 representing the connections between components in the system.
68- expose (Dict[PortID, ComponentPort]): A mapping of slave scheduler
68+ expose (Dict[PortID, ComponentPort]): A mapping of nested scheduler
6969 outputs to internal component ports.
7070
7171 Returns:
7272 InverseWiring:
7373 An inverse wiring object representing the connections between
7474 components in the system and the "expose" component which acts as the
75- slave scheduler output.
75+ nested scheduler output.
7676 """
7777 if isinstance (wiring , Wiring ):
7878 wiring = InverseWiring .from_wiring (wiring )
@@ -109,7 +109,7 @@ async def on_tick(
109109
110110 An asynchronous method which determines which components within the simulation
111111 require being woken up, sets the input changes for use by the "external" mock
112- component, performs a tick, determines the period in which the slave scheduler
112+ component, performs a tick, determines the period in which the nested scheduler
113113 should next be updated, and returns the changes collated by the "expose" mock
114114 component.
115115
@@ -122,7 +122,7 @@ async def on_tick(
122122 Tuple[Changes, Optional[SimTime]]:
123123 A tuple of a mapping of the changed exposed outputs and their new
124124 values and optionally a duration in simulation time after which the
125- slave scheduler should be called again.
125+ nested scheduler should be called again.
126126 """
127127 wakeup_components = {
128128 component for component , when in self .wakeups .items () if when <= time
@@ -163,7 +163,7 @@ async def schedule_interrupt(self, source: ComponentID) -> None:
163163 async def handle_component_exception (self , message : ComponentException ) -> None :
164164 """Handle exceptions raised from components by shutting down the simulation.
165165
166- If a component inside a system simulation produces an exception, the slave
166+ If a component inside a system simulation produces an exception, the nested
167167 scheduler will produce a message to all components it contains to cause them
168168 to cancel any running component tasks (adapter tasks). Afterwards the scheduler
169169 stores the ComponentException message, allowing its associated system simulation
0 commit comments