-
Notifications
You must be signed in to change notification settings - Fork 21
/
common.h
45 lines (34 loc) · 1.14 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef COMMON_H
#define COMMON_H
#include <vector>
#include <list>
#include <chrono>
#include <ratio>
#include <sstream>
#include <iomanip>
#include <mutex>
#include <algorithm>
#include <memory>
#include <atomic>
#include <cstring>
#define CAN_CHANGE_DIRECTION false
#define DISTANCE_INFINITY INT_MAX
typedef std::chrono::duration<int,std::milli> duration_millisecond;
typedef std::chrono::duration<int> duration_second;
typedef std::chrono::duration<int,std::ratio<60*60>> duration_hour;
typedef std::unique_lock<std::mutex> UNIQUE_LCK;
enum {
AGV_LINE_COLOR_WHITE = 0, //未算出路径最小值
AGV_LINE_COLOR_GRAY, //已经计算出一定的值,在Q队列中,但是尚未计算出最小值
AGV_LINE_COLOR_BLACK, //已算出路径最小值
};
std::string getTimeStrNow();
std::string getTimeStrToday();
std::string getTimeStrTomorrow();
std::string toHexString(char *data, int len);
std::string intToString(int i);
std::vector<std::string> split(std::string src,std::string sp);
#ifndef WIN32
void memcpy_s(void *__restrict __dest, size_t __m,const void *__restrict __src, size_t __n);
#endif
#endif // COMMON_H