33 lines
484 B
C
33 lines
484 B
C
|
|
#pragma once
|
||
|
|
#include<iostream>
|
||
|
|
#include<queue>
|
||
|
|
#include<map>
|
||
|
|
|
||
|
|
using namespace std;
|
||
|
|
|
||
|
|
#define BUFF_SIZE 204800
|
||
|
|
#define CACHE_SIZE 21
|
||
|
|
#define CS_SPLIT 20
|
||
|
|
|
||
|
|
|
||
|
|
struct TCACHE{
|
||
|
|
char buff[BUFF_SIZE];
|
||
|
|
int length;
|
||
|
|
};
|
||
|
|
|
||
|
|
typedef queue<TCACHE> QT_CACHE;
|
||
|
|
|
||
|
|
struct SUB_ADDR{
|
||
|
|
short mode;
|
||
|
|
char addr[20];
|
||
|
|
short addrbit;
|
||
|
|
};
|
||
|
|
|
||
|
|
class SU_MODE{
|
||
|
|
public:
|
||
|
|
static const short NORMAL = 0;
|
||
|
|
static const short UNKNOW = 1;
|
||
|
|
static const short BINARY = 2;
|
||
|
|
};
|
||
|
|
typedef map<int,SUB_ADDR> MP_ADDR;
|