#include <WppConnection.h>
Definition at line 35 of file WppConnection.h.
◆ SESSION_T
◆ WppConnection() [1/3]
| wpp::WppConnection::WppConnection |
( |
| ) |
|
◆ ~WppConnection()
| wpp::WppConnection::~WppConnection |
( |
| ) |
|
|
virtual |
◆ WppConnection() [2/3]
◆ WppConnection() [3/3]
◆ addPacketToQueue()
| bool wpp::WppConnection::addPacketToQueue |
( |
const Packet & |
packet | ) |
|
Adds a packet to the packet queue.
This method adds a packet to the packet queue for processing by the WppClient::loop() method. The packet will be copied into the queue, so the user is responsible for deleting the memory occupied by the packet.
- Parameters
-
| packet | The packet to be added to the queue. |
- Returns
- true if the packet was successfully added to the queue, false otherwise.
Definition at line 24 of file WppConnection.cpp.
◆ clearPacketQueue()
| void wpp::WppConnection::clearPacketQueue |
( |
| ) |
|
Clears the packet queue.
This method clears the packet queue, deleting all the packets in the queue.
Definition at line 44 of file WppConnection.cpp.
◆ connect()
Establishes a connection using the provided Lwm2mSecurity object.
This method must be implemented by the user to establish a connection using the provided Lwm2mSecurity object. The method should return a session identifier that represents the established connection.
- Parameters
-
| security | The Lwm2mSecurity object used to establish the connection. |
- Returns
- The session identifier representing the established connection.
◆ disconnect()
| virtual void wpp::WppConnection::disconnect |
( |
SESSION_T |
session | ) |
|
|
pure virtual |
Disconnects from the specified session.
This method must be implemented by the user to disconnect from the specified session.
- Parameters
-
| session | The session identifier representing the connection to disconnect from. |
◆ getDataBlockSize()
| uint16_t wpp::WppConnection::getDataBlockSize |
( |
| ) |
|
Retrieves the COAP block size.
This method retrieves the currently set COAP block size.
- Returns
- The currently set COAP block size.
Definition at line 60 of file WppConnection.cpp.
◆ getPacketQueueSize()
| uint8_t wpp::WppConnection::getPacketQueueSize |
( |
| ) |
|
Retrieves the size of the packet queue.
This method returns the size of the packet queue.
- Returns
- The size of the packet queue.
Definition at line 40 of file WppConnection.cpp.
◆ handlePacketsInQueue()
| void wpp::WppConnection::handlePacketsInQueue |
( |
WppClient & |
client | ) |
|
Processes the packets in the packet queue.
This method is called by the WppClient in its loop() method if the packet queue contains at least one packet. It processes all the packets found in the queue. If an error occurs during the processing of a packet, it is deleted. But it can be also called by the user if he wants to process immediately.
- Parameters
-
| client | The WppClient object used for packet processing. |
Definition at line 64 of file WppConnection.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ sendPacket()
| virtual bool wpp::WppConnection::sendPacket |
( |
const Packet & |
packet | ) |
|
|
pure virtual |
Sends a packet over the connection.
This method must be implemented by the user to send a packet over the connection. The method should return true if the packet was successfully sent, and false otherwise.
- Parameters
-
| packet | The packet to be sent over the connection. |
- Returns
- true if the packet was successfully sent, false otherwise.
◆ sessionCmp()
Compares two session identifiers.
This method must be implemented by the user to compare two session identifiers. It should return true if the session identifiers are equal, and false otherwise.
- Parameters
-
| session1 | The first session identifier to compare. |
| session2 | The second session identifier to compare. |
- Returns
- true if the session identifiers are equal, false otherwise.
◆ setDataBlockSize()
| bool wpp::WppConnection::setDataBlockSize |
( |
uint16_t |
size | ) |
|
Sets the COAP block size.
This method sets the COAP block size to the specified value.
- Parameters
-
| size | The COAP block size to set. |
- Returns
- true if the COAP block size was successfully set, false otherwise.
Definition at line 55 of file WppConnection.cpp.