使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
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
|
否则。
|
|
运算符!=
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 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。Thread 是 Thread Group, Inc. 的注册商标。
最后更新时间 (UTC):2023-12-02。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]