|
ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
Simple class that allows you to keep track of how many replies are pending. More...
#include <pendingReplies.hpp>
Inheritance diagram for daq::PendingReplies:Classes | |
| struct | PendingReply |
Public Member Functions | |
| ReplyToken | Acquire (std::string source_id, std::string request) |
| Acquire token. More... | |
| std::shared_ptr< ReplyToken > | AcquireShared (std::string source_id, std::string request) |
| bool | HasPendingReplies () const |
| std::vector< PendingReply > | GetPendingReplies () const |
Static Public Member Functions | |
| static std::shared_ptr< PendingReplies > | Create () |
| Create instance. More... | |
Protected Member Functions | |
| void | Release (uint64_t token) |
| PendingReplies ()=default | |
Protected Attributes | |
| friend | ReplyToken |
Simple class that allows you to keep track of how many replies are pending.
Usage:
For each request acquire a token with acquire. The token is movable but not copyable to guarantee uniqueness.
Once reply is released release the token by deleting it.
Definition at line 58 of file pendingReplies.hpp.
| struct daq::PendingReplies::PendingReply |
Definition at line 60 of file pendingReplies.hpp.
| Class Members | ||
|---|---|---|
| string | request | |
| string | source_id | |
|
protecteddefault |
| ReplyToken daq::PendingReplies::Acquire | ( | std::string | source_id, |
| std::string | request | ||
| ) |
Acquire token.
Keep the token alive until reply is received, then delete it.
Definition at line 38 of file pendingReplies.cpp.
| std::shared_ptr< ReplyToken > daq::PendingReplies::AcquireShared | ( | std::string | source_id, |
| std::string | request | ||
| ) |
Definition at line 45 of file pendingReplies.cpp.
|
static |
Create instance.
Definition at line 22 of file pendingReplies.cpp.
| std::vector< PendingReplies::PendingReply > daq::PendingReplies::GetPendingReplies | ( | ) | const |
Definition at line 30 of file pendingReplies.cpp.
| bool daq::PendingReplies::HasPendingReplies | ( | ) | const |
Definition at line 26 of file pendingReplies.cpp.
|
protected |
Definition at line 53 of file pendingReplies.cpp.
|
protected |
Definition at line 82 of file pendingReplies.hpp.