#include <network.h>
Public Member Functions | |
Cmdbuf (int) | |
~Cmdbuf () | |
bool | isempty () |
bool | isfull () |
int | num_entry () |
bool | deq () |
bool | enq (void *) |
void * | head () |
Cmdbuf::Cmdbuf | ( | int | n | ) |
Cmdbuf constructor
n | the number of command buffer |
Cmdbuf::~Cmdbuf | ( | ) |
Cmdbuf destructor
bool Cmdbuf::isempty | ( | ) |
check whether the command buffer has one or more commands or not
bool Cmdbuf::isfull | ( | ) |
check whether the command buffer is full
int Cmdbuf::num_entry | ( | ) |
get the number of command buffer
bool Cmdbuf::deq | ( | ) |
dequeue the command in the command buffer
bool Cmdbuf::enq | ( | void * | _data | ) |
enqueue a command to the command buffer
data | the command should be stored to the command buffer |
void * Cmdbuf::head | ( | ) |
get the older command in the command buffer