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_;
28 
29  long cnt_;
30  long head_;
31  long tail_;
32  char *buf_;
33 
34  std::mutex mutex_;
35 };
36 #endif
QueueMemcpy(long n, long n_size)
Definition: queue_memcpy.cc:12
char pop(void *data)
Definition: queue_memcpy.cc:41
~QueueMemcpy(void)
Definition: queue_memcpy.cc:19
std::mutex mutex_
Definition: queue_memcpy.h:34
char * buf_
Definition: queue_memcpy.h:32
long size(void)
Definition: queue_memcpy.cc:30
long annode_size_
Definition: queue_memcpy.h:27
char push(void *data)
Definition: queue_memcpy.cc:66
long node_size(void)
Definition: queue_memcpy.cc:39
int is_full(void)
Definition: queue_memcpy.cc:32
char flush(void)
Definition: queue_memcpy.cc:21


xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23