提供意見
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
nl:: Weave:: Profiles:: MessageIterator
#include <src/lib/profiles/common/WeaveMessage.h>
為了讓訊息緩衝區能夠合理地使用訊息緩衝區,我們定義了這個疊代器,可用於追蹤邊界等。
摘要
繼承
沿用來源:
nl::Weave::Profiles::RetainedPacketBuffer
公開屬性
thePoint
uint8_t * thePoint
公用函式
append
void append(
void
)
將 Point 設為在目前緩衝區中的任何資料之後。
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
如果我們執行的是超過緩衝區的結尾
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates. The OPENTHREAD and related marks are trademarks of the Thread Group and are used under license.
上次更新時間: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":"其他"
}]
想進一步說明嗎?