DABC (Data Acquisition Backbone Core)
2.9.9
|
Queue of commands More...
#include <dabc/CommandsQueue.h>
Data Structures | |
struct | QueueRec |
Public Types | |
enum | EKind { kindNone , kindSubmit , kindReply , kindAssign , kindPostponed } |
Public Member Functions | |
uint32_t | ChangeKind (Command &cmd, EKind kind) |
Change kind of the entry for specified command. More... | |
void | Cleanup (Mutex *m=nullptr, Worker *proc=nullptr, int res=cmd_false) |
CommandsQueue (EKind kind=kindNone) | |
Normal constructor. More... | |
Command | Front () |
EKind | FrontKind () |
Command | Pop () |
Command | PopWithId (uint32_t id) |
Command | PopWithKind (EKind kind) |
uint32_t | Push (Command cmd, EKind kind=kindNone) |
Add reference on the command in the queue. More... | |
void | ReplyAll (int res) |
Reply all commands. More... | |
void | ReplyTimedout () |
Reply timed-out commands. More... | |
unsigned | Size () const |
virtual | ~CommandsQueue () |
Protected Types | |
typedef std::list< QueueRec > | QueueRecsList |
Protected Attributes | |
uint32_t | fIdCounter |
EKind | fKind |
QueueRecsList | fList |
|
protected |
Definition at line 70 of file CommandsQueue.h.
Definition at line 43 of file CommandsQueue.h.
Normal constructor.
Definition at line 7 of file CommandsQueue.cxx.
|
virtual |
Definition at line 14 of file CommandsQueue.cxx.
Add reference on the command in the queue.
Kind of command can be specified, if not - default queue kind is used Returns unique id for the command inside this queue
Definition at line 71 of file CommandsQueue.cxx.
Change kind of the entry for specified command.
If entry not exists, command will be add to the queue. Returns unique id
Definition at line 138 of file CommandsQueue.cxx.
dabc::Command dabc::CommandsQueue::Pop | ( | ) |
Definition at line 87 of file CommandsQueue.cxx.
dabc::Command dabc::CommandsQueue::PopWithId | ( | uint32_t | id | ) |
Definition at line 114 of file CommandsQueue.cxx.
dabc::Command dabc::CommandsQueue::PopWithKind | ( | EKind | kind | ) |
Definition at line 100 of file CommandsQueue.cxx.
dabc::Command dabc::CommandsQueue::Front | ( | ) |
Definition at line 128 of file CommandsQueue.cxx.
dabc::CommandsQueue::EKind dabc::CommandsQueue::FrontKind | ( | ) |
Definition at line 133 of file CommandsQueue.cxx.
|
inline |
Definition at line 97 of file CommandsQueue.h.
void dabc::CommandsQueue::ReplyAll | ( | int | res | ) |
Reply all commands.
Definition at line 150 of file CommandsQueue.cxx.
void dabc::CommandsQueue::ReplyTimedout | ( | ) |
Reply timed-out commands.
Definition at line 56 of file CommandsQueue.cxx.
void dabc::CommandsQueue::Cleanup | ( | Mutex * | m = nullptr , |
Worker * | proc = nullptr , |
||
int | res = cmd_false |
||
) |
Definition at line 19 of file CommandsQueue.cxx.
|
protected |
Definition at line 72 of file CommandsQueue.h.
|
protected |
Definition at line 73 of file CommandsQueue.h.
|
protected |
Definition at line 74 of file CommandsQueue.h.