Main Page
Namespaces
Classes
Files
File List
File Members
include
xarm
core
common
queue_memcpy.h
Go to the documentation of this file.
1
/* Copyright 2017 UFACTORY Inc. All Rights Reserved.
2
*
3
* Software License Agreement (BSD License)
4
*
5
* Author: Jimy Zhang <jimy92@163.com>
6
============================================================================*/
7
#ifndef CORE_COMMON_QUEUE_MEMCPY_H_
8
#define CORE_COMMON_QUEUE_MEMCPY_H_
9
10
#include <mutex>
11
12
class
QueueMemcpy
{
13
public
:
14
QueueMemcpy
(
long
n,
long
n_size);
15
~QueueMemcpy
(
void
);
16
char
flush
(
void
);
17
char
push
(
void
*data);
18
char
pop
(
void
*data);
19
char
get
(
void
*data);
20
long
size
(
void
);
21
long
node_size
(
void
);
22
int
is_full
(
void
);
23
24
protected
:
25
private
:
26
long
total_
;
27
long
annode_size_
;
28
29
long
cnt_
;
30
long
head_
;
31
long
tail_
;
32
char
*
buf_
;
33
34
std::mutex
mutex_
;
35
};
36
#endif
QueueMemcpy::head_
long head_
Definition:
queue_memcpy.h:30
QueueMemcpy::QueueMemcpy
QueueMemcpy(long n, long n_size)
Definition:
queue_memcpy.cc:12
QueueMemcpy::pop
char pop(void *data)
Definition:
queue_memcpy.cc:41
QueueMemcpy::tail_
long tail_
Definition:
queue_memcpy.h:31
QueueMemcpy
Definition:
queue_memcpy.h:12
QueueMemcpy::~QueueMemcpy
~QueueMemcpy(void)
Definition:
queue_memcpy.cc:19
QueueMemcpy::mutex_
std::mutex mutex_
Definition:
queue_memcpy.h:34
QueueMemcpy::buf_
char * buf_
Definition:
queue_memcpy.h:32
QueueMemcpy::cnt_
long cnt_
Definition:
queue_memcpy.h:29
QueueMemcpy::total_
long total_
Definition:
queue_memcpy.h:26
QueueMemcpy::size
long size(void)
Definition:
queue_memcpy.cc:30
QueueMemcpy::annode_size_
long annode_size_
Definition:
queue_memcpy.h:27
QueueMemcpy::push
char push(void *data)
Definition:
queue_memcpy.cc:66
QueueMemcpy::node_size
long node_size(void)
Definition:
queue_memcpy.cc:39
QueueMemcpy::is_full
int is_full(void)
Definition:
queue_memcpy.cc:32
QueueMemcpy::flush
char flush(void)
Definition:
queue_memcpy.cc:21
xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23