首页 > 其他分享 >4. 格式约定(Format conventions)

4. 格式约定(Format conventions)

时间:2024-08-22 09:27:46浏览次数:5  
标签:number Format octet MAC conventions field PHY 格式 bit

4. Format conventions 格式约定

笔记:

  1. 把待传输的数据当成C语言的结构体:
    • 低字节先行
    • 字节中的低位先行

4.1. General

Throughout this standard, unless otherwise stated, data structures exposed in interfaces are represented using the conventions and formats defined in this clause.

NOTE—It is important to note that interfaces are depicted in this standard as bit serial by convention but can be implemented in other forms, e.g., 4- or 8-bit parallel. 8
注——重要的是要注意,按照惯例,本标准中的接口被描述为位串行,但也可以以其他形式实现,例如4位或8位并行。

Within the PHY, data structures are passed to the reference modulator input in bit-serial convention. PHY specific coding may change the bit-order and encode multiple information bits into symbols. Hence the over-the-air interface may express the data structure content in a manner different than the conventions defined here.
在PHY内,数据结构以位串行约定传递给参考调制器输入。PHY特定编码可以改变比特顺序,并将多个信息比特编码为符号。因此,空中接口可以以与这里定义的约定不同的方式表示数据结构内容。

After all applicable expansion, the size of a MAC frame shall be less than the maximum PHY service data unit (PSDU) size supported by the PHY in use.
在所有适用的扩展之后,MAC帧的大小应小于所用PHY支持的最大PHY服务数据单元(PSDU)大小。

传输的时候是低字节的低位在前,然后是高字节;

这个和C语言的struct定义的结构体是一致的,低字节的低位在前

4.2. Fields 字段

Fields are concatenated into larger data structures, e.g., Figure 4-1 represents a data structure with 3 fields of
length 2 octets, 6 bits and 2 bits for a total size of 3 octets.
字段被连接成更大的数据结构,例如,图4-1表示一个3个字段的数据结构:其中长度为2个八位字节、6位和2位,总大小为3个八位位组。

4.3. Numbers 数字

Numbers are represented in decimal (nnn), binary (0bnnn), or hexadecimal (0xnnn) notation with the
number of digits indicated. For example, 0b001 is a 3 digit binary number of value 1 and 0x001 is a 3-digit
hexadecimal number of value 1. Numbers encoded in fields are either signed or unsigned integers unless
explicitly defined otherwise. Other formats (e.g., a field containing a floating point number) are stated in the
field definition where applicable.
数字以十进制(nnn)、二进制(0bnnn)或十六进制(0xnnn)表示法表示,并注明数字位数。例如,0b001是一个3位二进制数,值为1,0x001是一个三位十六进制数,值也为1。除非另有明确定义,否则字段中编码的数字要么是有符号整数,要么是无符号整数。在适用的情况下,字段定义中会说明其他格式(例如,包含浮点数的字段)。

When represented in fields, numbers are expressed with LSB leftmost and MSB rightmost as shown in
Figure 4-2 for an n-bit unsigned integer. (Note that this is the inverse of the number representations 0bnnn
and 0xnnn and of common number representations used in mathematical notations.) For example, the
number 0x47 would be represented in an 8-bit field as 1110 0010.
当在字段中表示时,对于n位无符号整数,数字用最左侧的LSB和最右侧的MSB表示,如图4-2所示。(请注意,这是数字表示0bnnn和0xnnn以及数学符号中常用数字表示的逆。)例如,数字0x47在8位字段中表示为1110 0010。

Numbers of size greater than 1 octet occur with the octet containing the least significant bits first (leftmost) followed by octets containing bits of increasing significance to the right.
大小大于1个八位字节的数字出现在首先包含最低有效位的八位字节(最左侧)之后,然后是包含右侧重要性递增位的八位数。

Unless otherwise stated in the definition of a field, a number in a field shall be formatted as an unsigned integer.
除非字段定义中另有说明,否则字段中的数字应格式化为无符号整数。

4.4. Strings

A string of length k bits is represented as a bit sequence numbered from 0 to k – 1. Bit 0 occurs first and is represented as the leftmost bit of a string field. Bit 1 occurs to the right of bit 0 and so on until bit (k – 1). This is illustrated in Figure 4-3.
长度为k位的字符串表示为从0到k-1编号的位序列。位0首先出现,表示为字符串字段的最左侧位。位1出现在位0的右侧,以此类推,直到位(k-1)如图4-3所示。

A string of length greater than 1 octet is represented by the octet containing the lowest numbered bits first and leftmost, followed by octets containing increasing bit numbers to the right.
长度大于1个八位字节的字符串由首先和最左侧包含最低编号比特的八位字节表示,然后是右侧包含递增比特数的八位位组。

4.5. Transmission order

4.5.1. General

For every address field, the bit transmission order shall be performed from the right most octet (RMO) to the left most octet (LMO) in the field, and inside an octet from the LSB to the MSB.
对于每个地址字段,比特传输顺序应从字段中最右侧的八位字节(RMO)到最左侧的八位比特(LMO)执行,并在一个八位字节内从LSB到MSB执行。

