|
Friendly LWM2M client
|
Represents a client interface for Wpp library. More...
#include <WppClient.h>
Collaboration diagram for wpp::WppClient:Classes | |
| struct | ClientInfo |
| Represents the information required to create a WppClient. More... | |
Public Types | |
| using | WppErrHandler = std::function< void(WppClient &client, int errCode)> |
Public Member Functions | |
| ~WppClient () | |
| void | giveOwnership () |
| Gives up ownership of the WppClient. More... | |
| WppConnection & | connection () |
| Gets the WppConnection associated with the WppClient. More... | |
| WppRegistry & | registry () |
| Gets the WppRegistry associated with the WppClient. More... | |
| lwm2m_client_state_t | getState () |
| Gets the state of the Wakaama client. More... | |
| lwm2m_context_t & | getContext () |
| Gets the LwM2M context associated with the WppClient. More... | |
| time_t | loop () |
| Processes the state of the Wakaama core. This function performs the necessary work by the Wakaama core, such as (re)sending packets, handles received packets from servers, and created tasks. More... | |
| void | deregister () |
| Deregisters the client from the servers. More... | |
Static Public Member Functions | |
| static bool | create (const ClientInfo &info, WppConnection &connection, WppErrHandler errHandler=NULL) |
| Creates a WppClient with the specified client information, connection, and maximum sleep time. More... | |
| static void | remove () |
| Removes the WppClient. More... | |
| static bool | isCreated () |
| Checks if the WppClient is created. More... | |
| static WppClient * | takeOwnership () |
| Takes ownership of the WppClient. More... | |
| static WppClient * | takeOwnershipBlocking () |
| Takes ownership of the WppClient, blocking until it becomes available. More... | |
Represents a client interface for Wpp library.
The WppClient class provides methods for managing the Wpp library, accessing its components, and processing the state of the Wakaama core. It allows users to create, remove, and check if the WppClient is created. Users can also take ownership of the client, interact with its connection and registry, and perform server registration and deregistration.
Definition at line 37 of file WppClient.h.
| using wpp::WppClient::WppErrHandler = std::function<void(WppClient &client, int errCode)> |
Definition at line 49 of file WppClient.h.
| wpp::WppClient::~WppClient | ( | ) |
| WppConnection & wpp::WppClient::connection | ( | ) |
Gets the WppConnection associated with the WppClient.
Definition at line 89 of file WppClient.cpp.
Here is the caller graph for this function:
|
static |
Creates a WppClient with the specified client information, connection, and maximum sleep time.
| info | The client information required to create the WppClient. |
| connection | The WppConnection object to be associated with the client. |
Definition at line 39 of file WppClient.cpp.
Here is the call graph for this function:| void wpp::WppClient::deregister | ( | ) |
Deregisters the client from the servers.
Definition at line 139 of file WppClient.cpp.
| lwm2m_context_t & wpp::WppClient::getContext | ( | ) |
Gets the LwM2M context associated with the WppClient.
Definition at line 102 of file WppClient.cpp.
Here is the caller graph for this function:| lwm2m_client_state_t wpp::WppClient::getState | ( | ) |
Gets the state of the Wakaama client.
Definition at line 98 of file WppClient.cpp.
Here is the caller graph for this function:| void wpp::WppClient::giveOwnership | ( | ) |
Gives up ownership of the WppClient.
Definition at line 81 of file WppClient.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Checks if the WppClient is created.
Definition at line 62 of file WppClient.cpp.
Here is the caller graph for this function:| time_t wpp::WppClient::loop | ( | ) |
Processes the state of the Wakaama core. This function performs the necessary work by the Wakaama core, such as (re)sending packets, handles received packets from servers, and created tasks.
Definition at line 106 of file WppClient.cpp.
Here is the call graph for this function:| WppRegistry & wpp::WppClient::registry | ( | ) |
Gets the WppRegistry associated with the WppClient.
Definition at line 93 of file WppClient.cpp.
Here is the caller graph for this function:
|
static |
Removes the WppClient.
Definition at line 54 of file WppClient.cpp.
Here is the call graph for this function:
|
static |
Takes ownership of the WppClient.
Definition at line 66 of file WppClient.cpp.
Here is the call graph for this function:
|
static |
Takes ownership of the WppClient, blocking until it becomes available.
Definition at line 73 of file WppClient.cpp.
Here is the call graph for this function: