Skip to content

Packet Diagram Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/PacketDiagramConfig

包含特定于数据包图的配置的对象。

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

PacketDiagramConfig Type ​

object (Packet Diagram Config)

all of

PacketDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
rowHeightnumberOptionalcannot be nullMermaid Config
bitWidthnumberOptionalcannot be nullMermaid Config
bitsPerRownumberOptionalcannot be nullMermaid Config
showBitsbooleanOptionalcannot be nullMermaid Config
bitOrderstringOptionalcannot be nullMermaid Config
paddingXnumberOptionalcannot be nullMermaid Config
paddingYnumberOptionalcannot be nullMermaid Config

rowHeight ​

数据包图中每行的高度。

rowHeight

rowHeight Type ​

number

rowHeight Constraints ​

minimum: the value of this number must greater than or equal to: 1

rowHeight Default Value ​

The default value is:

json
32

bitWidth ​

数据包图中每个位的宽度。

bitWidth

bitWidth Type ​

number

bitWidth Constraints ​

minimum: the value of this number must greater than or equal to: 1

bitWidth Default Value ​

The default value is:

json
32

bitsPerRow ​

每行显示的位数。

bitsPerRow

bitsPerRow Type ​

number

bitsPerRow Constraints ​

minimum: the value of this number must greater than or equal to: 1

bitsPerRow Default Value ​

The default value is:

json
32

showBits ​

切换以显示或隐藏位编号。

showBits

showBits Type ​

boolean

showBits Default Value ​

The default value is:

json
true

bitOrder ​

每一行编号的方向。descending 会镜像每一行,所以从该行的最高位在左到最低位在右阅读,这是硬件寄存器使用的惯例。字段仍然是从最低位开始声明,并保持它们的宽度。

bitOrder

bitOrder Type ​

string

bitOrder Constraints ​

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"ascending"Number each row from its lowest bit on the left up to its highest bit on the right.
"descending"Number each row from its highest bit on the left down to its lowest bit on the right.

bitOrder Default Value ​

The default value is:

json
"ascending"

paddingX ​

一行中块之间的水平填充。

paddingX

paddingX Type ​

number

paddingX Constraints ​

minimum: the value of this number must greater than or equal to: 0

paddingX Default Value ​

The default value is:

json
5

paddingY ​

行之间的垂直填充。

paddingY

paddingY Type ​

number

paddingY Constraints ​

minimum: the value of this number must greater than or equal to: 0

paddingY Default Value ​

The default value is:

json
5
Opens in mermaid.ai