Discrete Time Worker
feral3gp.feral.get_discrete_time_director()
¶
Returns:
Type | Description |
---|---|
The predefined discrete time director of the simulation |
Source code in feral3gp/feral/core/simulation.py
58 59 60 61 62 |
|
feral3gp.feral.set_step_size(duration_in_nanos=JSimulationTime.ms(1))
¶
Set the step size of the preconfigured discrete time director. The default step size is 1 millisecond
Source code in feral3gp/feral/core/simulation.py
51 52 53 54 55 |
|
feral3gp.feral.TimeTriggeredWorker
¶
Bases: JavaDelegate
Time Triggered Workers integrate discrete time behavior/simulation models into a FERAL simulation.
Source code in feral3gp/feral/core/dt_worker.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
create_input_port(port_name)
¶
Create a RxPort with a given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port_name
|
The name of the port |
required |
Returns:
Type | Description |
---|---|
RxPortDiscreteTime
|
The created RxPort |
Source code in feral3gp/feral/core/dt_worker.py
49 50 51 52 53 54 55 |
|
create_output_port(port_name)
¶
Create a TxPort with a given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port_name
|
The name of the port |
required |
Returns:
Type | Description |
---|---|
The created TxPort |
Source code in feral3gp/feral/core/dt_worker.py
57 58 59 60 61 62 63 |
|
get_console()
¶
Returns:
Type | Description |
---|---|
The console of this worker |
Source code in feral3gp/feral/core/dt_worker.py
95 96 97 98 99 |
|
get_input_port(port_name)
¶
Get a RxPort with a given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port_name
|
The name of the port |
required |
Returns:
Type | Description |
---|---|
The RxPort |
Source code in feral3gp/feral/core/dt_worker.py
65 66 67 68 69 70 71 |
|
get_input_ports()
¶
Get all RxPorts of this worker.
Returns:
Type | Description |
---|---|
The RxPorts |
Source code in feral3gp/feral/core/dt_worker.py
73 74 75 76 77 78 |
|
get_output_port(port_name)
¶
Get a TxPort with a given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port_name
|
The name of the port |
required |
Returns:
Type | Description |
---|---|
The TxPort |
Source code in feral3gp/feral/core/dt_worker.py
80 81 82 83 84 85 86 |
|
get_output_ports()
¶
Get all TxPorts of this worker.
Returns:
Type | Description |
---|---|
The TxPorts |
Source code in feral3gp/feral/core/dt_worker.py
88 89 90 91 92 93 |
|
get_simulation_duration()
¶
Returns:
Type | Description |
---|---|
The simulation duration time in nanoseconds |
Source code in feral3gp/feral/core/dt_worker.py
43 44 45 46 47 |
|
get_simulation_time()
¶
Returns:
Type | Description |
---|---|
The current simulation time in nanoseconds |
Source code in feral3gp/feral/core/dt_worker.py
37 38 39 40 41 |
|
initialize()
¶
This method will be called by the controlling MOCC during the initialization phase of the simulation.
Source code in feral3gp/feral/core/dt_worker.py
25 26 27 28 29 |
|
set_console(console)
¶
Set the console for this worker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
console
|
The console to be set |
required |
Source code in feral3gp/feral/core/dt_worker.py
101 102 103 104 105 106 |
|
terminate()
¶
This method will be called by the controlling MOCC during the termination phase of the simulation.
Source code in feral3gp/feral/core/dt_worker.py
31 32 33 34 35 |
|
time_step()
¶
Execution of a time step. This method is called by the controlling MOCC with the defined step width.
Source code in feral3gp/feral/core/dt_worker.py
19 20 21 22 23 |
|