2020-03-11 01:58:06 +00:00
|
|
|
|
#ifndef ICONFIG_H
|
|
|
|
|
#define ICONFIG_H
|
|
|
|
|
// !ICONFIG_H
|
|
|
|
|
#include <map>
|
|
|
|
|
#include "PublicFunc.h"
|
|
|
|
|
#include "PaperSize.h"
|
2020-12-10 02:01:22 +00:00
|
|
|
|
#define FOR_LANXUM
|
2020-03-11 01:58:06 +00:00
|
|
|
|
|
|
|
|
|
static std::map<PaperStatus, unsigned int> SupPaperTyps = {
|
2020-05-16 01:41:26 +00:00
|
|
|
|
#ifdef G200
|
2020-12-10 02:01:22 +00:00
|
|
|
|
#ifdef FOR_LANXUM
|
2020-03-11 01:58:06 +00:00
|
|
|
|
{{TwSS::A3,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::A4,PaperAlign::Rot0},1},
|
|
|
|
|
{{TwSS::A4,PaperAlign::Rot270},2},
|
2020-12-10 02:01:22 +00:00
|
|
|
|
{{TwSS::A5,PaperAlign::Rot0 },3},
|
|
|
|
|
{{TwSS::A5,PaperAlign::Rot270},4},
|
|
|
|
|
{{TwSS::A6,PaperAlign::Rot0},5},
|
|
|
|
|
{{TwSS::A6,PaperAlign::Rot270},6},
|
|
|
|
|
{{TwSS::B4,PaperAlign::Rot0},7},
|
|
|
|
|
{{TwSS::B5,PaperAlign::Rot0},8},
|
|
|
|
|
{{TwSS::B5,PaperAlign::Rot270},9},
|
|
|
|
|
{{TwSS::B6,PaperAlign::Rot0},10},
|
|
|
|
|
{{TwSS::B6,PaperAlign::Rot270},11},
|
|
|
|
|
{{TwSS::USLetter,PaperAlign::Rot0},14},
|
|
|
|
|
{{TwSS::USLetter,PaperAlign::Rot270},15},
|
|
|
|
|
{{TwSS::USLedger,PaperAlign::Rot0},12},
|
|
|
|
|
{{TwSS::USLegal,PaperAlign::Rot0},13},
|
|
|
|
|
{{TwSS::None,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::USStatement,PaperAlign::Rot0},16},
|
|
|
|
|
{{TwSS::MaxSize,PaperAlign::Rot0},16}
|
|
|
|
|
#else
|
|
|
|
|
{{TwSS::A3,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::A4,PaperAlign::Rot0},1},
|
|
|
|
|
{{TwSS::A4,PaperAlign::Rot270},2},
|
2020-03-11 01:58:06 +00:00
|
|
|
|
{{TwSS::A5,PaperAlign::Rot0 },2},
|
|
|
|
|
{{TwSS::A5,PaperAlign::Rot270},2},
|
|
|
|
|
{{TwSS::A6,PaperAlign::Rot0},2},
|
|
|
|
|
{{TwSS::A6,PaperAlign::Rot270},2},
|
|
|
|
|
{{TwSS::B4,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::B5,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::B5,PaperAlign::Rot270},1},
|
|
|
|
|
{{TwSS::B6,PaperAlign::Rot0},2},
|
|
|
|
|
{{TwSS::B6,PaperAlign::Rot270},2},
|
|
|
|
|
{{TwSS::USLetter,PaperAlign::Rot0},1},
|
|
|
|
|
{{TwSS::USLetter,PaperAlign::Rot270},2},
|
|
|
|
|
{{TwSS::USLedger,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::USLegal,PaperAlign::Rot0},0},
|
|
|
|
|
{{TwSS::None,PaperAlign::Rot0},0},
|
2020-05-16 01:41:26 +00:00
|
|
|
|
{{TwSS::USStatement,PaperAlign::Rot0},16},
|
2020-03-11 01:58:06 +00:00
|
|
|
|
{{TwSS::MaxSize,PaperAlign::Rot0},16}
|
2020-12-10 02:01:22 +00:00
|
|
|
|
#endif
|
2020-05-16 01:41:26 +00:00
|
|
|
|
#else
|
2020-06-20 03:15:56 +00:00
|
|
|
|
{{TwSS::A3,PaperAlign::Rot0},G400_A3},
|
2020-05-16 01:41:26 +00:00
|
|
|
|
{{TwSS::A4,PaperAlign::Rot0},G400_A4},
|
|
|
|
|
{{TwSS::A4,PaperAlign::Rot270},G400_A4R},
|
|
|
|
|
{{TwSS::A5,PaperAlign::Rot0 },G400_A5},
|
|
|
|
|
{{TwSS::A5,PaperAlign::Rot270},G400_A5R},
|
|
|
|
|
{{TwSS::A6,PaperAlign::Rot0},G400_A6},
|
|
|
|
|
{{TwSS::A6,PaperAlign::Rot270},G400_A6R},
|
|
|
|
|
{{TwSS::B4,PaperAlign::Rot0},G400_B4},
|
|
|
|
|
{{TwSS::B5,PaperAlign::Rot0},G400_B5},
|
|
|
|
|
{{TwSS::B5,PaperAlign::Rot270},G400_B5R},
|
|
|
|
|
{{TwSS::B6,PaperAlign::Rot0},G400_B6},
|
|
|
|
|
{{TwSS::B6,PaperAlign::Rot270},G400_B6R},
|
|
|
|
|
{{TwSS::USLetter,PaperAlign::Rot0},G400_LETTER},
|
|
|
|
|
{{TwSS::USLetter,PaperAlign::Rot270},G400_LETTERR},
|
|
|
|
|
{{TwSS::USLedger,PaperAlign::Rot0},G400_DOUBLELETTER},
|
|
|
|
|
{{TwSS::USLegal,PaperAlign::Rot0},G400_LEGAL},
|
2020-06-20 03:15:56 +00:00
|
|
|
|
#ifdef G300
|
|
|
|
|
{{TwSS::None,PaperAlign::Rot0},G400_A4},
|
|
|
|
|
#else // G300
|
|
|
|
|
{{TwSS::None,PaperAlign::Rot0},G400_A3},
|
|
|
|
|
#endif
|
2020-05-16 01:41:26 +00:00
|
|
|
|
{{TwSS::MaxSize,PaperAlign::Rot0},G400_LONGLETTER},
|
|
|
|
|
#endif
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static std::map<unsigned short, unsigned int> SupPixelTypes = {
|
|
|
|
|
{0, 0},//bw
|
|
|
|
|
{1, 0},//gray
|
2020-12-17 09:02:33 +00:00
|
|
|
|
{2, 1},//color
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static std::map<float, unsigned int> SupResolutions = {
|
2020-04-03 01:27:13 +00:00
|
|
|
|
{100.0f, 1},
|
|
|
|
|
{150.0f, 1},
|
2020-03-11 01:58:06 +00:00
|
|
|
|
{200.0f, 1},
|
2020-04-03 01:27:13 +00:00
|
|
|
|
{240.0f, 1},
|
|
|
|
|
{300.0f, 0},
|
2020-11-16 10:05:04 +00:00
|
|
|
|
{600.0f, 1} //<2F><>ʱ<EFBFBD>汾<EFBFBD><E6B1BE>1 ԭ<><D4AD><EFBFBD><EFBFBD>2
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static std::map<byte, byte> secrewMaps = {
|
|
|
|
|
{1,0},
|
|
|
|
|
{2,1},
|
|
|
|
|
{3,2},
|
|
|
|
|
{4,3},
|
|
|
|
|
{5,4}
|
|
|
|
|
};
|
|
|
|
|
typedef union Config_Param {
|
|
|
|
|
unsigned int value;
|
|
|
|
|
struct {
|
|
|
|
|
unsigned int paper : 5;
|
|
|
|
|
unsigned int color : 1;
|
|
|
|
|
unsigned int dpi : 2;
|
|
|
|
|
unsigned int double_feed_enbale : 1;
|
|
|
|
|
unsigned int stable_enbale : 1;
|
|
|
|
|
unsigned int screw_detect_enable : 1;
|
2020-04-18 03:18:06 +00:00
|
|
|
|
unsigned int screw_detect_level : 3;//<2F><>ʮ<EFBFBD><CAAE>λ
|
2020-03-11 01:58:06 +00:00
|
|
|
|
unsigned int unused_one : 6;
|
|
|
|
|
unsigned int pc_correct : 1;
|
2020-12-10 02:01:22 +00:00
|
|
|
|
unsigned int enable_sizecheck : 1;
|
|
|
|
|
unsigned int enabledsp_cache : 1;
|
|
|
|
|
unsigned int sizeerror_errorratio : 9;
|
2020-03-11 01:58:06 +00:00
|
|
|
|
};
|
|
|
|
|
} ConfigParam;
|
|
|
|
|
|
|
|
|
|
class IConfig
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
IConfig(void) {};
|
|
|
|
|
virtual ~IConfig(void) {};
|
2020-05-16 01:41:26 +00:00
|
|
|
|
virtual unsigned int GetData()=0;
|
2020-03-11 01:58:06 +00:00
|
|
|
|
protected:
|
|
|
|
|
};
|
|
|
|
|
#endif
|