Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

11—Packet Format Editor

11 Packet Format Editor


Packet formats define the internal structure of packets as a set of fields. For
each field, the packet format specifies a unique name, a data type, a default
value, a size in bits, an encoding style, a conversion method, and optional
comments. Packet formats are referenced as attributes of transmitter and
receiver modules within node models, in calls to Kernel Procedures, and by the
Declare Packet Formats operation in the File menu of the Process Editor.

A packet format contains one or more fields, represented in the graphical


environment as a set of colored, rectangular boxes. The size of the box is
proportional to the number of bits specified in the “size” attribute.

Figure 11-1 Packet Format

Right-click on a packet field to open the Attributes dialog box for that field. In
addition to attributes, the dialog box contains buttons that allow you to add
comments to the packet field and edit the conversion method assigned to the
field.

In general, fields can be placed in any order and can be dragged from one row
to another as you like. Order does not matter because packet formats are
typically referenced by the field name. However, if your model references
packet fields by index, changing the graphic representation makes a big
difference. OPNET assigns an index of 0 to the top left field (in Figure 11-1,
“service type” has an index of 0) and the highest index to the bottom right field
(in Figure 11-1, “application_info” has an index of 23).

OPNET Modeler/Release 16.1 ER-11-1


11—Packet Format Editor

Menus
The Packet Format Editor provides several operations for creating and working
with packet formats. You access these operations from the Packet Format
Editor menu bar, which contains the following menus:

Table 11-1 Packet Format Editor Menus


Menu Description Reference

File Contains operations that relate to high-level File Menu on page ER-2-2
functions such as opening and closing
projects, saving scenarios, importing models,
and printing graphics and reports.

Edit Contains operations that allow you to edit the Edit Menu on page ER-2-5
preferences that control program operation
and to manipulate text and objects

Fields Contains operations that add fields to a Fields Menu on


packet format page ER-11-3

Interfaces Contains operations that allow you to edit the Interfaces Menu on
packet format attributes page ER-11-3

Windows Lists all open editor windows and allows you Windows Menu on
to make one active page ER-2-7

Help Provides access to context-sensitive help, Help Menu on page ER-2-8


the product documentation and tutorials, and
information about the program

Note—The editor menus on your machine may vary from those described here,
particularly if there has been any UI customization or use of ETS.

The following sections list the items in the Packet Format Editor menus and give
a reference to where you can get more information about each operation:

• Fields Menu on page ER-11-3

• Interfaces Menu on page ER-11-3

ER-11-2 OPNET Modeler/Release 16.1


11—Packet Format Editor

Fields Menu
The Fields menu contains an operation that adds fields to a packet format.

Table 11-2 Fields Menu Summary


Menu item Description Reference

Create Field Creates a new field within the packet. Create Field on
page ER-11-5

Interfaces Menu
The Interfaces menu includes operations that enable you to edit the packet
format’s interfaces.

Table 11-3 Interfaces Menu Summary


Menu item Description Reference

Packet Interfaces Opens a dialog box for specifying —


packet-level attributes.

Model Documentation Opens an edit pad in which you can Model Documentation
enter comments about the packet format on page ER-11-6

Binary Conversion Specifies whether conversion to/from Binary Conversion on


value vector form is supported and page ER-11-6
provides information about how
conversion should be done.

OPNET Modeler/Release 16.1 ER-11-3


11—Packet Format Editor

Toolbar Buttons
The Packet Format Editor has toolbar buttons for frequently-used operations.

Figure 11-2 Toolbar Buttons (Packet Format Editor)

1 2

Table 11-4 lists the name of each toolbar button—the name appears as a tooltip
when you rest the cursor on the button—and its equivalent menu command. To
configure the toolbar buttons, see Configuring the Toolbar on page ER-1-7.

Table 11-4 Toolbar Buttons in the Packet Format Editor


Button Name in the Toolbar Equivalent Menu Command

1 Create New Field Fields > Create Field

2 Edit Packet Format Attributes Interfaces > Packet Interfaces

ER-11-4 OPNET Modeler/Release 16.1


11—Packet Format Editor

Fields Menu Operations


This section contains descriptions and procedures for using the operations
available from the Fields Menu of the Packet Format Editor.

Create Field
This operation creates a new field within the current packet format. Fields are
represented graphically as colored, rectangular boxes. Right-click on a field to
display the Attributes dialog box for that field. Each field within a packet has
several attributes:

• Name—a user selected string

• Type—can be integer, floating point, structure, packet, information, integer


(64 bit), packet ID, or object ID

• Encoding—specifies binary encoding for integer and floating point field


values. Can be signed big endian, unsigned big endian, signed little endian,
unsigned little endian, or other

• Size—measured in bits

• Default Value—used to specify a numerical value for integer and floating


point fields, or a bulk fill pattern for information fields

• Set At Creation—if set, the value specified in Default Value is assigned to the
field at the packet’s creation; if unset, no value is assigned to the field at
packet creation

• Conversion Method—specifies the packet field conversion method to be


used to convert this field to and from value vector (vvec) form at simulation
time

• Color—the color in which to display the field

• Conversion Order—specifies the order in which the fields will be converted


to value vector form

For more information about packet fields, see Packet Format Editor on
page MC-1-46.

OPNET Modeler/Release 16.1 ER-11-5


11—Packet Format Editor

Interfaces Menu Operations


This section contains descriptions and procedures for using the operations
available from the Interfaces Menu of the Packet Format Editor.

Binary Conversion
This operation enables you to specify whether the packet format supports
conversion to and from value vector form. If conversion is supported, you can
specify a bulk fill pattern and conversion method.

Model Documentation
This operation enables you to add comments to a packet format. These
comments can describe the format’s intended use and give a user any other
information that may be useful.

ER-11-6 OPNET Modeler/Release 16.1

You might also like