Main Content

slrealtime.createEthernetPacketBusObj

Created Ethernet packet bus object

Since R2022a

Description

slrealtime.createEthernetPacketBusObj(dataLength) creates a bus object to use with the Ethernet Receive block and the Ethernet Send block.

If a bus object with the name already exists, it is assumed to contain the Length and Data elements and the object is updated such that the size of the Data element is set to the maximum of the existing size and the dataLength argument

example

Examples

collapse all

To create a Simulink.Bus object named Ethernet_Packet that has bus elements:

  • Data: DataType: 'uint8' Size: dataLength x 1

  • Length: DataType: 'uint16' Size: 1

slrealtime.createEthernetPacketBusObj(16);

Input Arguments

collapse all

The dataLength selects the number of bytes in the Ethernet packet.

Example: 16

Data Types: uint16

Version History

Introduced in R2022a