DataSignal¶
-
class
NetworkSim.architecture.signal.
DataSignal
(size=1500, abstract=True)[source]¶ Constructor for data signals.
The user defines the bit length of the signal packet.
- Parameters
size (int, optional) – The packet size of the data signal, in bytes. Default is
1500
(12,000 bits).abstract (bool, optional) – The abstract mode of the data signals. If True, random binary packets will be generated. If False, abstract decimal packets will be generated as a list.
-
generate_packet
(seed=None)[source]¶ Data packet generation.
- Parameters
seed (int) – Randomisation seed.
- Returns
data_packet (str (If self.abstract == True)) – The data packet string in binary.
data_packet (list (If self.abstract == False)) – The data packet list in decimal, containing the following:
Node ID
Packet ID
Note that the abstract data packets are directly generated in the RAM class.