nl::Weave::Profiles::ReferencedString

#include <src/lib/profiles/common/WeaveMessage.h>

วิธีจัดการสตริงใน Weave มีดังนี้

สรุป

คลาสนี้มีตัวแปร 8 บิตและ 16 บิต

การสืบทอด

รับค่าจาก nl::Weave::Profiles::RetainedPacketBuffer

ผู้ผลิตและผู้ทำลาย

ReferencedString(void)
ตัวสร้างที่ไม่มีอาร์กิวเมนต์สำหรับสตริงที่อ้างอิง

แอตทริบิวต์สาธารณะ

isShort
bool
theLength
uint16_t
theString
char *

ฟังก์ชันสาธารณะ

init(uint16_t aLength, char *aString, System::PacketBuffer *aBuffer)
init(uint16_t aLength, char *aString)
init(uint8_t aLength, char *aString, System::PacketBuffer *aBuffer)
init(uint8_t aLength, char *aString)
operator==(const ReferencedString &) const
bool
pack(MessageIterator &)
printString(void)
char *

ฟังก์ชันแบบคงที่แบบสาธารณะ

parse(MessageIterator &, ReferencedString &)

แอตทริบิวต์สาธารณะ

isShort

bool isShort

theLength

uint16_t theLength

theString

char * theString

ฟังก์ชันสาธารณะ

ReferencedString

 ReferencedString(
  void
)

ตัวสร้างที่ไม่มีอาร์กิวเมนต์สำหรับสตริงที่อ้างอิง

init

WEAVE_ERROR init(
  uint16_t aLength,
  char *aString,
  System::PacketBuffer *aBuffer
)

init

WEAVE_ERROR init(
  uint16_t aLength,
  char *aString
)

init

WEAVE_ERROR init(
  uint8_t aLength,
  char *aString,
  System::PacketBuffer *aBuffer
)

init

WEAVE_ERROR init(
  uint8_t aLength,
  char *aString
)

โอเปอเรเตอร์==

bool operator==(
  const ReferencedString &
) const 

รายละเอียด
พารามิเตอร์
&aReferencedString
สตริงที่ต้องตรวจสอบ
แสดงผลค่า
true
สตริงมีค่าเท่ากัน
false
สตริงไม่เท่ากัน

แพ็ก

WEAVE_ERROR pack(
  MessageIterator &
)

รายละเอียด
พารามิเตอร์
&i
ตัวทำซ้ำกับข้อความที่กำลังแพ็ค
การส่งคืน
WEAVE_ERROR

printString

char * printString(
  void
)

รายละเอียด
การส่งคืน
สตริงที่พิมพ์ได้

ฟังก์ชันแบบคงที่แบบสาธารณะ

parse

WEAVE_ERROR parse(
  MessageIterator &,
  ReferencedString &
)

รายละเอียด
พารามิเตอร์
&i
ตัววนซ้ำเหนือข้อความที่กำลังแยกวิเคราะห์
&aString
ตำแหน่งสำหรับป้อนผลลัพธ์ของการแยกวิเคราะห์
แสดงผลค่า
WEAVE_NO_ERROR
แยกวิเคราะห์สตริงสำเร็จแล้ว
WEAVE_ERROR_INVALID_STRING_LENGTH
สตริงยาวเกินไปสำหรับบัฟเฟอร์ (ซึ่งไม่ควรเกิดขึ้น)