//		CodeGenerator.h


#define 	HDBARCODE_PORT      8877
#define     UDP_QUERY           "HDBARCODE?"
#define     UDP_RESPONSE        "HDBARCODE="


enum SpecialPacketBytes
{
    EndPacketByte           =   0xAA,
    EscPacketByte           =   0xAB
};


enum CodeGeneratorCommandCodes
{
    SetGeometry             =   0x11,
    SetText                 =   0x21,
    AppendText              =   0x22,
    SetBinary               =   0x31,
    AppendBinary            =   0x32,
    SetSecretPhrase         =   0x41,
    SetIdentificationTag    =   0x42,
    GeneratePublic          =   0x51,
    GenerateCompanyPrivate  =   0x52,
    GeneratePermanentAuth   =   0x53,
    GenerateTemporaryAuth   =   0x54,
    RetrieveFirstLine       =   0x61,
    RetrieveNextLine        =   0x62
};


enum CodeGeneratorErrorCodes
{
	NoError                 =	0x00,

	CommandCodeNotValid     =	0x01,
	TooLittlePacketData		=	0x02,
	TooMuchPacketData		=	0x03,
	InvalidTextString       =	0x04,
	OutOfMemory				=	0x05,
    KeyCardHasExpired       =   0x06,

	RowsNotValid			=	0x11,
	ColumnsNotValid			=	0x12,
	ErrorCorrectionNotValid	=	0x13,
	GridSizeNotValid		=	0x14,
	StyleNotValid			=	0x15,
	ThicknessNotValid		=	0x16,
	
	GeometryNotSet          =   0x51,
	DataToEncodeNotSet		=	0x52,
	SecretPhraseNotSet		=	0x53,
	TooMuchDataForGeometry	=	0x54,

	BitmapNotSet			=	0x61,
	NoMoreLines				=	0x62
};