Figure 4-4 shows the MAC Address field containing a 64-bit MAC address. For this example the MAC address value is assumed to be AC-DE-64-23-45-67-89-01.
图4-4显示了包含64位MAC地址的MAC地址字段。对于该示例,假设MAC地址值为AC-DE-64-23-45-67-89-01。

4.5.2. Vendor OUI transmission order

Vendor organizationally unique identifier (OUI) bit transmission order shall be performed from the right most octet (RMO) to the leftmost octet (LMO) in the field, and inside an octet from the LSB to the MSB.
供应商组织唯一标识符(OUI)比特传输顺序应从字段中最右侧的八位字节(RMO)到最左侧的八位位组(LMO)执行,并在从LSB到MSB的八位元组内执行。

Figure 4-6 shows the Vendor OUI field. For this example, the vendor OUI field value is assumed to be AC-DE-64.
图4-6显示了供应商OUI字段。对于这个例子,假设供应商OUI字段值为AC-DE-64。

标签:number,Format,octet,MAC,conventions,field,PHY,格式,bit
From: https://www.cnblogs.com/qiyuexin/p/18373041

相关文章

  • df['料品分类'].apply(format_value) 是一个 Pandas 操作,用于对 DataFrame 中的 '料品
    df['料品分类'].apply(format_value)是一个Pandas操作,用于对DataFrame中的'料品分类'列的每个值应用一个名为format_value的函数,并将处理后的结果返回给这一列。分解解释df['料品分类']:这部分代码选择DataFramedf中名为'料品分类'的列。df是一个PandasDat......
  • 重装系统时硬盘无法格式化怎么办
    经常有客户来电,做好的u盘,装系统到硬盘的环节提示格式化,但格式化不了。在微软的操作系统重装过程中,按下Shift+F10可以唤出命令提示符(CMD),这是为了提供更多的修复和诊断功能。在系统安装过程中,操作系统的安装程序通常会启动一个轻量级的环境,允许用户在安装之前进行各种操作。1......
  • ffmpeg批量mov转换mp4格式脚本
    vim convertMP4.sh 输入脚本:#!/bin/bash#检查是否提供了输入目录路径if[-z"$1"];thenecho"Usage:$0<input_directory>"exit1fi#获取输入目录路径input_directory="$1"#检查输入目录是否存在if[!-d"$input_directory"];......
  • 图片格式
    https://www.zamzar.com/‌‌JPG:‌特点‌:有损压缩,适合用于照片和需要高压缩比的场景。JPG文件通常比其他文件格式更小。‌应用场景‌:广泛应用于网页、社交媒体和电子设备中,适合分享和存储大量照片。优点:文件大小较小;适合储存照片和其他复杂图像。缺点:不支持透明度,可能会在......
  • Python字符串格式化:%和.format
    Python中字符串格式化主要有两种方式:使用%操作符(也称为旧式或C风格的字符串格式化)和使用.format()方法(也称为新式字符串格式化)。每种方法都有其用途和优缺点,但在现代Python代码中,推荐使用.format()方法或更现代的f-strings(Python3.6+)。不过,了解%和.format()方法......
  • FileTypeUtil.java 文件格式util
    //文件格式Utilpackagecom.lgq.ai.Util;importjava.util.Arrays;publicclassFileTypeUtil{publicstaticintfileType(StringfileName){if(!StringUtil.isEmpty(fileName)){StringfileType=fileName.split("\\.")[1];......
  • TopoJSON格式详解,写入读取TopoJSON示例
    还是大剑师兰特:曾是美国某知名大学计算机专业研究生,现为航空航海领域高级前端工程师;CSDN知名博主,GIS领域优质创作者,深耕openlayers、leaflet、mapbox、cesium,canvas,webgl,echarts等技术开发,欢迎加底部微信(gis-dajianshi),一起交流。No.内容链接1Openlayers【入门教程】-......
  • Java格式化
    //格式化输出publicclassMain{publicstaticvoidmain(String[]args){doubled=3.1415926;System.out.printf("%.2f\n",d);//显示两位小数3.14System.out.printf("%.4f\n",d);//显示4位小数3.1416}}Java的格式化功能......
  • Word格式刷快捷键失效恢复方法
    突然某天写材料的时候发现word格式刷快捷键变成了Ctrl+Alt+C和Ctrl+Alt+V,用着这个别扭,于是探索如何改回Ctrl+Shift+C和Ctrl+Shift+V,下边是步骤记录。打开word选项,文件->设置->选项在Word选项中点击自定义功能区,并点击键盘快捷方式的自定义按钮。在自定义键盘中,选择所有命令,在......
  • gguf格式量化方法
    gguf格式下,各种量化方法后的支持情况,及运行速度LibraryCPU(AVX2)CPU(ARMNEON)MetalcuBLASrocBLASSYCLCLBlastVulkanKomputeK-quants✅✅✅✅✅✅✅慢✅慢✅I-quants✅慢✅慢✅慢✅✅Partial¹✅✅✅Multi-GPUN/AN/AN/A✅❓✅......