MqttHelperBuildMqttCommand 方法 (Byte, Byte, Byte, Byte, AesCryptography) |
将一个数据打包成一个mqtt协议的内容
Pack a piece of data into a mqtt protocol
命名空间:
HslCommunication.MQTT
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static OperateResult<byte[]> BuildMqttCommand(
byte control,
byte flags,
byte[] variableHeader,
byte[] payLoad,
AesCryptography aesCryptography = null
)
Public Shared Function BuildMqttCommand (
control As Byte,
flags As Byte,
variableHeader As Byte(),
payLoad As Byte(),
Optional aesCryptography As AesCryptography = Nothing
) As OperateResult(Of Byte())
public:
static OperateResult<array<unsigned char>^>^ BuildMqttCommand(
unsigned char control,
unsigned char flags,
array<unsigned char>^ variableHeader,
array<unsigned char>^ payLoad,
AesCryptography^ aesCryptography = nullptr
)
static member BuildMqttCommand :
control : byte *
flags : byte *
variableHeader : byte[] *
payLoad : byte[] *
?aesCryptography : AesCryptography
(* Defaults:
let _aesCryptography = defaultArg aesCryptography null
*)
-> OperateResult<byte[]>
参数
- control
- 类型:SystemByte
控制码 - flags
- 类型:SystemByte
标记 - variableHeader
- 类型:SystemByte
可变头的字节内容 - payLoad
- 类型:SystemByte
负载数据 - aesCryptography (Optional)
- 类型:HslCommunication.Core.SecurityAesCryptography
AES数据加密对象
返回值
类型:
OperateResultByte带有是否成功的结果对象
参见