#include <packet_id_manager.hpp>
|
optional< packet_id_t > | acquire_unique_id () |
| Acquire the new unique packet id. If all packet ids are already in use, then returns nullopt After acquiring the packet id, you can call acquired_* functions. The ownership of packet id is moved to the library. Or you can call release_packet_id to release it. More...
|
|
bool | register_id (packet_id_t packet_id) |
| Register packet_id to the library. After registering the packet_id, you can call acquired_* functions. The ownership of packet id is moved to the library. Or you can call release_packet_id to release it. More...
|
|
void | release_id (packet_id_t packet_id) |
| Release packet_id. More...
|
|
void | clear () |
| Clear all packet ids. More...
|
|
◆ acquire_unique_id()
template<typename PacketId >
Acquire the new unique packet id. If all packet ids are already in use, then returns nullopt After acquiring the packet id, you can call acquired_* functions. The ownership of packet id is moved to the library. Or you can call release_packet_id to release it.
- Returns
- packet id
◆ clear()
template<typename PacketId >
◆ register_id()
template<typename PacketId >
Register packet_id to the library. After registering the packet_id, you can call acquired_* functions. The ownership of packet id is moved to the library. Or you can call release_packet_id to release it.
- Returns
- If packet_id is successfully registerd then return true, otherwise return false.
◆ release_id()
template<typename PacketId >
Release packet_id.
- Parameters
-
packet_id | packet id to release. only the packet_id gotten by acquire_unique_packet_id, or register_packet_id is permitted. |
The documentation for this class was generated from the following file: