点击或拖拽改变大小

MqttHelper 类

Mqtt协议的辅助类,提供了一些协议相关的基础方法,方便客户端和服务器端一起调用。
The auxiliary class of the Mqtt protocol provides some protocol-related basic methods for the client and server to call together.
继承层次
SystemObject
  HslCommunication.MQTTMqttHelper

命名空间:  HslCommunication.MQTT
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class MqttHelper

MqttHelper 类型公开以下成员。

构造函数
  名称说明
公共方法MqttHelper
初始化 MqttHelper 类的一个新实例
Top
方法
  名称说明
公共方法静态成员BuildConnectMqttCommand
创建MQTT连接服务器的报文信息
Create MQTT connection server message information
公共方法静态成员BuildIntBytes
从MQTT的缓存信息里,提取长度信息
Extract length information from MQTT cache information
公共方法静态成员BuildMqttCommand(Byte, Byte, Byte, AesCryptography)
将一个数据打包成一个mqtt协议的内容
Pack a piece of data into a mqtt protocol
公共方法静态成员BuildMqttCommand(Byte, Byte, Byte, Byte, AesCryptography)
将一个数据打包成一个mqtt协议的内容
Pack a piece of data into a mqtt protocol
公共方法静态成员BuildPublishMqttCommand(MqttPublishMessage, AesCryptography)
创建Mqtt发送消息的命令
Create Mqtt command to send messages
公共方法静态成员BuildPublishMqttCommand(String, Byte, Boolean, AesCryptography)
创建Mqtt发送消息的命令
Create Mqtt command to send messages
公共方法静态成员BuildSegCommandByString(Byte)
将字符串打包成utf8编码,并且带有2个字节的表示长度的信息
Pack the string into utf8 encoding, and with 2 bytes of length information
公共方法静态成员BuildSegCommandByString(String)
将字符串打包成utf8编码,并且带有2个字节的表示长度的信息
Pack the string into utf8 encoding, and with 2 bytes of length information
公共方法静态成员BuildSubscribeMqttCommand
创建Mqtt订阅消息的命令
Command to create Mqtt subscription message
公共方法静态成员BuildUnSubscribeMqttCommand
创建Mqtt取消订阅消息的命令
Create Mqtt unsubscribe message command
公共方法静态成员CalculateLengthToMqttLength
根据数据的总长度,计算出剩余的数据长度信息
According to the total length of the data, calculate the remaining data length information
公共方法静态成员CheckConnectBack
根据服务器返回的信息判断当前的连接是否是可用的
According to the information returned by the server to determine whether the current connection is available
公共方法静态成员CheckMqttTopicWildcards
判断当前服务器的实际的 topic 的主题,是否满足通配符格式的订阅主题 subTopic
公共方法Equals (继承自 Object。)
公共方法静态成员ExtraIntFromBytes
从MQTT的缓存信息里,提取长度信息
Extract length information from MQTT cache information
公共方法静态成员ExtraMqttReceiveData
解析从MQTT接受的客户端信息,解析成实际的Topic数据及Payload数据
Parse the client information received from MQTT and parse it into actual Topic data and Payload data
公共方法静态成员ExtraMsgFromBytes
从MQTT的缓存信息里,提取文本信息
Extract text information from MQTT cache information
公共方法静态成员ExtraSubscribeMsgFromBytes
从MQTT的缓存信息里,提取文本信息
Extract text information from MQTT cache information
受保护的方法Finalize (继承自 Object。)
公共方法GetHashCode (继承自 Object。)
公共方法静态成员GetMqttCodeText
获取当前的错误的描述信息
Get a description of the current error
公共方法静态成员GetMqttSyncServicesApiFromMethod
根据当前的方法的委托信息和类对象,生成MqttRpcApiInfo的API对象信息。
公共方法静态成员GetMqttSyncServicesApiFromProperty
根据当前的方法的委托信息和类对象,生成MqttRpcApiInfo的API对象信息。
公共方法静态成员GetSyncServicesApiInformationFromObject(Object)
根据当前的对象定义的方法信息,获取到所有支持ApiTopic的方法列表信息,包含API名称,示例参数数据,描述信息。
According to the method information defined by the current object, the list information of all methods that support ApiTopic is obtained, including the API name, sample parameter data, and description information.
公共方法静态成员GetSyncServicesApiInformationFromObject(String, Object, HslMqttPermissionAttribute)
根据当前的对象定义的方法信息,获取到所有支持ApiTopic的方法列表信息,包含API名称,示例参数数据,描述信息。
According to the method information defined by the current object, the list information of all methods that support ApiTopic is obtained, including the API name, sample parameter data, and description information.
公共方法GetType (继承自 Object。)
公共方法静态成员HandleObjectMethod(MqttSession, MqttClientApplicationMessage, MqttRpcApiInfo)
使用指定的对象来返回网络的API接口,前提是传入的数据为json参数,返回的数据为json数据,详细参照说明
Use the specified object to return the API interface of the network, provided that the incoming data is json parameters and the returned data is json data, please refer to the description for details
公共方法静态成员HandleObjectMethod(MqttSession, MqttClientApplicationMessage, Object)
使用指定的对象来返回网络的API接口,前提是传入的数据为json参数,返回的数据为json数据,详细参照说明
Use the specified object to return the API interface of the network, provided that the incoming data is json parameters and the returned data is json data, please refer to the description for details
受保护的方法MemberwiseClone (继承自 Object。)
公共方法静态成员ReceiveMqttMessageT
接收一条完整的MQTT协议的报文信息,包含控制码和负载数据
Receive a message of a completed MQTT protocol, including control code and payload data
公共方法静态成员ReceiveMqttMessageAsyncT
接收一条完整的MQTT协议的报文信息,包含控制码和负载数据
Receive a message of a completed MQTT protocol, including control code and payload data
公共方法静态成员ReceiveMqttRemainingLengthT
基于MQTT协议,从网络套接字中接收剩余的数据长度
Receives the remaining data length from the network socket based on the MQTT protocol
公共方法静态成员ReceiveMqttRemainingLengthAsyncT
基于MQTT协议,从网络套接字中接收剩余的数据长度
Receives the remaining data length from the network socket based on the MQTT protocol
公共方法ToString (继承自 Object。)
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见