nl::Weave::Profiles::BDX_Development::BlockSend

#include <src/lib/profiles/bulk-data-transfer/Development/BDXMessages.h>

BlockSend 消息用于将数据块从发送者传输到接收者。

摘要

继承

继承自nl::Weave::Profiles::RetainedPacketBuffer
已知的直接子类nl::Weave::Profiles::BDX_Development::BlockEOF

构造函数和析构函数

BlockSend(void)
包含块发送消息默认值的 no-arg 构造函数。

公共属性

mBlockCounter
uint8_t
正在发送的此块的计数器
mData
uint8_t *
指向要接收或传输的数据的指针。
mLength
uint64_t
此块中包含的数据的长度。

公共函数

init(uint8_t aCounter, uint64_t aLength, uint8_t *aData)
初始化 BlockSend 消息。
operator==(const BlockSend &) const
bool
BlockSend 消息之间的相等性比较。
packedLength(void)
uint16_t
返回此块发送消息的打包长度。

公共静态函数

parse(PacketBuffer *aBuffer, BlockSend & aResponse)
将 PacketBuffer 中的数据解析为 BlockSend 消息格式。

公共属性

mBlockCounter

uint8_t mBlockCounter

正在发送的此块的计数器

mData

uint8_t * mData

指向要接收或传输的数据的指针。

mLength

uint64_t mLength

此块中包含的数据的长度。

公共函数

BlockSend

 BlockSend(
  void
)

包含块发送消息默认值的 no-arg 构造函数。

init

WEAVE_ERROR init(
  uint8_t aCounter,
  uint64_t aLength,
  uint8_t *aData
)

初始化 BlockSend 消息。

具体说明
参数
[in] aCounter
此屏蔽的屏蔽计数器值
[in] aLength
砌块的长度
[in] aData
指向要传输的数据的指针
返回值
WEAVE_NO_ERROR(如果成功)

运算符==

bool operator==(
  const BlockSend &
) const 

BlockSend 消息之间的相等性比较。

具体说明
参数
[in] another
要与它进行比较的另一 BlockSend 消息
返回值
当且仅当它们具有相同的字段时,才返回 true。

packedLength

uint16_t packedLength(
  void
)

返回此块发送消息的打包长度。

具体说明
返回值
打包后的消息长度

公共静态函数

parse

WEAVE_ERROR parse(
  PacketBuffer *aBuffer,
  BlockSend & aResponse
)

将 PacketBuffer 中的数据解析为 BlockSend 消息格式。

具体说明
参数
[in] aBuffer
指向包含我们想要解析的数据的 PacketBuffer 的指针
[out] aResponse
指向 BlockSend 对象(我们应该在其中存储结果)的指针
返回值
WEAVE_NO_ERROR
如果成功
WEAVE_ERROR_BUFFER_TOO_SMALL
如果缓冲区过小