# 第18章 Class C MAC 指令

Class A 规范中描述的所有指令都应(SHALL)在 Class C 设备中实现。Class C 规范增加了以下 MAC 指令。

CID Command 由谁
发送
简短描述
终端 网关
0x20 DeviceModeInd x 终端设备用来指示其当前工作模式(Class A 或 C)
0x20 DeviceModeConf x 网络用语应答 DeviceModeInd 指令
表22. Class C MAC command table

# 18.1 设备模式

Device Mode - DeviceModeIndDeviceModeConf

使用 DeviceModeInd 指令,终端设备向网络表明它希望在 Class A 还是 Class C 中操作。该指令具有一个字节载荷,定义如下:

Size (bytes) 1
DeviceModeInd Payload Class
图 66: DeviceModeInd payload format

上述命令定义的类型为:

Class Value
Class A 0x00
RFU 0x01
Class C 0x02
表 23 : DeviceModInd class mapping

当网络服务器接收到 DeviceModeInd 指令时,它使用 DeviceModeConf 指令进行响应。设备应(SHALL)在所有上行链路中包含 DeviceModeInd 指令,直到收到 DeviceModeConf 指令为止。

设备应在第一个 DeviceModeInd 指令发送后立即切换模式。

注意: 当从 Class A 转到 Class C 时,建议电池供电的设备在应用层实现超时机制,以确保在无法与网络连接的情况下不会无限期地停留在 Class C 模式。

DeviceModeConf 指令有一字节的载荷:

Size (bytes) 1
DeviceModeConf Payload Class

该载荷包含 class 参数,定义与 DeviceModeInd 指令相同。