#ifndef ICONFIG_H #define ICONFIG_H // !ICONFIG_H #include #include "PaperSize.h" #ifdef unix typedef char byte; #else typedef unsigned char byte; #endif static std::map SupPaperTyps = { {{TwSS::A3,PaperAlign::Rot0},0}, {{TwSS::A4,PaperAlign::Rot0},1}, {{TwSS::A4,PaperAlign::Rot270},2}, {{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}, {{TwSS::USStatement,PaperAlign::Rot0},16}, {{TwSS::MaxSize,PaperAlign::Rot0},16} }; static std::map SupPixelTypes = { {0, 0},//bw {1, 0},//gray {2, 1}//color }; static std::map SupResolutions = { {300.0f, 0}, {200.0f, 1}, {600.0f, 1} }; static std::map 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; unsigned int screw_detect_level : 3; unsigned int unused_one : 6; unsigned int pc_correct : 1; unsigned int unused_two : 11; }; } ConfigParam; class IConfig { public: IConfig(void) {}; virtual ~IConfig(void) {}; virtual unsigned int GetData() = 0; protected: ConfigParam m_param; }; #endif