public override CommandHandlerResponse Handle(IFiscalPrinterState fiscalPrinterState)
        {
            var state        = fiscalPrinterState as FiscalPrinterState;
            var baseDLEValue = (byte)0x70;

            baseDLEValue += state.IsInOnlineMode ? (byte)0x04 : (byte)0x00;
            baseDLEValue += state.IsInOutOfPaperState ? (byte)0x02 : (byte)0x00;
            baseDLEValue += state.IsInInternalErrorState ? (byte)0x01 : (byte)0x00;

            var response = new OneByteFiscalPrinterCommand((byte)(baseDLEValue & 0xFF));

            return(new CommandHandlerResponse(response));
        }
        public override CommandHandlerResponse Handle(IFiscalPrinterState fiscalPrinterState)
        {
            var state       = fiscalPrinterState as FiscalPrinterState;
            var enqResponse = (byte)0x60;

            enqResponse += state.IsInFiscalState ? (byte)0x08 : (byte)0x00;
            enqResponse += state.LastCommandSuccess ? (byte)0x04 : (byte)0x00;
            enqResponse += state.IsInTransactionState ? (byte)0x02 : (byte)0x00;
            enqResponse += state.LastTransactionSuccess ? (byte)0x01 : (byte)0x00;

            var response = new OneByteFiscalPrinterCommand((byte)(enqResponse & 0xFF));

            return(new CommandHandlerResponse(response));
        }