メインコンテンツ

generate

Class: wnet.Traffic
Namespace: wnet

Generate application data packet

Since R2026a

Description

dt = generate(trafficConfiguration) returns the time remaining until the next packet generation for the specified configuration object trafficConfiguration.

dt = generate(trafficConfiguration,elapsedTime) specifies the time elapsed elapsedTime, since the previous call of this method.

[dt,packetSize] = generate(___) returns the size of the current packet packetSize using any combination of input arguments from previous syntaxes.

[dt,packetSize,packet] = generate(___) returns the generated application traffic packet.

Input Arguments

expand all

Configuration object for generating traffic packet, specified as an object of a subclass of wnet.Traffic class.

Time elapsed, in milliseconds, since the previous call of this method, specified as a nonnegative scalar.

Data Types: double

Output Arguments

expand all

Time remaining until next packet generation, in milliseconds, to generate the next packet, returned as a nonnegative scalar.

Data Types: double

Size of the current packet, in bytes, returned as a positive scalar.

Data Types: double

Application data packet, returned as a column vector of integers in the range [0, 255].

Data Types: double

Version History

Introduced in R2026a