Send feedback
Stay organized with collections
Save and categorize content based on your preferences.
nl:: Weave:: Profiles:: NetworkProvisioning:: NetworkProvisioningServer
#include <src/lib/profiles/network-provisioning/NetworkProvisioning.h>
Server class for implementing the Network Provisioning profile.
Summary
Inheritance
Inherits from:
nl::Weave::WeaveServerBase
Direct Known Subclasses:
nl::Weave::DeviceLayer::Internal::GenericNetworkProvisioningServerImpl< NetworkProvisioningServerImpl >
nl::Weave::DeviceLayer::Internal::GenericNetworkProvisioningServerImpl< ImplClass >
Protected attributes
mCurOpType
uint8_t mCurOpType
mLastOpResult
struct nl :: Weave :: Profiles :: NetworkProvisioning :: NetworkProvisioningServer :: @217 mLastOpResult
Public attributes
StatusCode
uint16_t StatusCode
StatusProfileId
uint32_t StatusProfileId
Public functions
Init
WEAVE_ERROR Init(
WeaveExchangeManager *exchangeMgr
)
Initialize the Network Provisioning Server state and register to receive Network Provisioning messages.
Details
Parameters
[in] exchangeMgr
A pointer to the system Weave Exchange Manager.
Return Values
WEAVE_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
If too many message handlers have already been registered.
WEAVE_NO_ERROR
On success.
NetworkProvisioningServer
NetworkProvisioningServer(
void
)
SendAddNetworkComplete
virtual WEAVE_ERROR SendAddNetworkComplete(
uint32_t networkId
)
Send an Add Network Complete message if the network was successfully added.
Details
Parameters
[in] networkId
The ID of the added network.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If the Network Provisioning Server is not initialized correctly.
WEAVE_ERROR_NO_MEMORY
On failure to allocate an PacketBuffer.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from sending the Add Network Complete message.
SendGetNetworksComplete
virtual WEAVE_ERROR SendGetNetworksComplete(
uint8_t resultCount,
PacketBuffer *resultsTLV
)
Send a Get Networks Complete message containing the previously scanned networks.
Details
Parameters
[in] resultCount
The number of scan results.
[in] scanResultsTLV
The scan results.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If the Network Provisioning Server is not initialized correctly.
WEAVE_ERROR_BUFFER_TOO_SMALL
If the results buffer is not large enough.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from sending the Get Networks Complete message.
SendGetWirelessRegulatoryConfigComplete
virtual WEAVE_ERROR SendGetWirelessRegulatoryConfigComplete(
PacketBuffer *resultsTLV
)
Send a GetWirelessRegulatoryConfigComplete message to the peer.
Details
Parameters
[in] resultsTLV
A packet buffer containing the wireless regulatory configuration information to be returned.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If the Network Provisioning Server is not initialized correctly.
WEAVE_ERROR_NO_MEMORY
On failure to allocate an PacketBuffer.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from sending the Add Network Complete message.
SendNetworkScanComplete
virtual WEAVE_ERROR SendNetworkScanComplete(
uint8_t resultCount,
PacketBuffer *scanResultsTLV
)
Send a Network Scan Complete response message containing the results of the scan.
Details
Parameters
[in] resultCount
The number of scan results.
[in] scanResultsTLV
The scan results.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If the Network Provisioning Server is not initialized correctly.
WEAVE_ERROR_BUFFER_TOO_SMALL
If the results buffer is not large enough.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from sending the Scan Complete response.
SendStatusReport
virtual WEAVE_ERROR SendStatusReport(
uint32_t statusProfileId,
uint16_t statusCode,
WEAVE_ERROR sysError
)
Send a status report response to a request.
Details
Parameters
[in] statusProfileId
The Weave profile ID this status report pertains to.
[in] statusCode
The status code to be included in this response.
[in] sysError
The system error code to be included in this response.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If there is no request being processed.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from sending the status report.
SendSuccessResponse
virtual WEAVE_ERROR SendSuccessResponse(
void
)
Send a success response to a Network Provisioning request.
Details
Return Values
WEAVE_ERROR_INCORRECT_STATE
If there is no request being processed.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from sending the success response.
SetDelegate
void SetDelegate(
NetworkProvisioningDelegate *delegate
)
Set the delegate to process Network Provisioning Server events.
Details
Parameters
[in] delegate
A pointer to the Network Provisioning Delegate.
Shutdown
WEAVE_ERROR Shutdown(
void
)
Shutdown the Network Provisioning Server.
Details
Return Values
WEAVE_NO_ERROR
On success.
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.
Last updated 2020-08-28 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2020-08-28 UTC."}