Google is committed to advancing racial equity for Black communities. See how.

nl::Weave::Profiles::NetworkProvisioning::WirelessRegConfig

#include <src/lib/profiles/network-provisioning/WirelessRegConfig.h>

Container for wireless regulatory configuration information.

Summary

Public attributes

NumSupportedRegDomains
uint16_t
Length of SupportedRegDomains array.
OpLocation
uint8_t
Active operating location Value of 0 indicates not present.
RegDomain
Active wireless regulatory domain Value of '\0' indicates not present.
SupportedRegDomains
Array of supported regulatory domain structures.

Public functions

Decode(nl::Weave::TLV::TLVReader & reader)
Populate the object from information encoded in Weave TLV format.
DecodeInPlace(PacketBuffer *buf)
Populate the object from information encoded PacketBuffer, reusing.
Encode(nl::Weave::TLV::TLVWriter & writer) const
Encode the object in Weave TLV format.
Init(void)
void
Reset the WirelessRegConfig object to an empty state.
IsOpLocationPresent(void) const
bool
Is OpLocation field present in WirelessRegConfig object.
IsRegDomainPresent(void) const
bool
Is RegDomain field present in WirelessRegConfig object.

Public attributes

NumSupportedRegDomains

uint16_t NumSupportedRegDomains

Length of SupportedRegDomains array.

OpLocation

uint8_t OpLocation

Active operating location Value of 0 indicates not present.

RegDomain

WirelessRegDomain RegDomain

Active wireless regulatory domain Value of '\0' indicates not present.

SupportedRegDomains

WirelessRegDomain * SupportedRegDomains

Array of supported regulatory domain structures.

Public functions

Decode

WEAVE_ERROR Decode(
  nl::Weave::TLV::TLVReader & reader
)

Populate the object from information encoded in Weave TLV format.

The supplied TVLReader object must be position on or immediately before the TLV structure containing the information to be decoded.

Prior to calling the method, the caller must initialize the SupportedRegDomains member to an array big enough to hold the decoded values, and set the NumSupportedRegDomains member to size of that array, in elements.

Details
Parameters
[in] reader
A TVLReader object to which should be used to decode the object information.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred while decoding the encoded data.

DecodeInPlace

WEAVE_ERROR DecodeInPlace(
  PacketBuffer *buf
)

Populate the object from information encoded PacketBuffer, reusing.

Upon completion of the method, the contents of the supplied PacketBuffer will be overwritten with an array containing the supported regulatory domains. The SupportedRegDomains member will be set to point at the start of this array, and the NumSupportedRegDomains member will contain the number of items in the array.

Details
Parameters
[in] buf
A PacketBuffer object containing the information to be decoded.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred while decoding the encoded data.

Encode

WEAVE_ERROR Encode(
  nl::Weave::TLV::TLVWriter & writer
) const 

Encode the object in Weave TLV format.

Details
Parameters
[in] writer
A TLVWriter object to which the encoded data should be written.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred while encoding the data.

Init

void Init(
  void
)

Reset the WirelessRegConfig object to an empty state.

IsOpLocationPresent

bool IsOpLocationPresent(
  void
) const 

Is OpLocation field present in WirelessRegConfig object.

IsRegDomainPresent

bool IsRegDomainPresent(
  void
) const 

Is RegDomain field present in WirelessRegConfig object.