PacketDiagram Class

A packet diagram: the fields of a network packet or of a register, drawn over their bits, in rows of PacketDiagram.BitsPerRow bits (Mermaid packet).

public sealed class PacketDiagram : Diagram
Inheritance
Diagram PacketDiagram

Constructors

NameDescription
PacketDiagram()

PacketDiagram()

PacketDiagram.cs
public PacketDiagram()

No documentation is available.

Properties

NameDescription
BitWidthGets or sets the width of a bit, in pixels. The default is 32.
BitsPerRowGets or sets the number of bits of a row. The default is 32.
DescendingBitOrderGets or sets a value that indicates whether each row is drawn from its highest bit on the left to its lowest on the right, as hardware registers are; otherwise, from its lowest bit, as network packets are (Mermaid bitOrder).
FieldsGets the fields, in the order of their bits. A field starts after the previous one.
RowHeightGets or sets the height of a row, in pixels. The default is 32.
ShowBitsGets or sets a value that indicates whether the numbers of the first and the last bits of the fields are drawn. The default is true.

Gets or sets the width of a bit, in pixels. The default is 32.

public double BitWidth { get; set; }

Property value

double

Gets or sets the number of bits of a row. The default is 32.

public int BitsPerRow { get; set; }

Property value

int

DescendingBitOrder

PacketDiagram.cs

Gets or sets a value that indicates whether each row is drawn from its highest bit on the left to its lowest on the right, as hardware registers are; otherwise, from its lowest bit, as network packets are (Mermaid bitOrder).

public bool DescendingBitOrder { get; set; }

Property value

bool

Gets the fields, in the order of their bits. A field starts after the previous one.

public IList<PacketField> Fields { get; }

Property value

IList<PacketField>

Gets or sets the height of a row, in pixels. The default is 32.

public double RowHeight { get; set; }

Property value

double

Gets or sets a value that indicates whether the numbers of the first and the last bits of the fields are drawn. The default is true.

public bool ShowBits { get; set; }

Property value

bool

Methods

NameDescription
AddField(int, DiagramText)Adds a field after the last one.

AddField(int, DiagramText)

PacketDiagram.cs

Adds a field after the last one.

public PacketField AddField(int bits, DiagramText label)

Parameters

bits int
The number of bits.
label DiagramText
The name of the field.

Returns

PacketField The field.