TT

class NetworkSim.simulation.process.transmitter.TT(env, ram, transmitter_id, simulator, until, model=None)[source]

Tunable transmitter simulator.

Parameters
  • env (simpy Environment) – The simulation environment.

  • ram (RAM) – The RAM at which the transmitter access its information.

  • transmitter_id (int) – The transmitter ID.

  • model (Model, optional) – The network model used for the simulation. Default is Model().

Variables
  • transmitted_data_packet_df (pandas DataFrame) –

    A DataFrame keeping the information of the transmitted data packets, containing the columns:

    • Timestamp

    • Raw Packet

    • Destination ID

  • transmitted_control_packet_df (pandas DataFrame) –

    A DataFrame keeping the information of the transmitted control packets, containing the columns:

    • Timestamp

    • Raw Packet

    • Destination ID

get_tuning_delay()[source]

Function to calculate delay time required to tune from one data ring to another so that the transmission is in sync with the reception on the specific data rings.

Returns

tuning_delay – A n by n float array of tuning delays. The row index represents the current ring ID while the column index represents the target ring ID, where n is the total number of nodes/data rings in the network.

Return type

float array

transmit_on_data_ring()[source]

Tunable Transmitter process to add a new data packet onto the target ring.

In this process:

  1. The first data packet in the RAM queue is popped;

  2. The transmitter is tuned to the target ring

  3. Wait for correct timing to transmit

  4. The data packet is added onto its respective ring.