使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
nl::Weave::Profiles::MessageIterator
#include <src/lib/profiles/common/WeaveMessage.h>
为了合理使用消息缓冲区,我们定义了这个迭代器,可用于跟踪边界等。
摘要
继承
沿用自:
nl::Weave::Profiles::RetainedPacketBuffer
公共属性
thePoint
uint8_t * thePoint
公共函数
append
void append(
void
)
finishWriting
void finishWriting(
void
)
hasData
bool hasData(
uint16_t
)
详细信息 |
参数 |
|
返回值 |
true
|
缓冲区的当前数据长度大于或等于给定增量。
|
false
|
否则。
|
|
hasRoom
bool hasRoom(
uint16_t
)
详细信息 |
参数 |
|
返回值 |
true
|
缓冲区当前数据长度与其允许的最大数据长度(其可用数据长度)之间的差值小于或等于给定增量。
|
false
|
否则。
|
|
operator!=
bool operator!=(
const MessageIterator &
)
详细信息 |
参数 |
aMessageIterator
|
要与之比较的另一个消息迭代器。
|
|
运算符*
uint8_t & operator*(
void
)
运算符+
MessageIterator & operator+(
uint16_t
)
详细信息 |
参数 |
|
返回值
|
如果空间足够,则迭代器按指定值递增,如果没有空间,则直接按最后的值。
|
operator-
MessageIterator & operator-(
uint16_t
)
详细信息 |
参数 |
|
返回值
|
如果剩余空间,则迭代器按指定值递减;如果没有剩余空间,则直接重按开始。
|
运算符==
bool operator==(
const MessageIterator &
)
详细信息 |
参数 |
aMessageIterator
|
要与之比较的另一个消息迭代器。
|
|
read16
WEAVE_ERROR read16(
uint16_t *
)
详细信息 |
参数 |
aDestination
|
用于从缓冲区中读取数据的位置。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
read32
WEAVE_ERROR read32(
uint32_t *
)
详细信息 |
参数 |
aDestination
|
用于从缓冲区读取 32 位值的位置。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
read64
WEAVE_ERROR read64(
uint64_t *
)
详细信息 |
参数 |
aDestination
|
用于从缓冲区读取 64 位值的位置。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
readByte
WEAVE_ERROR readByte(
uint8_t *
)
详细信息 |
参数 |
aDestination
|
将某个字节从缓冲区读取的位置。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
readBytes
WEAVE_ERROR readBytes(
uint16_t,
uint8_t *
)
详细信息 |
参数 |
aLength
|
要读取的字节字符串的长度。
|
aByteString
|
放置字节的位置。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
readString
WEAVE_ERROR readString(
uint16_t,
char *
)
详细信息 |
参数 |
aLength
|
要读取的字符串的长度。
|
aString
|
字符串的放置位置。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
write16
WEAVE_ERROR write16(
uint16_t
)
详细信息 |
参数 |
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
write32
WEAVE_ERROR write32(
uint32_t
)
详细信息 |
参数 |
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
write64
WEAVE_ERROR write64(
uint64_t
)
详细信息 |
参数 |
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
writeByte
WEAVE_ERROR writeByte(
uint8_t
)
详细信息 |
参数 |
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
writeBytes
WEAVE_ERROR writeBytes(
uint16_t,
uint8_t *
)
详细信息 |
参数 |
aLength
|
要写入的字节字符串的长度。
|
aString
|
字节字符串本身。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
writeString
WEAVE_ERROR writeString(
uint16_t,
char *
)
详细信息 |
参数 |
aLength
|
要写入的字符串的长度。
|
aString
|
字符串本身。
|
|
返回值 |
WEAVE_NO_ERROR
|
如果一切正常。
|
WEAVE_ERROR_BUFFER_TOO_SMALL
|
当我们运行到缓冲区末尾时。
|
|
如未另行说明,则本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。如需了解详情,请参阅 Google Developers 网站政策。Java 是 Oracle 和/或其关联公司的注册商标。OPENTHREAD 和相关标记是 Thread Group 的商标,经许可后使用。
最后更新时间 (UTC):2024-08-22。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-08-22。"],[],[]]