# -*- coding: utf-8 -*-
# AUTO GENERATED FILE

import ctypes
import sys
import json
import datetime
import os
import platform
import warnings

if sys.version_info[0] == 3:
    if platform.system() == 'Windows':
        from winreg import *
    TEXT = str
    RANGE = range
else:
    if platform.system() == 'Windows':
        from _winreg import *
    TEXT = basestring
    RANGE = xrange


class IFptr(object):
    (
        LIBFPTR_PARAM_TEXT,
        LIBFPTR_PARAM_TEXT_WRAP,
        LIBFPTR_PARAM_ALIGNMENT,
        LIBFPTR_PARAM_FONT,
        LIBFPTR_PARAM_FONT_DOUBLE_WIDTH,
        LIBFPTR_PARAM_FONT_DOUBLE_HEIGHT,
        LIBFPTR_PARAM_LINESPACING,
        LIBFPTR_PARAM_BRIGHTNESS,
        LIBFPTR_PARAM_MODEL,
        LIBFPTR_PARAM_RECEIPT_TYPE,
        LIBFPTR_PARAM_REPORT_TYPE,
        LIBFPTR_PARAM_MODE,
        LIBFPTR_PARAM_EXTERNAL_DEVICE_TYPE,
        LIBFPTR_PARAM_EXTERNAL_DEVICE_DATA,
        LIBFPTR_PARAM_FREQUENCY,
        LIBFPTR_PARAM_DURATION,
        LIBFPTR_PARAM_CUT_TYPE,
        LIBFPTR_PARAM_DRAWER_ON_TIMEOUT,
        LIBFPTR_PARAM_DRAWER_OFF_TIMEOUT,
        LIBFPTR_PARAM_DRAWER_ON_QUANTITY,
        LIBFPTR_PARAM_TIMEOUT_ENQ,
        LIBFPTR_PARAM_COMMAND_BUFFER,
        LIBFPTR_PARAM_ANSWER_BUFFER,
        LIBFPTR_PARAM_SERIAL_NUMBER,
        LIBFPTR_PARAM_MANUFACTURER_CODE,
        LIBFPTR_PARAM_NO_NEED_ANSWER,
        LIBFPTR_PARAM_INFO_DISCOUNT_SUM,
        LIBFPTR_PARAM_USE_ONLY_TAX_TYPE,
        LIBFPTR_PARAM_PAYMENT_TYPE,
        LIBFPTR_PARAM_PAYMENT_SUM,
        LIBFPTR_PARAM_REMAINDER,
        LIBFPTR_PARAM_CHANGE,
        LIBFPTR_PARAM_DEPARTMENT,
        LIBFPTR_PARAM_TAX_TYPE,
        LIBFPTR_PARAM_TAX_SUM,
        LIBFPTR_PARAM_TAX_MODE,
        LIBFPTR_PARAM_RECEIPT_ELECTRONICALLY,
        LIBFPTR_PARAM_USER_PASSWORD,
        LIBFPTR_PARAM_SCALE,
        LIBFPTR_PARAM_LEFT_MARGIN,
        LIBFPTR_PARAM_BARCODE,
        LIBFPTR_PARAM_BARCODE_TYPE,
        LIBFPTR_PARAM_BARCODE_PRINT_TEXT,
        LIBFPTR_PARAM_BARCODE_VERSION,
        LIBFPTR_PARAM_BARCODE_CORRECTION,
        LIBFPTR_PARAM_BARCODE_COLUMNS,
        LIBFPTR_PARAM_BARCODE_INVERT,
        LIBFPTR_PARAM_HEIGHT,
        LIBFPTR_PARAM_WIDTH,
        LIBFPTR_PARAM_FILENAME,
        LIBFPTR_PARAM_PICTURE_NUMBER,
        LIBFPTR_PARAM_DATA_TYPE,
        LIBFPTR_PARAM_OPERATOR_ID,
        LIBFPTR_PARAM_LOGICAL_NUMBER,
        LIBFPTR_PARAM_DATE_TIME,
        LIBFPTR_PARAM_FISCAL,
        LIBFPTR_PARAM_SHIFT_STATE,
        LIBFPTR_PARAM_CASHDRAWER_OPENED,
        LIBFPTR_PARAM_RECEIPT_PAPER_PRESENT,
        LIBFPTR_PARAM_COVER_OPENED,
        LIBFPTR_PARAM_SUBMODE,
        LIBFPTR_PARAM_RECEIPT_NUMBER,
        LIBFPTR_PARAM_DOCUMENT_NUMBER,
        LIBFPTR_PARAM_SHIFT_NUMBER,
        LIBFPTR_PARAM_RECEIPT_SUM,
        LIBFPTR_PARAM_RECEIPT_LINE_LENGTH,
        LIBFPTR_PARAM_RECEIPT_LINE_LENGTH_PIX,
        LIBFPTR_PARAM_MODEL_NAME,
        LIBFPTR_PARAM_UNIT_VERSION,
        LIBFPTR_PARAM_PRINTER_CONNECTION_LOST,
        LIBFPTR_PARAM_PRINTER_ERROR,
        LIBFPTR_PARAM_CUT_ERROR,
        LIBFPTR_PARAM_PRINTER_OVERHEAT,
        LIBFPTR_PARAM_UNIT_TYPE,
        LIBFPTR_PARAM_LICENSE_NUMBER,
        LIBFPTR_PARAM_LICENSE_ENTERED,
        LIBFPTR_PARAM_LICENSE,
        LIBFPTR_PARAM_SUM,
        LIBFPTR_PARAM_COUNT,
        LIBFPTR_PARAM_COUNTER_TYPE,
        LIBFPTR_PARAM_STEP_COUNTER_TYPE,
        LIBFPTR_PARAM_ERROR_TAG_NUMBER,
        LIBFPTR_PARAM_TABLE,
        LIBFPTR_PARAM_ROW,
        LIBFPTR_PARAM_FIELD,
        LIBFPTR_PARAM_FIELD_VALUE,
        LIBFPTR_PARAM_FN_DATA_TYPE,
        LIBFPTR_PARAM_TAG_NUMBER,
        LIBFPTR_PARAM_TAG_VALUE,
        LIBFPTR_PARAM_DOCUMENTS_COUNT,
        LIBFPTR_PARAM_FISCAL_SIGN,
        LIBFPTR_PARAM_DEVICE_FFD_VERSION,
        LIBFPTR_PARAM_FN_FFD_VERSION,
        LIBFPTR_PARAM_FFD_VERSION,
        LIBFPTR_PARAM_CHECK_SUM,
        LIBFPTR_PARAM_COMMODITY_NAME,
        LIBFPTR_PARAM_PRICE,
        LIBFPTR_PARAM_QUANTITY,
        LIBFPTR_PARAM_POSITION_SUM,
        LIBFPTR_PARAM_FN_TYPE,
        LIBFPTR_PARAM_FN_VERSION,
        LIBFPTR_PARAM_REGISTRATIONS_REMAIN,
        LIBFPTR_PARAM_REGISTRATIONS_COUNT,
        LIBFPTR_PARAM_NO_ERROR_IF_NOT_SUPPORTED,
        LIBFPTR_PARAM_OFD_EXCHANGE_STATUS,
        LIBFPTR_PARAM_FN_ERROR_DATA,
        LIBFPTR_PARAM_FN_ERROR_CODE,
        LIBFPTR_PARAM_ENVD_MODE,
        LIBFPTR_PARAM_DOCUMENT_CLOSED,
        LIBFPTR_PARAM_JSON_DATA,
        LIBFPTR_PARAM_COMMAND_SUBSYSTEM,
        LIBFPTR_PARAM_FN_OPERATION_TYPE,
        LIBFPTR_PARAM_FN_STATE,
        LIBFPTR_PARAM_ENVD_MODE_ENABLED,
        LIBFPTR_PARAM_SETTING_ID,
        LIBFPTR_PARAM_SETTING_VALUE,
        LIBFPTR_PARAM_MAPPING_KEY,
        LIBFPTR_PARAM_MAPPING_VALUE,
        LIBFPTR_PARAM_COMMODITY_PIECE,
        LIBFPTR_PARAM_POWER_SOURCE_TYPE,
        LIBFPTR_PARAM_BATTERY_CHARGE,
        LIBFPTR_PARAM_VOLTAGE,
        LIBFPTR_PARAM_USE_BATTERY,
        LIBFPTR_PARAM_BATTERY_CHARGING,
        LIBFPTR_PARAM_CAN_PRINT_WHILE_ON_BATTERY,
        LIBFPTR_PARAM_MAC_ADDRESS,
        LIBFPTR_PARAM_FN_FISCAL,
        LIBFPTR_PARAM_NETWORK_ERROR,
        LIBFPTR_PARAM_OFD_ERROR,
        LIBFPTR_PARAM_FN_ERROR,
        LIBFPTR_PARAM_COMMAND_CODE,
        LIBFPTR_PARAM_PRINTER_TEMPERATURE,
        LIBFPTR_PARAM_RECORDS_TYPE,
        LIBFPTR_PARAM_OFD_FISCAL_SIGN,
        LIBFPTR_PARAM_HAS_OFD_TICKET,
        LIBFPTR_PARAM_NO_SERIAL_NUMBER,
        LIBFPTR_PARAM_RTC_FAULT,
        LIBFPTR_PARAM_SETTINGS_FAULT,
        LIBFPTR_PARAM_COUNTERS_FAULT,
        LIBFPTR_PARAM_USER_MEMORY_FAULT,
        LIBFPTR_PARAM_SERVICE_COUNTERS_FAULT,
        LIBFPTR_PARAM_ATTRIBUTES_FAULT,
        LIBFPTR_PARAM_FN_FAULT,
        LIBFPTR_PARAM_INVALID_FN,
        LIBFPTR_PARAM_HARD_FAULT,
        LIBFPTR_PARAM_MEMORY_MANAGER_FAULT,
        LIBFPTR_PARAM_SCRIPTS_FAULT,
        LIBFPTR_PARAM_FULL_RESET,
        LIBFPTR_PARAM_WAIT_FOR_REBOOT,
        LIBFPTR_PARAM_SCALE_PERCENT,
        LIBFPTR_PARAM_FN_NEED_REPLACEMENT,
        LIBFPTR_PARAM_FN_RESOURCE_EXHAUSTED,
        LIBFPTR_PARAM_FN_MEMORY_OVERFLOW,
        LIBFPTR_PARAM_FN_OFD_TIMEOUT,
        LIBFPTR_PARAM_FN_CRITICAL_ERROR,
        LIBFPTR_PARAM_OFD_MESSAGE_READ,
        LIBFPTR_PARAM_DEVICE_MIN_FFD_VERSION,
        LIBFPTR_PARAM_DEVICE_MAX_FFD_VERSION,
        LIBFPTR_PARAM_DEVICE_UPTIME,
        LIBFPTR_PARAM_NOMENCLATURE_TYPE,
        LIBFPTR_PARAM_GTIN,
        LIBFPTR_PARAM_FN_DOCUMENT_TYPE,
        LIBFPTR_PARAM_NETWORK_ERROR_TEXT,
        LIBFPTR_PARAM_FN_ERROR_TEXT,
        LIBFPTR_PARAM_OFD_ERROR_TEXT,
        LIBFPTR_PARAM_USER_SCRIPT_ID,
        LIBFPTR_PARAM_USER_SCRIPT_PARAMETER,
        LIBFPTR_PARAM_USER_MEMORY_OPERATION,
        LIBFPTR_PARAM_USER_MEMORY_DATA,
        LIBFPTR_PARAM_USER_MEMORY_STRING,
        LIBFPTR_PARAM_USER_MEMORY_ADDRESS,
        LIBFPTR_PARAM_FN_PRESENT,
        LIBFPTR_PARAM_BLOCKED,
        LIBFPTR_PARAM_DOCUMENT_PRINTED,
        LIBFPTR_PARAM_DISCOUNT_SUM,
        LIBFPTR_PARAM_SURCHARGE_SUM,
        LIBFPTR_PARAM_LK_USER_CODE,
        LIBFPTR_PARAM_LICENSE_COUNT,
        LIBFPTR_PARAM_DEFER,
        LIBFPTR_PARAM_CAP_54FZ,
        LIBFPTR_PARAM_CAP_MANUAL_CLICHE_CONTROL,
        LIBFPTR_PARAM_CAP_PAYMENTS_COUNT,
        LIBFPTR_PARAM_FIRMWARE_CHUNK_SIZE,
        LIBFPTR_PARAM_FIRMWARE_CHUNK_DATA,
        LIBFPTR_PARAM_FN_FLAGS,
        LIBFPTR_PARAM_PRINT_FOOTER,
        LIBFPTR_PARAM_PUBLIC_KEY,
        LIBFPTR_PARAM_MAGIC_NUMBER,
        LIBFPTR_PARAM_SIGN,
        LIBFPTR_PARAM_SOFT_NAME,
        LIBFPTR_PARAM_SESSION_CODE,
        LIBFPTR_PARAM_ETHERNET_CONFIG_TIMEOUT,
        LIBFPTR_PARAM_ETHERNET_DHCP,
        LIBFPTR_PARAM_ETHERNET_IP,
        LIBFPTR_PARAM_ETHERNET_MASK,
        LIBFPTR_PARAM_ETHERNET_GATEWAY,
        LIBFPTR_PARAM_ETHERNET_PORT,
        LIBFPTR_PARAM_ETHERNET_DNS_IP,
        LIBFPTR_PARAM_ETHERNET_DNS_STATIC,
        LIBFPTR_PARAM_STORE_IN_JOURNAL,
        LIBFPTR_PARAM_NEW_PLATFORM,
        LIBFPTR_PARAM_UNIT_RELEASE_VERSION,
        LIBFPTR_PARAM_USE_VAT18,
        LIBFPTR_PARAM_TAG_NAME,
        LIBFPTR_PARAM_TAG_TYPE,
        LIBFPTR_PARAM_TAG_IS_COMPLEX,
        LIBFPTR_PARAM_TAG_IS_REPEATABLE,
        LIBFPTR_PARAM_SHIFT_AUTO_OPENED,
        LIBFPTR_PARAM_CONTAINER_FIRMWARE_VERSION,
        LIBFPTR_PARAM_CONTAINER_CONFIGURATION_VERSION,
        LIBFPTR_PARAM_CONTAINER_BOOTLOADER_VERSION,
        LIBFPTR_PARAM_CONTAINER_SCRIPTS_VERSION,
        LIBFPTR_PARAM_PAPER_NEAR_END,
        LIBFPTR_PARAM_REPORT_ELECTRONICALLY,
        LIBFPTR_PARAM_ACTIVATION_METHOD,
        LIBFPTR_PARAM_KEYS,
        LIBFPTR_PARAM_UIN,
        LIBFPTR_PARAM_VERSION,
        LIBFPTR_PARAM_PUBLIC_KEY_SIGN,
        LIBFPTR_PARAM_CAP_DISABLE_PRINT_REPORTS,
        LIBFPTR_PARAM_REGISTRATION_NUMBER,
        LIBFPTR_PARAM_PIXEL_BUFFER,
        LIBFPTR_PARAM_REPEAT_NUMBER,
        LIBFPTR_PARAM_FIELD_TYPE,
        LIBFPTR_PARAM_MARKING_CODE,
        LIBFPTR_PARAM_CONTAINER_DIRECT_BOOT_VERSION,
        LIBFPTR_PARAM_SCRIPT_NAME,
        LIBFPTR_PARAM_SCRIPT_HASH,
        LIBFPTR_PARAM_RECORDS_ID,
        LIBFPTR_PARAM_USER_SCRIPT_RESULT_1,
        LIBFPTR_PARAM_USER_SCRIPT_RESULT_2,
        LIBFPTR_PARAM_USER_SCRIPT_RESULT_3,
        LIBFPTR_PARAM_USER_SCRIPT_RESULT_4,
        LIBFPTR_PARAM_USER_SCRIPT_RESULT_5,
        LIBFPTR_PARAM_IS_USER_SCRIPT,
        LIBFPTR_PARAM_DOCUMENT_NUMBER_END,
        LIBFPTR_PARAM_SHIFT_NUMBER_END,
        LIBFPTR_PARAM_SCRIPT_CODE,
        LIBFPTR_PARAM_SCRIPT_RESULT,
        LIBFPTR_PARAM_SCRIPT_TYPE,
        LIBFPTR_PARAM_WIFI_CONFIG_TIMEOUT,
        LIBFPTR_PARAM_WIFI_DHCP,
        LIBFPTR_PARAM_WIFI_IP,
        LIBFPTR_PARAM_WIFI_MASK,
        LIBFPTR_PARAM_WIFI_GATEWAY,
        LIBFPTR_PARAM_WIFI_PORT,
        LIBFPTR_PARAM_UC_VERSION,
        LIBFPTR_PARAM_UC_AVAILABLE_MEMORY,
        LIBFPTR_PARAM_UC_USED_MEMORY_BY_SUMS,
        LIBFPTR_PARAM_UC_USED_MEMORY_BY_QUANTITIES,
        LIBFPTR_PARAM_UC_LAYER_1,
        LIBFPTR_PARAM_UC_FLAGS_1,
        LIBFPTR_PARAM_UC_MASK_1,
        LIBFPTR_PARAM_UC_LAYER_VALUE_1,
        LIBFPTR_PARAM_UC_LAYER_2,
        LIBFPTR_PARAM_UC_FLAGS_2,
        LIBFPTR_PARAM_UC_MASK_2,
        LIBFPTR_PARAM_UC_LAYER_VALUE_2,
        LIBFPTR_PARAM_UC_LAYER_3,
        LIBFPTR_PARAM_UC_FLAGS_3,
        LIBFPTR_PARAM_UC_MASK_3,
        LIBFPTR_PARAM_UC_LAYER_VALUE_3,
        LIBFPTR_PARAM_UC_LAYER_4,
        LIBFPTR_PARAM_UC_FLAGS_4,
        LIBFPTR_PARAM_UC_MASK_4,
        LIBFPTR_PARAM_UC_LAYER_VALUE_4,
        LIBFPTR_PARAM_RECEIPTS_COUNT,
        LIBFPTR_PARAM_PAYMENTS_SUM_CASH,
        LIBFPTR_PARAM_PAYMENTS_SUM_ELECTRONICALLY,
        LIBFPTR_PARAM_PAYMENTS_SUM_PREPAID,
        LIBFPTR_PARAM_PAYMENTS_SUM_CREDIT,
        LIBFPTR_PARAM_PAYMENTS_SUM_OTHER,
        LIBFPTR_PARAM_TAXES_SUM_VAT20,
        LIBFPTR_PARAM_TAXES_SUM_VAT120,
        LIBFPTR_PARAM_TAXES_SUM_VAT10,
        LIBFPTR_PARAM_TAXES_SUM_VAT110,
        LIBFPTR_PARAM_TAXES_SUM_VAT0,
        LIBFPTR_PARAM_TAXES_SUM_NO,
        LIBFPTR_PARAM_CORRECTIONS_COUNT,
        LIBFPTR_PARAM_CORRECTIONS_SUM,
        LIBFPTR_PARAM_FN_COUNTERS_TYPE,
        LIBFPTR_PARAM_FN_DAYS_REMAIN,
        LIBFPTR_PARAM_FREE_MEMORY,
        LIBFPTR_PARAM_FN_MAX_FFD_VERSION,
        LIBFPTR_PARAM_RECEIPTS_SUM,
        LIBFPTR_PARAM_LICENSE_NAME,
        LIBFPTR_PARAM_UNIVERSAL_COUNTERS_FAULT,
        LIBFPTR_PARAM_USE_LICENSES,
        LIBFPTR_PARAM_LICENSE_VALID_FROM,
        LIBFPTR_PARAM_LICENSE_VALID_UNTIL,
        LIBFPTR_PARAM_MARKING_CODE_TYPE,
        LIBFPTR_PARAM_SETTING_NAME,
        LIBFPTR_PARAM_SETTING_TYPE,
        LIBFPTR_PARAM_FONT_WIDTH,
        LIBFPTR_PARAM_REMOTE_CALL,
        LIBFPTR_PARAM_SCRIPT_PARAMS,
        LIBFPTR_PARAM_IGNORE_EMPTY,
        LIBFPTR_PARAM_METHOD_DATA,
        LIBFPTR_PARAM_METHOD_RESULT,
        LIBFPTR_PARAM_RPC_SERVER_OS,
        LIBFPTR_PARAM_RPC_SERVER_VERSION,
        LIBFPTR_PARAM_RPC_DRIVER_VERSION,
        LIBFPTR_PARAM_LOCKED,
        LIBFPTR_PARAM_BOUND,
        LIBFPTR_PARAM_COMMODITIES_TABLE_FAULT,
        LIBFPTR_PARAM_HAS_ADDITIONAL_DATA,
        LIBFPTR_PARAM_FISCAL_SIGN_ARCHIVE,
        LIBFPTR_PARAM_COMMAND_GROUP,
        LIBFPTR_PARAM_ERROR_CODE,
        LIBFPTR_PARAM_MARKING_WAIT_FOR_VALIDATION_RESULT,
        LIBFPTR_PARAM_MARKING_CODE_STATUS,
        LIBFPTR_PARAM_MARKING_CODE_VALIDATION_RESULT,
        LIBFPTR_PARAM_MARKING_CODE_OFFLINE_VALIDATION_ERROR,
        LIBFPTR_PARAM_MARKING_CODE_ONLINE_VALIDATION_ERROR,
        LIBFPTR_PARAM_MARKING_CODE_VALIDATION_READY,
        LIBFPTR_PARAM_MEASUREMENT_UNIT,
        LIBFPTR_PARAM_MARKING_PROCESSING_MODE,
        LIBFPTR_PARAM_MARKING_FRACTIONAL_QUANTITY,
        LIBFPTR_PARAM_PRODUCT_CODE,
        LIBFPTR_PARAM_TRADE_MARKED_PRODUCTS,
        LIBFPTR_PARAM_INSURANCE_ACTIVITY,
        LIBFPTR_PARAM_PAWN_SHOP_ACTIVITY,
        LIBFPTR_PARAM_TLV_LIST,
        LIBFPTR_PARAM_CHECK_MARKING_SERVER_READY,
        LIBFPTR_PARAM_MARKING_SERVER_RESPONSE_TIME,
        LIBFPTR_PARAM_MARKING_SERVER_ERROR_CODE,
        LIBFPTR_PARAM_MARKING_SERVER_ERROR_DESCRIPTION,
        LIBFPTR_PARAM_ISM_ERROR,
        LIBFPTR_PARAM_ISM_ERROR_TEXT,
        LIBFPTR_PARAM_MARKING_MODE_CHECKING_STATUS,
        LIBFPTR_PARAM_MARK_CHECKING_COUNT,
        LIBFPTR_PARAM_MARK_SOLD_COUNT,
        LIBFPTR_PARAM_NOTICE_IS_BEGIN,
        LIBFPTR_PARAM_NOTICE_FREE_MEMORY,
        LIBFPTR_PARAM_NOTICE_COUNT,
        LIBFPTR_PARAM_MARKING_NOT_SEND_TO_SERVER,
        LIBFPTR_PARAM_DOCUMENT_TYPE,
        LIBFPTR_PARAM_PRINT_REPORT,
        LIBFPTR_PARAM_FN_EXECUTION,
        LIBFPTR_PARAM_MCU_SN,
        LIBFPTR_PARAM_MCU_PART_ID,
        LIBFPTR_PARAM_MCU_PART_NAME,
        LIBFPTR_PARAM_IS_REQUEST_SENT,
        LIBFPTR_PARAM_FN_CHECK_MARK_TIME,
        LIBFPTR_PARAM_SENDING_MARK_TIME,
        LIBFPTR_PARAM_MARKING_SERVER_EXCHANGE_TIME,
        LIBFPTR_PARAM_FULL_SENDING_MARK_TIME,
        LIBFPTR_PARAM_MARK_CHECKING_STATUS_IN_CASH,
        LIBFPTR_PARAM_MARK_CHECKING_TYPE_IN_CASH,
        LIBFPTR_PARAM_MARK_CHECKING_STAGE_IN_CASH,
        LIBFPTR_PARAM_MARKING_CODE_ONLINE_VALIDATION_RESULT,
        LIBFPTR_PARAM_MARKING_CODE_ONLINE_VALIDATION_ERROR_DESCRIPTION,
        LIBFPTR_PARAM_FN_CONTAINS_KEYS_UPDATER_SERVER_URI,
        LIBFPTR_PARAM_MARKING_CODE_CLEAR,
        LIBFPTR_PARAM_MODULE_ADDRESS,
        LIBFPTR_PARAM_SEGMENT_ADDRESS,
        LIBFPTR_PARAM_LAST_SUCCESSFUL_OKP,
        LIBFPTR_PARAM_FN_SERIAL_NUMBER,
        LIBFPTR_PARAM_ECR_REGISTRATION_NUMBER,
        LIBFPTR_PARAM_OFD_VATIN,
        LIBFPTR_PARAM_FNS_URL,
        LIBFPTR_PARAM_MACHINE_NUMBER,
        LIBFPTR_PARAM_MARKING_PRODUCT_ID,
        LIBFPTR_PARAM_TIMEOUT,
        LIBFPTR_PARAM_PRINT_UPDATE_FNM_KEYS_REPORT,
        LIBFPTR_PARAM_FN_KEYS_UPDATER_SERVER_URI,
        LIBFPTR_PARAM_DOCUMENT_ELECTRONICALLY,
        LIBFPTR_PARAM_FORMAT_TEXT,
        LIBFPTR_PARAM_RECEIPT_SIZE,
        LIBFPTR_PARAM_MARK_SIZE,
        LIBFPTR_PARAM_MCU_TEMPERATURE,
        LIBFPTR_PARAM_DATA_FOR_SEND_IS_EMPTY,
        LIBFPTR_PARAM_AVAILABLE_CLOSING,
        LIBFPTR_PARAM_AVAILABLE_CANCELLATION,
        LIBFPTR_PARAM_AVAILABLE_POSITION_ADDING,
        LIBFPTR_PARAM_AVAILABLE_PAYMENT,
        LIBFPTR_PARAM_AVAILABLE_TOTAL,
        LIBFPTR_PARAM_AVAILABLE_ATTRIBUTES_ADDING,
        LIBFPTR_PARAM_OPERATOR_REGISTERED,
        LIBFPTR_PARAM_DEVICE_PLATFORM_VERSION,
        LIBFPTR_PARAM_GUID,
        LIBFPTR_PARAM_PATTERN_REGISTERS,
        LIBFPTR_PARAM_PATTERN_TAGS,
        LIBFPTR_PARAM_PATTERN_SETTINGS,
    ) = RANGE(65536, 65920)

    (
        LIBFPTR_OK,
        LIBFPTR_ERROR_CONNECTION_DISABLED,
        LIBFPTR_ERROR_NO_CONNECTION,
        LIBFPTR_ERROR_PORT_BUSY,
        LIBFPTR_ERROR_PORT_NOT_AVAILABLE,
        LIBFPTR_ERROR_INCORRECT_DATA,
        LIBFPTR_ERROR_INTERNAL,
        LIBFPTR_ERROR_UNSUPPORTED_CAST,
        LIBFPTR_ERROR_NO_REQUIRED_PARAM,
        LIBFPTR_ERROR_INVALID_SETTINGS,
        LIBFPTR_ERROR_NOT_CONFIGURED,
        LIBFPTR_ERROR_NOT_SUPPORTED,
        LIBFPTR_ERROR_INVALID_MODE,
        LIBFPTR_ERROR_INVALID_PARAM,
        LIBFPTR_ERROR_NOT_LOADED,
        LIBFPTR_ERROR_UNKNOWN,
        LIBFPTR_ERROR_INVALID_SUM,
        LIBFPTR_ERROR_INVALID_QUANTITY,
        LIBFPTR_ERROR_CASH_COUNTER_OVERFLOW,
        LIBFPTR_ERROR_LAST_OPERATION_STORNO_DENIED,
        LIBFPTR_ERROR_STORNO_BY_CODE_DENIED,
        LIBFPTR_ERROR_LAST_OPERATION_NOT_REPEATABLE,
        LIBFPTR_ERROR_DISCOUNT_NOT_REPEATABLE,
        LIBFPTR_ERROR_DISCOUNT_DENIED,
        LIBFPTR_ERROR_INVALID_COMMODITY_CODE,
        LIBFPTR_ERROR_INVALID_COMMODITY_BARCODE,
        LIBFPTR_ERROR_INVALID_COMMAND_FORMAT,
        LIBFPTR_ERROR_INVALID_COMMAND_LENGTH,
        LIBFPTR_ERROR_BLOCKED_IN_DATE_INPUT_MODE,
        LIBFPTR_ERROR_NEED_DATE_ACCEPT,
        LIBFPTR_ERROR_NO_MORE_DATA,
        LIBFPTR_ERROR_NO_ACCEPT_OR_CANCEL,
        LIBFPTR_ERROR_BLOCKED_BY_REPORT_INTERRUPTION,
        LIBFPTR_ERROR_DISABLE_CASH_CONTROL_DENIED,
        LIBFPTR_ERROR_MODE_BLOCKED,
        LIBFPTR_ERROR_CHECK_DATE_TIME,
        LIBFPTR_ERROR_DATE_TIME_LESS_THAN_FS,
        LIBFPTR_ERROR_CLOSE_ARCHIVE_DENIED,
        LIBFPTR_ERROR_COMMODITY_NOT_FOUND,
        LIBFPTR_ERROR_WEIGHT_BARCODE_WITH_INVALID_QUANTITY,
        LIBFPTR_ERROR_RECEIPT_BUFFER_OVERFLOW,
        LIBFPTR_ERROR_QUANTITY_TOO_FEW,
        LIBFPTR_ERROR_STORNO_TOO_MUCH,
        LIBFPTR_ERROR_BLOCKED_COMMODITY_NOT_FOUND,
        LIBFPTR_ERROR_NO_PAPER,
        LIBFPTR_ERROR_COVER_OPENED,
        LIBFPTR_ERROR_PRINTER_FAULT,
        LIBFPTR_ERROR_MECHANICAL_FAULT,
        LIBFPTR_ERROR_INVALID_RECEIPT_TYPE,
        LIBFPTR_ERROR_INVALID_UNIT_TYPE,
        LIBFPTR_ERROR_NO_MEMORY,
        LIBFPTR_ERROR_PICTURE_NOT_FOUND,
        LIBFPTR_ERROR_NONCACH_PAYMENTS_TOO_MUCH,
        LIBFPTR_ERROR_RETURN_DENIED,
        LIBFPTR_ERROR_PAYMENTS_OVERFLOW,
        LIBFPTR_ERROR_BUSY,
        LIBFPTR_ERROR_GSM,
        LIBFPTR_ERROR_INVALID_DISCOUNT,
        LIBFPTR_ERROR_OPERATION_AFTER_DISCOUNT_DENIED,
        LIBFPTR_ERROR_INVALID_DEPARTMENT,
        LIBFPTR_ERROR_INVALID_PAYMENT_TYPE,
        LIBFPTR_ERROR_MULTIPLICATION_OVERFLOW,
        LIBFPTR_ERROR_DENIED_BY_SETTINGS,
        LIBFPTR_ERROR_TOTAL_OVERFLOW,
        LIBFPTR_ERROR_DENIED_IN_ANNULATION_RECEIPT,
        LIBFPTR_ERROR_JOURNAL_OVERFLOW,
        LIBFPTR_ERROR_NOT_FULLY_PAID,
        LIBFPTR_ERROR_DENIED_IN_RETURN_RECEIPT,
        LIBFPTR_ERROR_SHIFT_EXPIRED,
        LIBFPTR_ERROR_DENIED_IN_SELL_RECEIPT,
        LIBFPTR_ERROR_FISCAL_MEMORY_OVERFLOW,
        LIBFPTR_ERROR_INVALID_PASSWORD,
        LIBFPTR_ERROR_JOURNAL_BUSY,
        LIBFPTR_ERROR_DENIED_IN_CLOSED_SHIFT,
        LIBFPTR_ERROR_INVALID_TABLE_NUMBER,
        LIBFPTR_ERROR_INVALID_ROW_NUMBER,
        LIBFPTR_ERROR_INVALID_FIELD_NUMBER,
        LIBFPTR_ERROR_INVALID_DATE_TIME,
        LIBFPTR_ERROR_INVALID_STORNO_SUM,
        LIBFPTR_ERROR_CHANGE_CALCULATION,
        LIBFPTR_ERROR_NO_CASH,
        LIBFPTR_ERROR_DENIED_IN_CLOSED_RECEIPT,
        LIBFPTR_ERROR_DENIED_IN_OPENED_RECEIPT,
        LIBFPTR_ERROR_DENIED_IN_OPENED_SHIFT,
        LIBFPTR_ERROR_SERIAL_NUMBER_ALREADY_ENTERED,
        LIBFPTR_ERROR_TOO_MUCH_REREGISTRATIONS,
        LIBFPTR_ERROR_INVALID_SHIFT_NUMBER,
        LIBFPTR_ERROR_INVALID_SERIAL_NUMBER,
        LIBFPTR_ERROR_INVALID_RNM_VATIN,
        LIBFPTR_ERROR_FISCAL_PRINTER_NOT_ACTIVATED,
        LIBFPTR_ERROR_SERIAL_NUMBER_NOT_ENTERED,
        LIBFPTR_ERROR_NO_MORE_REPORTS,
        LIBFPTR_ERROR_MODE_NOT_ACTIVATED,
        LIBFPTR_ERROR_RECORD_NOT_FOUND_IN_JOURNAL,
        LIBFPTR_ERROR_INVALID_LICENSE,
        LIBFPTR_ERROR_NEED_FULL_RESET,
        LIBFPTR_ERROR_DENIED_BY_LICENSE,
        LIBFPTR_ERROR_DISCOUNT_CANCELLATION_DENIED,
        LIBFPTR_ERROR_CLOSE_RECEIPT_DENIED,
        LIBFPTR_ERROR_INVALID_ROUTE_NUMBER,
        LIBFPTR_ERROR_INVALID_START_ZONE_NUMBER,
        LIBFPTR_ERROR_INVALID_END_ZONE_NUMBER,
        LIBFPTR_ERROR_INVALID_RATE_TYPE,
        LIBFPTR_ERROR_INVALID_RATE,
        LIBFPTR_ERROR_FISCAL_MODULE_EXCHANGE,
        LIBFPTR_ERROR_NEED_TECHNICAL_SUPPORT,
        LIBFPTR_ERROR_SHIFT_NUMBERS_DID_NOT_MATCH,
        LIBFPTR_ERROR_DEVICE_NOT_FOUND,
        LIBFPTR_ERROR_EXTERNAL_DEVICE_CONNECTION,
        LIBFPTR_ERROR_DISPENSER_INVALID_STATE,
        LIBFPTR_ERROR_INVALID_POSITIONS_COUNT,
        LIBFPTR_ERROR_DISPENSER_INVALID_NUMBER,
        LIBFPTR_ERROR_INVALID_DIVIDER,
        LIBFPTR_ERROR_FN_ACTIVATION_DENIED,
        LIBFPTR_ERROR_PRINTER_OVERHEAT,
        LIBFPTR_ERROR_FN_EXCHANGE,
        LIBFPTR_ERROR_FN_INVALID_FORMAT,
        LIBFPTR_ERROR_FN_INVALID_STATE,
        LIBFPTR_ERROR_FN_FAULT,
        LIBFPTR_ERROR_FN_CRYPTO_FAULT,
        LIBFPTR_ERROR_FN_EXPIRED,
        LIBFPTR_ERROR_FN_OVERFLOW,
        LIBFPTR_ERROR_FN_INVALID_DATE_TIME,
        LIBFPTR_ERROR_FN_NO_MORE_DATA,
        LIBFPTR_ERROR_FN_TOTAL_OVERFLOW,
        LIBFPTR_ERROR_BUFFER_OVERFLOW,
        LIBFPTR_ERROR_PRINT_SECOND_COPY_DENIED,
        LIBFPTR_ERROR_NEED_RESET_JOURNAL,
        LIBFPTR_ERROR_TAX_SUM_TOO_MUCH,
        LIBFPTR_ERROR_TAX_ON_LAST_OPERATION_DENIED,
        LIBFPTR_ERROR_INVALID_FN_NUMBER,
        LIBFPTR_ERROR_TAX_CANCEL_DENIED,
        LIBFPTR_ERROR_LOW_BATTERY,
        LIBFPTR_ERROR_FN_INVALID_COMMAND,
        LIBFPTR_ERROR_FN_COMMAND_OVERFLOW,
        LIBFPTR_ERROR_FN_NO_TRANSPORT_CONNECTION,
        LIBFPTR_ERROR_FN_CRYPTO_HAS_EXPIRED,
        LIBFPTR_ERROR_FN_RESOURCE_HAS_EXPIRED,
        LIBFPTR_ERROR_INVALID_MESSAGE_FROM_OFD,
        LIBFPTR_ERROR_FN_HAS_NOT_SEND_DOCUMENTS,
        LIBFPTR_ERROR_FN_TIMEOUT,
        LIBFPTR_ERROR_FN_SHIFT_EXPIRED,
        LIBFPTR_ERROR_FN_INVALID_TIME_DIFFERENCE,
        LIBFPTR_ERROR_INVALID_TAXATION_TYPE,
        LIBFPTR_ERROR_INVALID_TAX_TYPE,
        LIBFPTR_ERROR_INVALID_COMMODITY_PAYMENT_TYPE,
        LIBFPTR_ERROR_INVALID_COMMODITY_CODE_TYPE,
        LIBFPTR_ERROR_EXCISABLE_COMMODITY_DENIED,
        LIBFPTR_ERROR_FISCAL_PROPERTY_WRITE,
        LIBFPTR_ERROR_INVALID_COUNTER_TYPE,
        LIBFPTR_ERROR_CUTTER_FAULT,
        LIBFPTR_ERROR_REPORT_INTERRUPTED,
        LIBFPTR_ERROR_INVALID_LEFT_MARGIN,
        LIBFPTR_ERROR_INVALID_ALIGNMENT,
        LIBFPTR_ERROR_INVALID_TAX_MODE,
        LIBFPTR_ERROR_FILE_NOT_FOUND,
        LIBFPTR_ERROR_PICTURE_TOO_BIG,
        LIBFPTR_ERROR_INVALID_BARCODE_PARAMS,
        LIBFPTR_ERROR_FISCAL_PROPERTY_DENIED,
        LIBFPTR_ERROR_FN_INTERFACE,
        LIBFPTR_ERROR_DATA_DUPLICATE,
        LIBFPTR_ERROR_NO_REQUIRED_FISCAL_PROPERTY,
        LIBFPTR_ERROR_FN_READ_DOCUMENT,
        LIBFPTR_ERROR_FLOAT_OVERFLOW,
        LIBFPTR_ERROR_INVALID_SETTING_VALUE,
        LIBFPTR_ERROR_HARD_FAULT,
        LIBFPTR_ERROR_FN_NOT_FOUND,
        LIBFPTR_ERROR_INVALID_AGENT_FISCAL_PROPERTY,
        LIBFPTR_ERROR_INVALID_FISCAL_PROPERTY_VALUE_1002_1056,
        LIBFPTR_ERROR_INVALID_FISCAL_PROPERTY_VALUE_1002_1017,
        LIBFPTR_ERROR_SCRIPT,
        LIBFPTR_ERROR_INVALID_USER_MEMORY_INDEX,
        LIBFPTR_ERROR_NO_ACTIVE_OPERATOR,
        LIBFPTR_ERROR_REGISTRATION_REPORT_INTERRUPTED,
        LIBFPTR_ERROR_CLOSE_FN_REPORT_INTERRUPTED,
        LIBFPTR_ERROR_OPEN_SHIFT_REPORT_INTERRUPTED,
        LIBFPTR_ERROR_OFD_EXCHANGE_REPORT_INTERRUPTED,
        LIBFPTR_ERROR_CLOSE_RECEIPT_INTERRUPTED,
        LIBFPTR_ERROR_FN_QUERY_INTERRUPTED,
        LIBFPTR_ERROR_RTC_FAULT,
        LIBFPTR_ERROR_MEMORY_FAULT,
        LIBFPTR_ERROR_CHIP_FAULT,
        LIBFPTR_ERROR_TEMPLATES_CORRUPTED,
        LIBFPTR_ERROR_INVALID_MAC_ADDRESS,
        LIBFPTR_ERROR_INVALID_SCRIPT_NUMBER,
        LIBFPTR_ERROR_SCRIPTS_FAULT,
        LIBFPTR_ERROR_INVALID_SCRIPTS_VERSION,
        LIBFPTR_ERROR_INVALID_CLICHE_FORMAT,
        LIBFPTR_ERROR_WAIT_FOR_REBOOT,
        LIBFPTR_ERROR_NO_LICENSE,
        LIBFPTR_ERROR_INVALID_FFD_VERSION,
        LIBFPTR_ERROR_CHANGE_SETTING_DENIED,
        LIBFPTR_ERROR_INVALID_NOMENCLATURE_TYPE,
        LIBFPTR_ERROR_INVALID_GTIN,
        LIBFPTR_ERROR_NEGATIVE_MATH_RESULT,
        LIBFPTR_ERROR_FISCAL_PROPERTIES_COMBINATION,
        LIBFPTR_ERROR_OPERATOR_LOGIN,
        LIBFPTR_ERROR_INVALID_INTERNET_CHANNEL,
        LIBFPTR_ERROR_DATETIME_NOT_SYNCRONIZED,
        LIBFPTR_ERROR_JOURNAL,
        LIBFPTR_ERROR_DENIED_IN_OPENED_DOC,
        LIBFPTR_ERROR_DENIED_IN_CLOSED_DOC,
        LIBFPTR_ERROR_LICENSE_MEMORY_OVERFLOW,
        LIBFPTR_ERROR_NEED_CANCEL_DOCUMENT,
        LIBFPTR_ERROR_REGISTERS_NOT_INITIALIZED,
        LIBFPTR_ERROR_TOTAL_REQUIRED,
        LIBFPTR_ERROR_SETTINGS_FAULT,
        LIBFPTR_ERROR_COUNTERS_FAULT,
        LIBFPTR_ERROR_USER_MEMORY_FAULT,
        LIBFPTR_ERROR_SERVICE_COUNTERS_FAULT,
        LIBFPTR_ERROR_ATTRIBUTES_FAULT,
        LIBFPTR_ERROR_ALREADY_IN_UPDATE_MODE,
        LIBFPTR_ERROR_INVALID_FIRMWARE,
        LIBFPTR_ERROR_INVALID_CHANNEL,
        LIBFPTR_ERROR_INTERFACE_DOWN,
        LIBFPTR_ERROR_INVALID_FISCAL_PROPERTY_VALUE_1212_1030,
        LIBFPTR_ERROR_INVALID_FISCAL_PROPERTY_VALUE_1214,
        LIBFPTR_ERROR_INVALID_FISCAL_PROPERTY_VALUE_1212,
        LIBFPTR_ERROR_SYNC_TIME,
        LIBFPTR_ERROR_VAT18_VAT20_IN_RECEIPT,
        LIBFPTR_ERROR_PICTURE_NOT_CLOSED,
        LIBFPTR_ERROR_INTERFACE_BUSY,
        LIBFPTR_ERROR_INVALID_PICTURE_NUMBER,
        LIBFPTR_ERROR_INVALID_CONTAINER,
        LIBFPTR_ERROR_ARCHIVE_CLOSED,
        LIBFPTR_ERROR_NEED_REGISTRATION,
        LIBFPTR_ERROR_DENIED_DURING_UPDATE,
        LIBFPTR_ERROR_INVALID_TOTAL,
        LIBFPTR_ERROR_MARKING_CODE_CONFLICT,
        LIBFPTR_ERROR_INVALID_RECORDS_ID,
        LIBFPTR_ERROR_INVALID_SIGNATURE,
        LIBFPTR_ERROR_INVALID_EXCISE_SUM,
        LIBFPTR_ERROR_NO_DOCUMENTS_FOUND_IN_JOURNAL,
        LIBFPTR_ERROR_INVALID_SCRIPT_TYPE,
        LIBFPTR_ERROR_INVALID_SCRIPT_NAME,
        LIBFPTR_ERROR_INVALID_POSITIONS_COUNT_WITH_1162,
        LIBFPTR_ERROR_INVALID_UC_COUNTER,
        LIBFPTR_ERROR_INVALID_UC_TAG,
        LIBFPTR_ERROR_INVALID_UC_IDX,
        LIBFPTR_ERROR_INVALID_UC_SIZE,
        LIBFPTR_ERROR_INVALID_UC_CONFIG,
        LIBFPTR_ERROR_CONNECTION_LOST,
        LIBFPTR_ERROR_UNIVERSAL_COUNTERS_FAULT,
        LIBFPTR_ERROR_INVALID_TAX_SUM,
        LIBFPTR_ERROR_INVALID_MARKING_CODE_TYPE,
        LIBFPTR_ERROR_LICENSE_HARD_FAULT,
        LIBFPTR_ERROR_LICENSE_INVALID_SIGN,
        LIBFPTR_ERROR_LICENSE_INVALID_SERIAL,
        LIBFPTR_ERROR_LICENSE_INVALID_TIME,
        LIBFPTR_ERROR_DOCUMENT_CANCELED,
        LIBFPTR_ERROR_INVALID_SCRIPT_PARAMS,
        LIBFPTR_ERROR_CLICHE_TOO_LONG,
        LIBFPTR_ERROR_COMMODITIES_TABLE_FAULT,
        LIBFPTR_ERROR_COMMODITIES_TABLE,
        LIBFPTR_ERROR_COMMODITIES_TABLE_INVALID_TAG,
        LIBFPTR_ERROR_COMMODITIES_TABLE_INVALID_TAG_SIZE,
        LIBFPTR_ERROR_COMMODITIES_TABLE_NO_TAG_DATA,
        LIBFPTR_ERROR_COMMODITIES_TABLE_NO_FREE_MEMORY,
        LIBFPTR_ERROR_INVALID_CACHE,
        LIBFPTR_ERROR_SCHEDULER_NOT_READY,
        LIBFPTR_ERROR_SCHEDULER_INVALID_TASK,
        LIBFPTR_ERROR_MINIPOS_NO_POSITION_PAYMENT,
        LIBFPTR_ERROR_MINIPOS_COMMAND_TIME_OUT,
        LIBFPTR_ERROR_MINIPOS_MODE_FR_DISABLED,
        LIBFPTR_ERROR_ENTRY_NOT_FOUND_IN_OTP,
        LIBFPTR_ERROR_EXCISABLE_COMMODITY_WITHOUT_EXCISE,
        LIBFPTR_ERROR_BARCODE_TYPE_NOT_SUPPORTED,
        LIBFPTR_ERROR_OVERLAY_DATA_OVERFLOW,
        LIBFPTR_ERROR_INVALID_MODULE_ADDRESS,
        LIBFPTR_ERROR_ECR_MODEL_NOT_SUPPORTED,
        LIBFPTR_ERROR_PAID_NOT_REQUIRED,
        LIBFPTR_ERROR_NON_PRINTABLE_CHAR,
        TXT_ERROR_INVALID_USER_TAG,
    ) = RANGE(0, 273)

    (
        LIBFPTR_ERROR_BASE_MARKING,
        LIBFPTR_ERROR_MARKING_CODE_VALIDATION_IN_PROGRESS,
        LIBFPTR_ERROR_NO_CONNECTION_WITH_SERVER,
        LIBFPTR_ERROR_MARKING_CODE_VALIDATION_CANCELED,
        LIBFPTR_ERROR_INVALID_MARKING_CODE_STATUS,
        LIBFPTR_ERROR_INVALID_GS1,
        LIBFPTR_ERROR_MARKING_WORK_DENIED,
        LIBFPTR_ERROR_MARKING_WORK_TEMPORARY_BLOCKED,
        LIBFPTR_ERROR_MARKS_OVERFLOW,
        LIBFPTR_ERROR_INVALID_MARKING_CODE,
        LIBFPTR_ERROR_INVALID_STATE,
        LIBFPTR_ERROR_OFD_EXCHANGE,
        LIBFPTR_ERROR_INVALID_MEASUREMENT_UNIT,
        LIBFPTR_ERROR_OPERATION_DENIED_IN_CURRENT_FFD,
        LIBFPTR_ERROR_MARKING_OPERATION_DENIED,
        LIBFPTR_ERROR_NO_DATA_TO_SEND,
        LIBFPTR_ERROR_NO_MARKED_POSITION,
        LIBFPTR_ERROR_HAS_NOT_SEND_NOTICES,
        LIBFPTR_ERROR_UPDATE_KEYS_REQUIRED,
        LIBFPTR_ERROR_UPDATE_KEYS_SERVICE,
        LIBFPTR_ERROR_MARK_NOT_CHECKED,
        LIBFPTR_ERROR_MARK_CHECK_TIMEOUT_EXPIRED,
        LIBFPTR_ERROR_NO_MARKING_CODE_IN_TABLE,
        LIBFPTR_ERROR_CHEKING_MARK_IN_PROGRESS,
        LIBFPTR_ERROR_INVALID_SERVER_ADDRESS,
        LIBFPTR_ERROR_UPDATE_KEYS_TIMEOUT,
        LIBFPTR_ERROR_PROPERTY_FOR_MARKING_POSITION_ONLY,
    ) = RANGE(400, 427)

    (
        LIBFPTR_ERROR_BASE_WEB,
        LIBFPTR_ERROR_RECEIPT_PARSE_ERROR,
        LIBFPTR_ERROR_INTERRUPTED_BY_PREVIOUS_ERRORS,
        LIBFPTR_ERROR_DRIVER_SCRIPT_ERROR,
        LIBFPTR_ERROR_VALIDATE_FUNC_NOT_FOUND,
        LIBFPTR_ERROR_WEB_FAIL,
    ) = RANGE(500, 506)

    (
        LIBFPTR_PORT_COM,
        LIBFPTR_PORT_USB,
        LIBFPTR_PORT_TCPIP,
        LIBFPTR_PORT_BLUETOOTH,
    ) = RANGE(0, 4)

    (
        LIBFPTR_PORT_BITS_7,
        LIBFPTR_PORT_BITS_8,
    ) = RANGE(7, 9)

    (
        LIBFPTR_PORT_PARITY_NO,
        LIBFPTR_PORT_PARITY_ODD,
        LIBFPTR_PORT_PARITY_EVEN,
        LIBFPTR_PORT_PARITY_MARK,
        LIBFPTR_PORT_PARITY_SPACE,
    ) = RANGE(0, 5)

    (
        LIBFPTR_PORT_SB_1,
        LIBFPTR_PORT_SB_1_5,
        LIBFPTR_PORT_SB_2,
    ) = RANGE(0, 3)

    (
        LIBFPTR_BT_EAN_8,
        LIBFPTR_BT_EAN_13,
        LIBFPTR_BT_UPC_A,
        LIBFPTR_BT_UPC_E,
        LIBFPTR_BT_CODE_39,
        LIBFPTR_BT_CODE_93,
        LIBFPTR_BT_CODE_128,
        LIBFPTR_BT_CODABAR,
        LIBFPTR_BT_ITF,
        LIBFPTR_BT_ITF_14,
        LIBFPTR_BT_GS1_128,
        LIBFPTR_BT_QR,
        LIBFPTR_BT_PDF417,
        LIBFPTR_BT_AZTEC,
        LIBFPTR_BT_CODE_39_EXTENDED,
    ) = RANGE(0, 15)

    (
        LIBFPTR_BC_DEFAULT,
        LIBFPTR_BC_0,
        LIBFPTR_BC_1,
        LIBFPTR_BC_2,
        LIBFPTR_BC_3,
        LIBFPTR_BC_4,
        LIBFPTR_BC_5,
        LIBFPTR_BC_6,
        LIBFPTR_BC_7,
        LIBFPTR_BC_8,
    ) = RANGE(0, 10)

    (
        LIBFPTR_TM_POSITION,
        LIBFPTR_TM_UNIT,
    ) = RANGE(0, 2)

    (
        LIBFPTR_SCT_OVERALL,
        LIBFPTR_SCT_FORWARD,
    ) = RANGE(0, 2)

    (
        LIBFPTR_CT_ROLLUP,
        LIBFPTR_CT_RESETTABLE,
    ) = RANGE(0, 2)

    (
        LIBFPTR_SS_CLOSED,
        LIBFPTR_SS_OPENED,
        LIBFPTR_SS_EXPIRED,
    ) = RANGE(0, 3)

    (
        LIBFPTR_CT_FULL,
        LIBFPTR_CT_PART,
    ) = RANGE(0, 2)

    (
        LIBFPTR_ALIGNMENT_LEFT,
        LIBFPTR_ALIGNMENT_CENTER,
        LIBFPTR_ALIGNMENT_RIGHT,
    ) = RANGE(0, 3)

    (
        LIBFPTR_TW_NONE,
        LIBFPTR_TW_WORDS,
        LIBFPTR_TW_CHARS,
    ) = RANGE(0, 3)

    (
        LIBFPTR_FNT_DEBUG,
        LIBFPTR_FNT_RELEASE,
        LIBFPTR_FNT_UNKNOWN,
    ) = RANGE(0, 3)

    (
        LIBFPTR_RT_CLOSE_SHIFT,
        LIBFPTR_RT_X,
        LIBFPTR_RT_LAST_DOCUMENT,
        LIBFPTR_RT_OFD_EXCHANGE_STATUS,
        LIBFPTR_RT_KKT_DEMO,
        LIBFPTR_RT_KKT_INFO,
        LIBFPTR_RT_OFD_TEST,
        LIBFPTR_RT_FN_DOC_BY_NUMBER,
        LIBFPTR_RT_QUANTITY,
        LIBFPTR_RT_DEPARTMENTS,
        LIBFPTR_RT_OPERATORS,
        LIBFPTR_RT_HOURS,
        LIBFPTR_RT_FN_REGISTRATIONS,
        LIBFPTR_RT_FN_SHIFT_TOTAL_COUNTERS,
        LIBFPTR_RT_FN_TOTAL_COUNTERS,
        LIBFPTR_RT_FN_NOT_SENT_DOCUMENTS_COUNTERS,
        LIBFPTR_RT_COMMODITIES_BY_TAXATION_TYPES,
        LIBFPTR_RT_COMMODITIES_BY_DEPARTMENTS,
        LIBFPTR_RT_COMMODITIES_BY_SUMS,
        LIBFPTR_RT_START_SERVICE,
        LIBFPTR_RT_DISCOUNTS,
        LIBFPTR_RT_JOURNAL_DOCUMENT_BY_NUMBERS,
        LIBFPTR_RT_JOURNAL_DOCUMENT_BY_SHIFTS,
        LIBFPTR_RT_CLOSE_SHIFT_REPORTS,
    ) = RANGE(0, 24)

    (
        LIBFPTR_PT_CASH,
        LIBFPTR_PT_ELECTRONICALLY,
        LIBFPTR_PT_PREPAID,
        LIBFPTR_PT_CREDIT,
        LIBFPTR_PT_OTHER,
        LIBFPTR_PT_6,
        LIBFPTR_PT_7,
        LIBFPTR_PT_8,
        LIBFPTR_PT_9,
        LIBFPTR_PT_10,
    ) = RANGE(0, 10)

    (
        LIBFPTR_TAX_DEPARTMENT,
        LIBFPTR_TAX_VAT18,
        LIBFPTR_TAX_VAT10,
        LIBFPTR_TAX_VAT118,
        LIBFPTR_TAX_VAT110,
        LIBFPTR_TAX_VAT0,
        LIBFPTR_TAX_NO,
        LIBFPTR_TAX_VAT20,
        LIBFPTR_TAX_VAT120,
        LIBFPTR_TAX_INVALID,
    ) = RANGE(0, 10)

    (
        LIBFPTR_EXTERNAL_DEVICE_DISPLAY,
        LIBFPTR_EXTERNAL_DEVICE_PINPAD,
        LIBFPTR_EXTERNAL_DEVICE_MODEM,
        LIBFPTR_EXTERNAL_DEVICE_BARCODE_SCANNER,
    ) = RANGE(0, 4)

    (
        LIBFPTR_DT_STATUS,
        LIBFPTR_DT_CASH_SUM,
        LIBFPTR_DT_UNIT_VERSION,
        LIBFPTR_DT_PICTURE_INFO,
        LIBFPTR_DT_LICENSE_ACTIVATED,
        LIBFPTR_DT_REGISTRATIONS_SUM,
        LIBFPTR_DT_REGISTRATIONS_COUNT,
        LIBFPTR_DT_PAYMENT_SUM,
        LIBFPTR_DT_CASHIN_SUM,
        LIBFPTR_DT_CASHIN_COUNT,
        LIBFPTR_DT_CASHOUT_SUM,
        LIBFPTR_DT_CASHOUT_COUNT,
        LIBFPTR_DT_REVENUE,
        LIBFPTR_DT_DATE_TIME,
        LIBFPTR_DT_SHIFT_STATE,
        LIBFPTR_DT_RECEIPT_STATE,
        LIBFPTR_DT_SERIAL_NUMBER,
        LIBFPTR_DT_MODEL_INFO,
        LIBFPTR_DT_RECEIPT_LINE_LENGTH,
        LIBFPTR_DT_CUTTER_RESOURCE,
        LIBFPTR_DT_STEP_RESOURCE,
        LIBFPTR_DT_TERMAL_RESOURCE,
        LIBFPTR_DT_ENVD_MODE,
        LIBFPTR_DT_SHIFT_TAX_SUM,
        LIBFPTR_DT_RECEIPT_TAX_SUM,
        LIBFPTR_DT_NON_NULLABLE_SUM,
        LIBFPTR_DT_RECEIPT_COUNT,
        LIBFPTR_DT_CANCELLATION_COUNT_ALL,
        LIBFPTR_DT_CANCELLATION_SUM,
        LIBFPTR_DT_CANCELLATION_SUM_ALL,
        LIBFPTR_DT_POWER_SOURCE_STATE,
        LIBFPTR_DT_CANCELLATION_COUNT,
        LIBFPTR_DT_NON_NULLABLE_SUM_BY_PAYMENTS,
        LIBFPTR_DT_PRINTER_TEMPERATURE,
        LIBFPTR_DT_FATAL_STATUS,
        LIBFPTR_DT_MAC_ADDRESS,
        LIBFPTR_DT_DEVICE_UPTIME,
        LIBFPTR_DT_RECEIPT_BYTE_COUNT,
        LIBFPTR_DT_DISCOUNT_AND_SURCHARGE_SUM,
        LIBFPTR_DT_LK_USER_CODE,
        LIBFPTR_DT_LAST_SENT_OFD_DOCUMENT_DATE_TIME,
        LIBFPTR_DT_SHORT_STATUS,
        LIBFPTR_DT_PICTURES_ARRAY_INFO,
        LIBFPTR_DT_ETHERNET_INFO,
        LIBFPTR_DT_SCRIPTS_INFO,
        LIBFPTR_DT_SHIFT_TOTALS,
        LIBFPTR_DT_WIFI_INFO,
        LIBFPTR_DT_FONT_INFO,
        LIBFPTR_DT_SOFTLOCK_STATUS,
        LIBFPTR_DT_LAST_SENT_ISM_NOTICE_DATE_TIME,
        LIBFPTR_DT_MCU_INFO,
        LIBFPTR_DT_MODULE_ADDRESS,
        LIBFPTR_DT_CACHE_REQUISITES,
        LIBFPTR_DT_DEPARTMENT_SUM,
        LIBFPTR_DT_MCU_TEMPERATURE,
        LIBFPTR_DT_AVAILABLE_OPERATIONS,
        LIBFPTR_DT_PATTERN_PARAMETERS,
    ) = RANGE(0, 57)

    (
        LIBFPTR_FNDT_TAG_VALUE,
        LIBFPTR_FNDT_OFD_EXCHANGE_STATUS,
        LIBFPTR_FNDT_FN_INFO,
        LIBFPTR_FNDT_LAST_REGISTRATION,
        LIBFPTR_FNDT_LAST_RECEIPT,
        LIBFPTR_FNDT_LAST_DOCUMENT,
        LIBFPTR_FNDT_SHIFT,
        LIBFPTR_FNDT_FFD_VERSIONS,
        LIBFPTR_FNDT_VALIDITY,
        LIBFPTR_FNDT_REG_INFO,
        LIBFPTR_FNDT_DOCUMENTS_COUNT_IN_SHIFT,
        LIBFPTR_FNDT_ERRORS,
        LIBFPTR_FNDT_TICKET_BY_DOC_NUMBER,
        LIBFPTR_FNDT_DOCUMENT_BY_NUMBER,
        LIBFPTR_FNDT_REGISTRATION_TLV,
        LIBFPTR_FNDT_ERROR_DETAIL,
        LIBFPTR_FNDT_VALIDITY_DAYS,
        LIBFPTR_FNDT_FREE_MEMORY,
        LIBFPTR_FNDT_TOTALS,
        LIBFPTR_FNDT_ISM_ERRORS,
        LIBFPTR_FNDT_ISM_EXCHANGE_STATUS,
        LIBFPTR_FNDT_MARKING_MODE_STATUS,
        LIBFPTR_FNDT_CHECK_MARK_TIME,
        LIBFPTR_FNDT_RECEIPT_SIZE,
    ) = RANGE(0, 24)

    (
        LIBFPTR_UT_FIRMWARE,
        LIBFPTR_UT_CONFIGURATION,
        LIBFPTR_UT_TEMPLATES,
        LIBFPTR_UT_CONTROL_UNIT,
        LIBFPTR_UT_BOOT,
    ) = RANGE(0, 5)

    (
        LIBFPTR_FNOP_REGISTRATION,
        LIBFPTR_FNOP_CHANGE_FN,
        LIBFPTR_FNOP_CHANGE_PARAMETERS,
        LIBFPTR_FNOP_CLOSE_ARCHIVE,
    ) = RANGE(0, 4)

    (
        LIBFPTR_OFD_CHANNEL_NONE,
        LIBFPTR_OFD_CHANNEL_USB,
        LIBFPTR_OFD_CHANNEL_PROTO,
    ) = RANGE(0, 3)

    (
        LIBFPTR_PST_POWER_SUPPLY,
        LIBFPTR_PST_RTC_BATTERY,
        LIBFPTR_PST_BATTERY,
    ) = RANGE(0, 3)

    (
        LIBFPTR_RT_LAST_DOCUMENT_LINES,
        LIBFPTR_RT_FN_DOCUMENT_TLVS,
        LIBFPTR_RT_EXEC_USER_SCRIPT,
        LIBFPTR_RT_FIRMWARE,
        LIBFPTR_RT_LICENSES,
        LIBFPTR_RT_FN_REGISTRATION_TLVS,
        LIBFPTR_RT_PARSE_COMPLEX_ATTR,
        LIBFPTR_RT_FN_SUM_COUNTERS,
        LIBFPTR_RT_FN_QUANTITY_COUNTERS,
        LIBFPTR_RT_FN_UNSENT_DOCS_COUNTERS,
        LIBFPTR_RT_SETTINGS,
        LIBFPTR_RT_RUN_COMMAND,
    ) = RANGE(0, 12)

    (
        LIBFPTR_LOG_ERROR,
        LIBFPTR_LOG_WARN,
        LIBFPTR_LOG_INFO,
        LIBFPTR_LOG_DEBUG,
    ) = RANGE(0, 4)

    (
        LIBFPTR_NT_FURS,
        LIBFPTR_NT_MEDICINES,
        LIBFPTR_NT_TOBACCO,
        LIBFPTR_NT_SHOES,
    ) = RANGE(0, 4)

    (
        LIBFPTR_UMO_GET_SIZE,
        LIBFPTR_UMO_READ_DATA,
        LIBFPTR_UMO_WRITE_DATA,
        LIBFPTR_UMO_READ_STRING,
        LIBFPTR_UMO_WRITE_STRING,
        LIBFPTR_UMO_COMMIT,
    ) = RANGE(0, 6)

    (
        LIBFPTR_GUI_PARENT_NATIVE,
        LIBFPTR_GUI_PARENT_QT,
    ) = RANGE(0, 2)

    (
        LIBFPTR_DEFER_NONE,
        LIBFPTR_DEFER_PRE,
        LIBFPTR_DEFER_POST,
        LIBFPTR_DEFER_OVERLAY,
    ) = RANGE(0, 4)

    (
        LIBFPTR_TAG_TYPE_STLV,
        LIBFPTR_TAG_TYPE_STRING,
        LIBFPTR_TAG_TYPE_ARRAY,
        LIBFPTR_TAG_TYPE_FVLN,
        LIBFPTR_TAG_TYPE_BITS,
        LIBFPTR_TAG_TYPE_BYTE,
        LIBFPTR_TAG_TYPE_VLN,
        LIBFPTR_TAG_TYPE_UINT_16,
        LIBFPTR_TAG_TYPE_UINT_32,
        LIBFPTR_TAG_TYPE_UNIX_TIME,
        LIBFPTR_TAG_TYPE_BOOL,
    ) = RANGE(0, 11)

    (
        LIBFPTR_FT_BYTE_ARRAY,
        LIBFPTR_FT_BIN,
        LIBFPTR_FT_BCD,
        LIBFPTR_FT_STRING,
        LIBFPTR_FT_STRING_NULL_TERM,
    ) = RANGE(0, 5)

    (
        LIBFPTR_ST_NUMBER,
        LIBFPTR_ST_STRING,
        LIBFPTR_ST_BOOL,
    ) = RANGE(0, 3)

    (
        LIBFPTR_SCRIPT_EXECUTABLE,
        LIBFPTR_SCRIPT_JSON,
        LIBFPTR_SCRIPT_SETTINGS,
        LIBFPTR_SCRIPT_LIBRARY,
    ) = RANGE(0, 4)

    (
        LIBFPTR_UCL_UNUSED,
        LIBFPTR_UCL_RECEIPT_TYPE,
        LIBFPTR_UCL_TAXATION_TYPE,
        LIBFPTR_UCL_TAX_TYPE,
        LIBFPTR_UCL_PRODUCT_TYPE,
        LIBFPTR_UCL_PAYMENT_METHOD,
        LIBFPTR_UCL_USER_3,
        LIBFPTR_UCL_USER_4,
        LIBFPTR_UCL_USER_5,
        LIBFPTR_UCL_USER_6,
    ) = RANGE(0, 10)

    (
        LIBFPTR_FNCT_SHIFT,
        LIBFPTR_FNCT_NON_NULLABLE,
    ) = RANGE(0, 2)

    (
        LIBFPTR_MCT_OTHER,
        LIBFPTR_MCT_EGAIS_20,
        LIBFPTR_MCT_EGAIS_30,
    ) = RANGE(0, 3)

    (
        LIBFPTR_MCT12_UNKNOWN,
        LIBFPTR_MCT12_SHORT,
        LIBFPTR_MCT12_88_CHECK,
        LIBFPTR_MCT12_44_NO_CHECK,
        LIBFPTR_MCT12_44_CHECK,
        LIBFPTR_MCT12_4_NO_CHECK,
    ) = RANGE(0, 6)

    (
        LIBFPTR_MES_PIECE_SOLD,
        LIBFPTR_MES_DRY_FOR_SALE,
        LIBFPTR_MES_PIECE_RETURN,
        LIBFPTR_MES_DRY_RETURN,
    ) = RANGE(1, 5)

    (
        LIBFPTR_MCS_BLOCK,
        LIBFPTR_MCS_NO_MARK_FOR_CHECK,
        LIBFPTR_MCS_MARK_RECEIVE_B1,
        LIBFPTR_MCS_MARK_STATE_QUERY_B5,
        LIBFPTR_MCS_MARK_STATE_ANSWER_B6,
    ) = RANGE(0, 5)

    (
        LIBFPTR_NFM_LESS_50_PERCENT,
        LIBFPTR_NFM_FROM_50_TO_80_PERCENT,
        LIBFPTR_NFM_FROM_80_TO_90_PERCENT,
        LIBFPTR_NFM_MORE_90_PERCENT,
        LIBFPTR_NFM_OUT_OF_MEMORY,
    ) = RANGE(0, 5)

    (
        LIBFPTR_OIS_ESTIMATED_STATUS_CORRECT,
        LIBFPTR_OIS_ESTIMATED_STATUS_INCORRECT,
        LIBFPTR_OIS_SALE_STOPPED,
    ) = RANGE(1, 4)

    (
        LIBFPTR_ORR_CORRECT,
        LIBFPTR_ORR_INCORRECT,
        LIBFPTR_ORR_UNRECOGNIZED,
    ) = RANGE(0, 3)

    (
        LIBFPTR_CER_CHECKED,
        LIBFPTR_CER_TYPE_INCORRECT,
        LIBFPTR_CER_NO_KEYS,
        LIBFPTR_CER_NO_GS1,
        LIBFPTR_CER_OTHER,
    ) = RANGE(0, 5)

    (
        LIBFPTR_MCS_NOT_EXECUTED,
        LIBFPTR_MCS_EXECUTED,
        LIBFPTR_MCS_IS_OVER,
        LIBFPTR_MCS_RESULT_IS_RECIEVED,
    ) = RANGE(0, 4)

    (
        LIBFPTR_MCT_AUTONOMOUS,
        LIBFPTR_MCT_WAIT_FOR_RESULT,
        LIBFPTR_MCT_RESULT_NOT_WAIT,
        LIBFPTR_MCT_QUERY_NOT_SEND,
    ) = RANGE(0, 4)

    (
        LIBFPTR_MCST_WAITING_FOR_TASK,
        LIBFPTR_MCST_OPENING_CONNECTION,
        LIBFPTR_MCST_SENDING,
        LIBFPTR_MCST_WAITING_FOR_RESULT,
        LIBFPTR_MCST_GETTING_RESULT,
        LIBFPTR_MCST_DECODE_RESULT,
        LIBFPTR_MCST_TASK_IS_OVER,
        LIBFPTR_MCST_WAITING_FOR_REPEAT,
    ) = RANGE(0, 8)

    (
        LIBFPTR_SILENT_REBOOT_NO,
        LIBFPTR_SILENT_REBOOT_AFTER_SESSION_CLOSE,
        LIBFPTR_SILENT_REBOOT_BEFORE_SESSION_OPEN,
    ) = RANGE(0, 3)

    (
        LIBFPTR_ERROR_BASE_RPC,
        LIBFPTR_ERROR_RCP_SERVER_BUSY,
        LIBFPTR_ERROR_RCP_SERVER_VERSION,
        LIBFPTR_ERROR_RCP_SERVER_EXCHANGE,
    ) = RANGE(600, 604)

    LIBFPTR_ERROR_MARKING_END = 499

    LIBFPTR_ERROR_WEB_END = 599

    LIBFPTR_OFD_CHANNEL_AUTO = 2

    LIBFPTR_SETTING_LIBRARY_PATH = "LibraryPath"

    LIBFPTR_SETTING_MODEL = "Model"

    LIBFPTR_SETTING_PORT = "Port"

    LIBFPTR_SETTING_BAUDRATE = "BaudRate"

    LIBFPTR_SETTING_BITS = "Bits"

    LIBFPTR_SETTING_PARITY = "Parity"

    LIBFPTR_SETTING_STOPBITS = "StopBits"

    LIBFPTR_SETTING_IPADDRESS = "IPAddress"

    LIBFPTR_SETTING_IPPORT = "IPPort"

    LIBFPTR_SETTING_MACADDRESS = "MACAddress"

    LIBFPTR_SETTING_COM_FILE = "ComFile"

    LIBFPTR_SETTING_USB_DEVICE_PATH = "UsbDevicePath"

    LIBFPTR_SETTING_BT_AUTOENABLE = "AutoEnableBluetooth"

    LIBFPTR_SETTING_BT_AUTODISABLE = "AutoDisableBluetooth"

    LIBFPTR_SETTING_ACCESS_PASSWORD = "AccessPassword"

    LIBFPTR_SETTING_USER_PASSWORD = "UserPassword"

    LIBFPTR_SETTING_OFD_CHANNEL = "OfdChannel"

    LIBFPTR_SETTING_EXISTED_COM_FILES = "ExistedComFiles"

    LIBFPTR_SETTING_SCRIPTS_PATH = "ScriptsPath"

    LIBFPTR_SETTING_DOCUMENTS_JOURNAL_PATH = "DocumentsJournalPath"

    LIBFPTR_SETTING_USE_DOCUMENTS_JOURNAL = "UseDocumentsJournal"

    LIBFPTR_SETTING_AUTO_RECONNECT = "AutoReconnect"

    LIBFPTR_SETTING_INVERT_CASH_DRAWER_STATUS = "InvertCashDrawerStatus"

    LIBFPTR_SETTING_REMOTE_SERVER_ADDR = "RemoteServerAddr"

    LIBFPTR_SETTING_REMOTE_SERVER_CONNECTION_TIMEOUT = "RemoteServerConnectionTimeout"

    LIBFPTR_SETTING_VALIDATE_MARK_WITH_FNM_ONLY = "ValidateMarksWithFnmOnly"

    LIBFPTR_SETTING_AUTO_MEASUREMENT_UNIT = "AutoMeasurementUnit"

    LIBFPTR_SETTING_SILENT_REBOOT = "SilentReboot"

    LIBFPTR_MODEL_UNKNOWN = 0

    LIBFPTR_MODEL_ATOL_25F = 57

    LIBFPTR_MODEL_ATOL_30F = 61

    LIBFPTR_MODEL_ATOL_55F = 62

    LIBFPTR_MODEL_ATOL_22F = 63

    LIBFPTR_MODEL_ATOL_52F = 64

    LIBFPTR_MODEL_ATOL_11F = 67

    LIBFPTR_MODEL_ATOL_77F = 69

    LIBFPTR_MODEL_ATOL_90F = 72

    LIBFPTR_MODEL_ATOL_60F = 75

    LIBFPTR_MODEL_ATOL_42FS = 77

    LIBFPTR_MODEL_ATOL_15F = 78

    LIBFPTR_MODEL_ATOL_50F = 80

    LIBFPTR_MODEL_ATOL_20F = 81

    LIBFPTR_MODEL_ATOL_91F = 82

    LIBFPTR_MODEL_ATOL_92F = 84

    LIBFPTR_MODEL_ATOL_SIGMA_10 = 86

    LIBFPTR_MODEL_ATOL_27F = 87

    LIBFPTR_MODEL_ATOL_SIGMA_7F = 90

    LIBFPTR_MODEL_ATOL_SIGMA_8F = 91

    LIBFPTR_MODEL_ATOL_1F = 93

    LIBFPTR_MODEL_KAZNACHEY_FA = 76

    LIBFPTR_MODEL_ATOL_22V2F = 95

    LIBFPTR_MODEL_ATOL_AUTO = 500

    LIBFPTR_MODEL_ATOL_47FA = 48

    LIBFPTR_MODEL_ATOL_PT_5F = 89

    LIBFPTR_MODEL_ATOL_42FA = 70

    LIBFPTR_MODEL_ALLIANCE_20F = 50

    LIBFPTR_PORT_BR_1200 = 1200

    LIBFPTR_PORT_BR_2400 = 2400

    LIBFPTR_PORT_BR_4800 = 4800

    LIBFPTR_PORT_BR_9600 = 9600

    LIBFPTR_PORT_BR_19200 = 19200

    LIBFPTR_PORT_BR_38400 = 38400

    LIBFPTR_PORT_BR_57600 = 57600

    LIBFPTR_PORT_BR_115200 = 115200

    LIBFPTR_PORT_BR_230400 = 230400

    LIBFPTR_PORT_BR_460800 = 460800

    LIBFPTR_PORT_BR_921600 = 921600

    LIBFPTR_FNS_INITIAL = 0

    LIBFPTR_FNS_CONFIGURED = 1

    LIBFPTR_FNS_FISCAL_MODE = 3

    LIBFPTR_FNS_POSTFISCAL_MODE = 7

    LIBFPTR_FNS_ACCESS_ARCHIVE = 15

    LIBFPTR_RT_CLOSED = 0

    LIBFPTR_RT_SELL = 1

    LIBFPTR_RT_SELL_RETURN = 2

    LIBFPTR_RT_SELL_CORRECTION = 7

    LIBFPTR_RT_SELL_RETURN_CORRECTION = 8

    LIBFPTR_RT_BUY = 4

    LIBFPTR_RT_BUY_RETURN = 5

    LIBFPTR_RT_BUY_CORRECTION = 9

    LIBFPTR_RT_BUY_RETURN_CORRECTION = 10

    LIBFPTR_FFD_UNKNOWN = 0

    LIBFPTR_FFD_1_0 = 100

    LIBFPTR_FFD_1_0_5 = 105

    LIBFPTR_FFD_1_1 = 110

    LIBFPTR_FFD_1_2 = 120

    LIBFPTR_TT_DEFAULT = 0

    LIBFPTR_TT_OSN = 1

    LIBFPTR_TT_USN_INCOME = 2

    LIBFPTR_TT_USN_INCOME_OUTCOME = 4

    LIBFPTR_TT_ENVD = 8

    LIBFPTR_TT_ESN = 16

    LIBFPTR_TT_PATENT = 32

    LIBFPTR_AT_NONE = 0

    LIBFPTR_AT_BANK_PAYING_AGENT = 1

    LIBFPTR_AT_BANK_PAYING_SUBAGENT = 2

    LIBFPTR_AT_PAYING_AGENT = 4

    LIBFPTR_AT_PAYING_SUBAGENT = 8

    LIBFPTR_AT_ATTORNEY = 16

    LIBFPTR_AT_COMMISSION_AGENT = 32

    LIBFPTR_AT_ANOTHER = 64

    LIBFPTR_DT_CLOSED = 0

    LIBFPTR_DT_RECEIPT_SELL = 1

    LIBFPTR_DT_RECEIPT_SELL_RETURN = 2

    LIBFPTR_DT_RECEIPT_BUY = 3

    LIBFPTR_DT_RECEIPT_BUY_RETURN = 4

    LIBFPTR_DT_OPEN_SHIFT = 5

    LIBFPTR_DT_CLOSE_SHIFT = 6

    LIBFPTR_DT_REGISTRATION = 7

    LIBFPTR_DT_CLOSE_ARCHIVE = 8

    LIBFPTR_DT_OFD_EXCHANGE_STATUS = 11

    LIBFPTR_DT_RECEIPT_SELL_CORRECTION = 12

    LIBFPTR_DT_RECEIPT_SELL_RETURN_CORRECTION = 13

    LIBFPTR_DT_RECEIPT_BUY_CORRECTION = 14

    LIBFPTR_DT_RECEIPT_BUY_RETURN_CORRECTION = 15

    LIBFPTR_DT_DOCUMENT_SERVICE = 20

    LIBFPTR_DT_DOCUMENT_COPY = 21

    LIBFPTR_FN_DOC_REGISTRATION = 1

    LIBFPTR_FN_DOC_OPEN_SHIFT = 2

    LIBFPTR_FN_DOC_RECEIPT = 3

    LIBFPTR_FN_DOC_BSO = 4

    LIBFPTR_FN_DOC_CLOSE_SHIFT = 5

    LIBFPTR_FN_DOC_CLOSE_FN = 6

    LIBFPTR_FN_DOC_OPERATOR_CONFIRMATION = 7

    LIBFPTR_FN_DOC_REREGISTRATION = 11

    LIBFPTR_FN_DOC_EXCHANGE_STATUS = 21

    LIBFPTR_FN_DOC_CORRECTION = 31

    LIBFPTR_FN_DOC_BSO_CORRECTION = 41

    LIBFPTR_FWT_FIRMWARE = 0

    LIBFPTR_FWT_SCRIPTS = 2

    LIBFPTR_UCF_CALC_SUMS = 1

    LIBFPTR_UCF_CALC_QUANTITIES = 2

    LIBFPTR_UCF_CALC_SUMS_OTHERS = 4

    LIBFPTR_UCF_CALC_QUANTITIES_OTHERS = 8

    LIBFPTR_UC_OTHERS = 4294967295

    LIBFPTR_MCT12_AUTO = 256

    LIBFPTR_MES_UNCHANGED = 255

    LIBFPTR_IU_PIECE = 0

    LIBFPTR_IU_GRAM = 10

    LIBFPTR_IU_KILOGRAM = 11

    LIBFPTR_IU_TON = 12

    LIBFPTR_IU_CENTIMETER = 20

    LIBFPTR_IU_DECIMETER = 21

    LIBFPTR_IU_METER = 22

    LIBFPTR_IU_SQUARE_CENTIMETER = 30

    LIBFPTR_IU_SQUARE_DECIMETER = 31

    LIBFPTR_IU_SQUARE_METER = 32

    LIBFPTR_IU_MILLILITER = 40

    LIBFPTR_IU_LITER = 41

    LIBFPTR_IU_CUBIC_METER = 42

    LIBFPTR_IU_KILOWATT_HOUR = 50

    LIBFPTR_IU_GKAL = 51

    LIBFPTR_IU_DAY = 70

    LIBFPTR_IU_HOUR = 71

    LIBFPTR_IU_MINUTE = 72

    LIBFPTR_IU_SECOND = 73

    LIBFPTR_IU_KILOBYTE = 80

    LIBFPTR_IU_MEGABYTE = 81

    LIBFPTR_IU_GIGABYTE = 82

    LIBFPTR_IU_TERABYTE = 83

    LIBFPTR_IU_OTHER = 255

    LIBFPTR_ERROR_USERS_SCRIPTS_BASE = 1000

    LIBFPTR_PLATFORM_UNKNOWN = 0

    LIBFPTR_PLATFORM_25 = 25

    LIBFPTR_PLATFORM_50 = 50

    LIBFPTR_ERROR_USERS_SCRIPTS_END = 1999

    LIBFPTR_ERROR_RPC_END = 699

    DEFAULT_BUFF_SIZE = 512

    CREATE_METHOD = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.POINTER(ctypes.c_void_p))
    CREATE_WITH_ID_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                             ctypes.POINTER(ctypes.c_void_p),
                                             ctypes.c_wchar_p)
    DESTROY_METHOD = ctypes.CFUNCTYPE(None, ctypes.POINTER(ctypes.c_void_p))
    GET_VERSION_METHOD = ctypes.CFUNCTYPE(ctypes.c_char_p)

    METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                              ctypes.c_void_p)

    IS_OPENED_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                        ctypes.c_void_p)

    GET_ERROR_CODE_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                             ctypes.c_void_p)
    GET_ERROR_DESCRIPTION_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                                    ctypes.c_void_p,
                                                    ctypes.c_wchar_p,
                                                    ctypes.c_int)
    GET_ERROR_RECOMMENDATION_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                                       ctypes.c_void_p,
                                                       ctypes.c_wchar_p,
                                                       ctypes.c_int)
    RESET_ERROR_METHOD = ctypes.CFUNCTYPE(None,
                                          ctypes.c_void_p)

    SET_SETTINGS_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                           ctypes.c_void_p,
                                           ctypes.c_wchar_p)
    GET_SETTINGS_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                           ctypes.c_void_p,
                                           ctypes.c_wchar_p,
                                           ctypes.c_int)

    SET_SINGLE_SETTING_METHOD = ctypes.CFUNCTYPE(None,
                                                 ctypes.c_void_p,
                                                 ctypes.c_wchar_p,
                                                 ctypes.c_wchar_p)
    GET_SINGLE_SETTING_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                                 ctypes.c_void_p,
                                                 ctypes.c_wchar_p,
                                                 ctypes.c_wchar_p,
                                                 ctypes.c_int)

    SET_BYTEARRAY_METHOD = ctypes.CFUNCTYPE(None,
                                            ctypes.c_void_p,
                                            ctypes.c_int,
                                            ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int)
    GET_BYTEARRAY_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                            ctypes.c_void_p,
                                            ctypes.c_int,
                                            ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int)

    SET_INT_METHOD = ctypes.CFUNCTYPE(None,
                                      ctypes.c_void_p,
                                      ctypes.c_int,
                                      ctypes.c_uint)
    GET_INT_METHOD = ctypes.CFUNCTYPE(ctypes.c_uint,
                                      ctypes.c_void_p,
                                      ctypes.c_int)

    SET_BOOL_METHOD = ctypes.CFUNCTYPE(None,
                                       ctypes.c_void_p,
                                       ctypes.c_int,
                                       ctypes.c_int)
    GET_BOOL_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                       ctypes.c_void_p,
                                       ctypes.c_int)

    SET_DOUBLE_METHOD = ctypes.CFUNCTYPE(None,
                                         ctypes.c_void_p,
                                         ctypes.c_int,
                                         ctypes.c_double)
    GET_DOUBLE_METHOD = ctypes.CFUNCTYPE(ctypes.c_double,
                                         ctypes.c_void_p,
                                         ctypes.c_int)

    SET_STRING_METHOD = ctypes.CFUNCTYPE(None,
                                         ctypes.c_void_p,
                                         ctypes.c_int,
                                         ctypes.c_wchar_p)
    GET_STRING_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                         ctypes.c_void_p,
                                         ctypes.c_int,
                                         ctypes.c_wchar_p, ctypes.c_int)

    SET_DATETIME_METHOD = ctypes.CFUNCTYPE(None,
                                           ctypes.c_void_p,
                                           ctypes.c_int,
                                           ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int,
                                           ctypes.c_int,
                                           ctypes.c_int)
    GET_DATETIME_METHOD = ctypes.CFUNCTYPE(None,
                                           ctypes.c_void_p,
                                           ctypes.c_int,
                                           ctypes.POINTER(ctypes.c_int),
                                           ctypes.POINTER(ctypes.c_int),
                                           ctypes.POINTER(ctypes.c_int),
                                           ctypes.POINTER(ctypes.c_int),
                                           ctypes.POINTER(ctypes.c_int),
                                           ctypes.POINTER(ctypes.c_int))
    IS_PARAM_AVAILABLE_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                                 ctypes.c_void_p,
                                                 ctypes.c_int)

    LOG_WRITE_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                        ctypes.c_void_p,
                                        ctypes.c_wchar_p,
                                        ctypes.c_int,
                                        ctypes.c_wchar_p)

    SHOW_PROPERTIES_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                              ctypes.c_void_p,
                                              ctypes.c_int,
                                              ctypes.c_void_p)

    CHANGE_LABEL_METHOD = ctypes.CFUNCTYPE(ctypes.c_int,
                                           ctypes.c_void_p,
                                           ctypes.c_wchar_p)

    def __init__(self, lib_path="", fptr_id=""):
        assert sys.version_info >= (2, 6)
        self.lib_path = lib_path

        try:
            if platform.system() == 'Windows':
                if len(self.lib_path) == 0:
                    rk = OpenKey(HKEY_LOCAL_MACHINE, "Software\\ATOL\\Drivers\\10.0\\KKT")
                    rv = QueryValueEx(rk, "INSTALL_DIR")[0]
                    self.lib_path = os.path.join(rv, 'bin', 'fptr10.dll')
                else:
                    if not self.lib_path.endswith('fptr10.dll'):
                        self.lib_path = os.path.join(self.lib_path, 'fptr10.dll')
                try:
                    self.library = ctypes.CDLL(self.lib_path, mode=ctypes.RTLD_LOCAL)
                except OSError:
                    ctypes.CDLL(os.path.join(os.path.dirname(self.lib_path), 'msvcp140.dll'), mode=ctypes.RTLD_LOCAL)
                    self.library = ctypes.CDLL(self.lib_path, mode=ctypes.RTLD_LOCAL)

            elif platform.system() == 'Darwin':
                if not self.lib_path.endswith('fptr10.framework/fptr10'):
                    self.lib_path = os.path.join(self.lib_path, 'fptr10.framework/fptr10')
                try:
                    self.library = ctypes.CDLL(self.lib_path, mode=ctypes.RTLD_LOCAL)
                except OSError:
                    self.lib_path = lib_path
                    if not self.lib_path.endswith('libfptr10.dylib'):
                        self.lib_path = os.path.join(self.lib_path, 'libfptr10.dylib')
                    self.library = ctypes.CDLL(self.lib_path, mode=ctypes.RTLD_LOCAL)

            else:
                if not self.lib_path.endswith('libfptr10.so'):
                    self.lib_path = os.path.join(self.lib_path, 'libfptr10.so')
                self.library = ctypes.CDLL(self.lib_path, mode=ctypes.RTLD_LOCAL)
        except OSError:
            raise Exception(
                'Driver library not found in {}'.format(
                    '\"' +
                    os.path.dirname(
                        self.lib_path) +
                    '\"' if len(lib_path) != 0 else 'search folders'))

        self.interface = ctypes.c_void_p(0)
        if fptr_id:
            _create = self.CREATE_WITH_ID_METHOD(('libfptr_create_with_id', self.library))
            create_r = _create(ctypes.pointer(self.interface), ctypes.c_wchar_p(fptr_id))
        else:
            _create = self.CREATE_METHOD(('libfptr_create', self.library))
            create_r = _create(ctypes.pointer(self.interface))
        if create_r == -2:
            raise AttributeError('Invalid [id] format')
        elif create_r != 0:
            raise Exception('Can`t create driver handle')

        self._setByteArray = self.SET_BYTEARRAY_METHOD(('libfptr_set_param_bytearray', self.library))
        self._setUserByteArray = self.SET_BYTEARRAY_METHOD(('libfptr_set_user_param_bytearray', self.library))
        self._setNonPrintableByteArray = self.SET_BYTEARRAY_METHOD(
            ('libfptr_set_non_printable_param_bytearray', self.library))
        self._getByteArray = self.GET_BYTEARRAY_METHOD(('libfptr_get_param_bytearray', self.library))

        self._setInt = self.SET_INT_METHOD(('libfptr_set_param_int', self.library))
        self._setUserInt = self.SET_INT_METHOD(('libfptr_set_user_param_int', self.library))
        self._setNonPrintableInt = self.SET_INT_METHOD(('libfptr_set_non_printable_param_int', self.library))
        self._getInt = self.GET_INT_METHOD(('libfptr_get_param_int', self.library))

        self._setBool = self.SET_BOOL_METHOD(('libfptr_set_param_bool', self.library))
        self._setUserBool = self.SET_BOOL_METHOD(('libfptr_set_user_param_bool', self.library))
        self._setNonPrintableBool = self.SET_BOOL_METHOD(('libfptr_set_non_printable_param_bool', self.library))
        self._getBool = self.GET_BOOL_METHOD(('libfptr_get_param_bool', self.library))

        self._setDouble = self.SET_DOUBLE_METHOD(('libfptr_set_param_double', self.library))
        self._setUserDouble = self.SET_DOUBLE_METHOD(('libfptr_set_user_param_double', self.library))
        self._setNonPrintableDouble = self.SET_DOUBLE_METHOD(('libfptr_set_non_printable_param_double', self.library))
        self._getDouble = self.GET_DOUBLE_METHOD(('libfptr_get_param_double', self.library))

        self._setDateTime = self.SET_DATETIME_METHOD(('libfptr_set_param_datetime', self.library))
        self._setUserDateTime = self.SET_DATETIME_METHOD(('libfptr_set_user_param_datetime', self.library))
        self._setNonPrintableDateTime = self.SET_DATETIME_METHOD(
            ('libfptr_set_non_printable_param_datetime', self.library))
        self._getDateTime = self.GET_DATETIME_METHOD(('libfptr_get_param_datetime', self.library))

        self._setString = self.SET_STRING_METHOD(('libfptr_set_param_str', self.library))
        self._setUserString = self.SET_STRING_METHOD(('libfptr_set_user_param_str', self.library))
        self._setNonPrintableString = self.SET_STRING_METHOD(('libfptr_set_non_printable_param_str', self.library))
        self._getString = self.GET_STRING_METHOD(('libfptr_get_param_str', self.library))

        self._isParamAvailable = self.IS_PARAM_AVAILABLE_METHOD(('libfptr_is_param_available', self.library))

        self._setSettings = self.SET_SETTINGS_METHOD(('libfptr_set_settings', self.library))
        self._getSettings = self.GET_SETTINGS_METHOD(('libfptr_get_settings', self.library))

        self._getSingleSetting = self.GET_SINGLE_SETTING_METHOD(('libfptr_get_single_setting', self.library))
        self._setSingleSetting = self.SET_SINGLE_SETTING_METHOD(('libfptr_set_single_setting', self.library))

        self._getVersion = self.GET_VERSION_METHOD(('libfptr_get_version_string', self.library))
        self._isOpened = self.IS_OPENED_METHOD(('libfptr_is_opened', self.library))
        self._errorCode = self.GET_ERROR_CODE_METHOD(('libfptr_error_code', self.library))
        self._errorDescription = self.GET_ERROR_DESCRIPTION_METHOD(('libfptr_error_description', self.library))
        self._errorRecommendation = self.GET_ERROR_RECOMMENDATION_METHOD(('libfptr_error_recommendation', self.library))
        self._resetError = self.RESET_ERROR_METHOD(('libfptr_reset_error', self.library))
        self._logWrite = self.LOG_WRITE_METHOD(('libfptr_log_write_ex', self.library))
        self._showProperties = self.SHOW_PROPERTIES_METHOD(('libfptr_show_properties', self.library))
        self._changeLabel = self.CHANGE_LABEL_METHOD(('libfptr_change_label', self.library))

    def __del__(self):
        destroy = self.DESTROY_METHOD(('libfptr_destroy', self.library))
        destroy(ctypes.pointer(self.interface))

    def version(self):
        return self._getVersion()

    def logWrite(self, tag, level, message):
        return self._logWrite(self.interface, tag, level, message)

    def changeLabel(self, label):
        return self._changeLabel(self.interface, label)

    def showProperties(self, parentType, parent):
        return self._showProperties(self.interface, parentType, parent)

    def isOpened(self):
        return self._isOpened(self.interface)

    def errorCode(self):
        return self._errorCode(self.interface)

    def resetError(self):
        self._resetError(self.interface)

    def errorDescription(self):
        buff = ctypes.create_unicode_buffer(self.DEFAULT_BUFF_SIZE)
        size = self._errorDescription(self.interface, buff, self.DEFAULT_BUFF_SIZE)
        if size > self.DEFAULT_BUFF_SIZE:
            buff = ctypes.create_unicode_buffer(size)
            self._errorDescription(self.interface, buff, size)
        return buff.value

    def errorRecommendation(self):
        buff = ctypes.create_unicode_buffer(self.DEFAULT_BUFF_SIZE)
        size = self._errorRecommendation(self.interface, buff, self.DEFAULT_BUFF_SIZE)
        if size > self.DEFAULT_BUFF_SIZE:
            buff = ctypes.create_unicode_buffer(size)
            self._errorRecommendation(self.interface, buff, size)
        return buff.value

    def setSettings(self, settings):
        if isinstance(settings, dict):
            settings = json.dumps(settings)
        return self._setSettings(self.interface, settings)

    def getSettings(self):
        return json.loads(self.getSettingsStr())

    def getSettingsStr(self):
        buff = ctypes.create_unicode_buffer(self.DEFAULT_BUFF_SIZE)
        size = self._getSettings(self.interface, buff, self.DEFAULT_BUFF_SIZE)
        if size > self.DEFAULT_BUFF_SIZE:
            buff = ctypes.create_unicode_buffer(size)
            self._getSettings(self.interface, buff, size)
        return buff.value

    def setSingleSetting(self, key, value):
        self._setSingleSetting(self.interface, key, value)

    def getSingleSetting(self, key):
        buff = ctypes.create_unicode_buffer(self.DEFAULT_BUFF_SIZE)
        size = self._getSingleSetting(self.interface, key, buff, self.DEFAULT_BUFF_SIZE)
        if size > self.DEFAULT_BUFF_SIZE:
            buff = ctypes.create_unicode_buffer(size)
            self._getSingleSetting(self.interface, key, buff, size)
        return buff.value

    def setParam(self, paramId, param):
        if isinstance(param, bool):
            self._setBool(self.interface, ctypes.c_int(paramId), ctypes.c_int(param))
        elif isinstance(param, int) or (sys.version_info < (3, 0) and isinstance(param, long)):
            if param < 0 or param > 4294967295:
                raise ValueError("Invalid 'param' value {0}".format(param))
            self._setInt(self.interface, ctypes.c_int(paramId), ctypes.c_uint(param))
        elif isinstance(param, float):
            self._setDouble(self.interface, ctypes.c_int(paramId), ctypes.c_double(param))
        elif isinstance(param, TEXT):
            self._setString(self.interface, ctypes.c_int(paramId), ctypes.c_wchar_p(param))
        elif isinstance(param, list) or isinstance(param, bytearray) or isinstance(param, bytes):
            self._setByteArray(self.interface, ctypes.c_int(paramId),
                               (ctypes.c_ubyte * len(param))(*param), len(param))
        elif isinstance(param, datetime.datetime):
            self._setDateTime(self.interface, ctypes.c_int(paramId), param.date().year,
                              param.date().month,
                              param.date().day,
                              param.time().hour, param.time().minute, param.time().second)
        else:
            raise TypeError("Invalid 'param' type {0}".format(type(param)))

    def setUserParam(self, paramId, param):
        if isinstance(param, bool):
            self._setUserBool(self.interface, ctypes.c_int(paramId), ctypes.c_int(param))
        elif isinstance(param, int):
            if param < 0 or param > 4294967295:
                raise ValueError("Invalid 'param' value {0}".format(param))
            self._setUserInt(self.interface, ctypes.c_int(paramId), ctypes.c_uint(param))
        elif isinstance(param, float):
            self._setUserDouble(self.interface, ctypes.c_int(paramId), ctypes.c_double(param))
        elif isinstance(param, TEXT):
            self._setUserString(self.interface, ctypes.c_int(paramId), ctypes.c_wchar_p(param))
        elif isinstance(param, list) or isinstance(param, bytearray) or isinstance(param, bytes):
            self._setUserByteArray(self.interface, ctypes.c_int(paramId),
                                   (ctypes.c_ubyte * len(param))(*param), len(param))
        elif isinstance(param, datetime.datetime):
            self._setUserDateTime(self.interface, ctypes.c_int(paramId), param.date().year,
                                  param.date().month,
                                  param.date().day,
                                  param.time().hour, param.time().minute, param.time().second)
        else:
            raise TypeError("Invalid 'param' type {0}".format(type(param)))

    def setNonPrintableParam(self, paramId, param):
        if isinstance(param, bool):
            self._setNonPrintableBool(self.interface, ctypes.c_int(paramId), ctypes.c_int(param))
        elif isinstance(param, int):
            if param < 0 or param > 4294967295:
                raise ValueError("Invalid 'param' value {0}".format(param))
            self._setNonPrintableInt(self.interface, ctypes.c_int(paramId), ctypes.c_uint(param))
        elif isinstance(param, float):
            self._setNonPrintableDouble(self.interface, ctypes.c_int(paramId), ctypes.c_double(param))
        elif isinstance(param, TEXT):
            self._setNonPrintableString(self.interface, ctypes.c_int(paramId), ctypes.c_wchar_p(param))
        elif isinstance(param, list) or isinstance(param, bytearray) or isinstance(param, bytes):
            self._setNonPrintableByteArray(self.interface, ctypes.c_int(paramId),
                                           (ctypes.c_ubyte * len(param))(*param), len(param))
        elif isinstance(param, datetime.datetime):
            self._setNonPrintableDateTime(self.interface, ctypes.c_int(paramId), param.date().year,
                                          param.date().month,
                                          param.date().day,
                                          param.time().hour, param.time().minute, param.time().second)
        else:
            raise TypeError("Invalid 'param' type {0}".format(type(param)))

    def getParamInt(self, paramId):
        value = self._getInt(self.interface, ctypes.c_int(paramId))
        return value

    def getParamBool(self, paramId):
        value = self._getBool(self.interface, ctypes.c_int(paramId))
        return value != 0

    def getParamDouble(self, paramId):
        value = self._getDouble(self.interface, ctypes.c_int(paramId))
        return value

    def getParamByteArray(self, paramId):
        value = (ctypes.c_ubyte * self.DEFAULT_BUFF_SIZE)()
        size = self._getByteArray(self.interface, ctypes.c_int(paramId),
                                  ctypes.cast(value, ctypes.POINTER(ctypes.c_ubyte)),
                                  self.DEFAULT_BUFF_SIZE)
        if size > self.DEFAULT_BUFF_SIZE:
            value = (ctypes.c_ubyte * size)()
            size = self._getByteArray(self.interface, ctypes.c_int(paramId),
                                      ctypes.cast(value, ctypes.POINTER(ctypes.c_ubyte)), size)
        return value[:size]

    def getParamDateTime(self, paramId):
        year = ctypes.c_int(0)
        month = ctypes.c_int(0)
        day = ctypes.c_int(0)
        hour = ctypes.c_int(0)
        minute = ctypes.c_int(0)
        second = ctypes.c_int(0)
        self._getDateTime(self.interface, ctypes.c_int(paramId), ctypes.pointer(year),
                          ctypes.pointer(month),
                          ctypes.pointer(day),
                          ctypes.pointer(hour), ctypes.pointer(minute), ctypes.pointer(second))
        return datetime.datetime(year.value, month.value, day.value, hour.value, minute.value,
                                 second.value)

    def getParamString(self, paramId):
        value = ctypes.create_unicode_buffer(self.DEFAULT_BUFF_SIZE)
        size = self._getString(self.interface, ctypes.c_int(paramId), value, self.DEFAULT_BUFF_SIZE)
        if size > self.DEFAULT_BUFF_SIZE:
            value = ctypes.create_unicode_buffer(size)
            self._getString(self.interface, ctypes.c_int(paramId), value, size)
        return value.value

    def isParamAvailable(self, paramId):
        value = self._isParamAvailable(self.interface, ctypes.c_int(paramId))
        return value > 0

    def applySingleSettings(self):
        _method = self.METHOD(('libfptr_apply_single_settings', self.library))
        return _method(self.interface)

    def open(self):
        _method = self.METHOD(('libfptr_open', self.library))
        return _method(self.interface)

    def close(self):
        _method = self.METHOD(('libfptr_close', self.library))
        return _method(self.interface)

    def resetParams(self):
        _method = self.METHOD(('libfptr_reset_params', self.library))
        return _method(self.interface)

    def runCommand(self):
        _method = self.METHOD(('libfptr_run_command', self.library))
        return _method(self.interface)

    def beep(self):
        _method = self.METHOD(('libfptr_beep', self.library))
        return _method(self.interface)

    def openDrawer(self):
        _method = self.METHOD(('libfptr_open_drawer', self.library))
        return _method(self.interface)

    def cut(self):
        _method = self.METHOD(('libfptr_cut', self.library))
        return _method(self.interface)

    def devicePoweroff(self):
        _method = self.METHOD(('libfptr_device_poweroff', self.library))
        return _method(self.interface)

    def deviceReboot(self):
        _method = self.METHOD(('libfptr_device_reboot', self.library))
        return _method(self.interface)

    def openShift(self):
        _method = self.METHOD(('libfptr_open_shift', self.library))
        return _method(self.interface)

    def resetSummary(self):
        _method = self.METHOD(('libfptr_reset_summary', self.library))
        return _method(self.interface)

    def initDevice(self):
        _method = self.METHOD(('libfptr_init_device', self.library))
        return _method(self.interface)

    def queryData(self):
        _method = self.METHOD(('libfptr_query_data', self.library))
        return _method(self.interface)

    def cashIncome(self):
        _method = self.METHOD(('libfptr_cash_income', self.library))
        return _method(self.interface)

    def cashOutcome(self):
        _method = self.METHOD(('libfptr_cash_outcome', self.library))
        return _method(self.interface)

    def openReceipt(self):
        _method = self.METHOD(('libfptr_open_receipt', self.library))
        return _method(self.interface)

    def cancelReceipt(self):
        _method = self.METHOD(('libfptr_cancel_receipt', self.library))
        return _method(self.interface)

    def closeReceipt(self):
        _method = self.METHOD(('libfptr_close_receipt', self.library))
        return _method(self.interface)

    def checkDocumentClosed(self):
        _method = self.METHOD(('libfptr_check_document_closed', self.library))
        return _method(self.interface)

    def receiptTotal(self):
        _method = self.METHOD(('libfptr_receipt_total', self.library))
        return _method(self.interface)

    def receiptTax(self):
        _method = self.METHOD(('libfptr_receipt_tax', self.library))
        return _method(self.interface)

    def registration(self):
        _method = self.METHOD(('libfptr_registration', self.library))
        return _method(self.interface)

    def payment(self):
        _method = self.METHOD(('libfptr_payment', self.library))
        return _method(self.interface)

    def report(self):
        _method = self.METHOD(('libfptr_report', self.library))
        return _method(self.interface)

    def printText(self):
        _method = self.METHOD(('libfptr_print_text', self.library))
        return _method(self.interface)

    def printCliche(self):
        _method = self.METHOD(('libfptr_print_cliche', self.library))
        return _method(self.interface)

    def beginNonfiscalDocument(self):
        _method = self.METHOD(('libfptr_begin_nonfiscal_document', self.library))
        return _method(self.interface)

    def endNonfiscalDocument(self):
        _method = self.METHOD(('libfptr_end_nonfiscal_document', self.library))
        return _method(self.interface)

    def printBarcode(self):
        _method = self.METHOD(('libfptr_print_barcode', self.library))
        return _method(self.interface)

    def printPicture(self):
        _method = self.METHOD(('libfptr_print_picture', self.library))
        return _method(self.interface)

    def printPictureByNumber(self):
        _method = self.METHOD(('libfptr_print_picture_by_number', self.library))
        return _method(self.interface)

    def uploadPictureFromFile(self):
        _method = self.METHOD(('libfptr_upload_picture_from_file', self.library))
        return _method(self.interface)

    def clearPictures(self):
        _method = self.METHOD(('libfptr_clear_pictures', self.library))
        return _method(self.interface)

    def writeDeviceSettingRaw(self):
        _method = self.METHOD(('libfptr_write_device_setting_raw', self.library))
        return _method(self.interface)

    def readDeviceSettingRaw(self):
        _method = self.METHOD(('libfptr_read_device_setting_raw', self.library))
        return _method(self.interface)

    def commitSettings(self):
        _method = self.METHOD(('libfptr_commit_settings', self.library))
        return _method(self.interface)

    def initSettings(self):
        _method = self.METHOD(('libfptr_init_settings', self.library))
        return _method(self.interface)

    def resetSettings(self):
        _method = self.METHOD(('libfptr_reset_settings', self.library))
        return _method(self.interface)

    def writeDateTime(self):
        _method = self.METHOD(('libfptr_write_date_time', self.library))
        return _method(self.interface)

    def writeLicense(self):
        _method = self.METHOD(('libfptr_write_license', self.library))
        return _method(self.interface)

    def fnOperation(self):
        _method = self.METHOD(('libfptr_fn_operation', self.library))
        return _method(self.interface)

    def fnQueryData(self):
        _method = self.METHOD(('libfptr_fn_query_data', self.library))
        return _method(self.interface)

    def fnWriteAttributes(self):
        _method = self.METHOD(('libfptr_fn_write_attributes', self.library))
        return _method(self.interface)

    def externalDevicePowerOn(self):
        _method = self.METHOD(('libfptr_external_device_power_on', self.library))
        return _method(self.interface)

    def externalDevicePowerOff(self):
        _method = self.METHOD(('libfptr_external_device_power_off', self.library))
        return _method(self.interface)

    def externalDeviceWriteData(self):
        _method = self.METHOD(('libfptr_external_device_write_data', self.library))
        return _method(self.interface)

    def externalDeviceReadData(self):
        _method = self.METHOD(('libfptr_external_device_read_data', self.library))
        return _method(self.interface)

    def operatorLogin(self):
        _method = self.METHOD(('libfptr_operator_login', self.library))
        return _method(self.interface)

    def processJson(self):
        _method = self.METHOD(('libfptr_process_json', self.library))
        return _method(self.interface)

    def readDeviceSetting(self):
        _method = self.METHOD(('libfptr_read_device_setting', self.library))
        return _method(self.interface)

    def writeDeviceSetting(self):
        _method = self.METHOD(('libfptr_write_device_setting', self.library))
        return _method(self.interface)

    def beginReadRecords(self):
        _method = self.METHOD(('libfptr_begin_read_records', self.library))
        return _method(self.interface)

    def readNextRecord(self):
        _method = self.METHOD(('libfptr_read_next_record', self.library))
        return _method(self.interface)

    def endReadRecords(self):
        _method = self.METHOD(('libfptr_end_read_records', self.library))
        return _method(self.interface)

    def userMemoryOperation(self):
        _method = self.METHOD(('libfptr_user_memory_operation', self.library))
        return _method(self.interface)

    def initMgm(self):
        _method = self.METHOD(('libfptr_init_mgm', self.library))
        return _method(self.interface)

    def continuePrint(self):
        _method = self.METHOD(('libfptr_continue_print', self.library))
        return _method(self.interface)

    def utilFormTlv(self):
        _method = self.METHOD(('libfptr_util_form_tlv', self.library))
        return _method(self.interface)

    def utilFormNomenclature(self):
        _method = self.METHOD(('libfptr_util_form_nomenclature', self.library))
        return _method(self.interface)

    def utilMapping(self):
        _method = self.METHOD(('libfptr_util_mapping', self.library))
        return _method(self.interface)

    def readModelFlags(self):
        _method = self.METHOD(('libfptr_read_model_flags', self.library))
        return _method(self.interface)

    def lineFeed(self):
        _method = self.METHOD(('libfptr_line_feed', self.library))
        return _method(self.interface)

    def flashFirmware(self):
        _method = self.METHOD(('libfptr_flash_firmware', self.library))
        return _method(self.interface)

    def softLockInit(self):
        _method = self.METHOD(('libfptr_soft_lock_init', self.library))
        return _method(self.interface)

    def softLockQuerySessionCode(self):
        _method = self.METHOD(('libfptr_soft_lock_query_session_code', self.library))
        return _method(self.interface)

    def softLockValidate(self):
        _method = self.METHOD(('libfptr_soft_lock_validate', self.library))
        return _method(self.interface)

    def utilCalcTax(self):
        _method = self.METHOD(('libfptr_util_calc_tax', self.library))
        return _method(self.interface)

    def downloadPicture(self):
        _method = self.METHOD(('libfptr_download_picture', self.library))
        return _method(self.interface)

    def bluetoothRemovePairedDevices(self):
        _method = self.METHOD(('libfptr_bluetooth_remove_paired_devices', self.library))
        return _method(self.interface)

    def utilTagInfo(self):
        _method = self.METHOD(('libfptr_util_tag_info', self.library))
        return _method(self.interface)

    def utilContainerVersions(self):
        _method = self.METHOD(('libfptr_util_container_versions', self.library))
        return _method(self.interface)

    def activateLicenses(self):
        _method = self.METHOD(('libfptr_activate_licenses', self.library))
        return _method(self.interface)

    def removeLicenses(self):
        _method = self.METHOD(('libfptr_remove_licenses', self.library))
        return _method(self.interface)

    def enterKeys(self):
        _method = self.METHOD(('libfptr_enter_keys', self.library))
        return _method(self.interface)

    def validateKeys(self):
        _method = self.METHOD(('libfptr_validate_keys', self.library))
        return _method(self.interface)

    def enterSerialNumber(self):
        _method = self.METHOD(('libfptr_enter_serial_number', self.library))
        return _method(self.interface)

    def getSerialNumberRequest(self):
        _method = self.METHOD(('libfptr_get_serial_number_request', self.library))
        return _method(self.interface)

    def uploadPixelBuffer(self):
        _method = self.METHOD(('libfptr_upload_pixel_buffer', self.library))
        return _method(self.interface)

    def downloadPixelBuffer(self):
        _method = self.METHOD(('libfptr_download_pixel_buffer', self.library))
        return _method(self.interface)

    def printPixelBuffer(self):
        _method = self.METHOD(('libfptr_print_pixel_buffer', self.library))
        return _method(self.interface)

    def utilConvertTagValue(self):
        _method = self.METHOD(('libfptr_util_convert_tag_value', self.library))
        return _method(self.interface)

    def parseMarkingCode(self):
        _method = self.METHOD(('libfptr_parse_marking_code', self.library))
        return _method(self.interface)

    def callScript(self):
        _method = self.METHOD(('libfptr_call_script', self.library))
        return _method(self.interface)

    def setHeaderLines(self):
        _method = self.METHOD(('libfptr_set_header_lines', self.library))
        return _method(self.interface)

    def setFooterLines(self):
        _method = self.METHOD(('libfptr_set_footer_lines', self.library))
        return _method(self.interface)

    def uploadPictureCliche(self):
        _method = self.METHOD(('libfptr_upload_picture_cliche', self.library))
        return _method(self.interface)

    def uploadPictureMemory(self):
        _method = self.METHOD(('libfptr_upload_picture_memory', self.library))
        return _method(self.interface)

    def uploadPixelBufferCliche(self):
        _method = self.METHOD(('libfptr_upload_pixel_buffer_cliche', self.library))
        return _method(self.interface)

    def uploadPixelBufferMemory(self):
        _method = self.METHOD(('libfptr_upload_pixel_buffer_memory', self.library))
        return _method(self.interface)

    def execDriverScript(self):
        _method = self.METHOD(('libfptr_exec_driver_script', self.library))
        return _method(self.interface)

    def uploadDriverScript(self):
        _method = self.METHOD(('libfptr_upload_driver_script', self.library))
        return _method(self.interface)

    def execDriverScriptById(self):
        _method = self.METHOD(('libfptr_exec_driver_script_by_id', self.library))
        return _method(self.interface)

    def writeUniversalCountersSettings(self):
        _method = self.METHOD(('libfptr_write_universal_counters_settings', self.library))
        return _method(self.interface)

    def readUniversalCountersSettings(self):
        _method = self.METHOD(('libfptr_read_universal_counters_settings', self.library))
        return _method(self.interface)

    def queryUniversalCountersState(self):
        _method = self.METHOD(('libfptr_query_universal_counters_state', self.library))
        return _method(self.interface)

    def resetUniversalCounters(self):
        _method = self.METHOD(('libfptr_reset_universal_counters', self.library))
        return _method(self.interface)

    def cacheUniversalCounters(self):
        _method = self.METHOD(('libfptr_cache_universal_counters', self.library))
        return _method(self.interface)

    def readUniversalCounterSum(self):
        _method = self.METHOD(('libfptr_read_universal_counter_sum', self.library))
        return _method(self.interface)

    def readUniversalCounterQuantity(self):
        _method = self.METHOD(('libfptr_read_universal_counter_quantity', self.library))
        return _method(self.interface)

    def clearUniversalCountersCache(self):
        _method = self.METHOD(('libfptr_clear_universal_counters_cache', self.library))
        return _method(self.interface)

    def disableOfdChannel(self):
        _method = self.METHOD(('libfptr_disable_ofd_channel', self.library))
        return _method(self.interface)

    def enableOfdChannel(self):
        _method = self.METHOD(('libfptr_enable_ofd_channel', self.library))
        return _method(self.interface)

    def validateJson(self):
        _method = self.METHOD(('libfptr_validate_json', self.library))
        return _method(self.interface)

    def reflectionCall(self):
        _method = self.METHOD(('libfptr_reflection_call', self.library))
        return _method(self.interface)

    def getRemoteServerInfo(self):
        _method = self.METHOD(('libfptr_get_remote_server_info', self.library))
        return _method(self.interface)

    def beginMarkingCodeValidation(self):
        _method = self.METHOD(('libfptr_begin_marking_code_validation', self.library))
        return _method(self.interface)

    def cancelMarkingCodeValidation(self):
        _method = self.METHOD(('libfptr_cancel_marking_code_validation', self.library))
        return _method(self.interface)

    def getMarkingCodeValidationStatus(self):
        _method = self.METHOD(('libfptr_get_marking_code_validation_status', self.library))
        return _method(self.interface)

    def acceptMarkingCode(self):
        _method = self.METHOD(('libfptr_accept_marking_code', self.library))
        return _method(self.interface)

    def declineMarkingCode(self):
        _method = self.METHOD(('libfptr_decline_marking_code', self.library))
        return _method(self.interface)

    def updateFnmKeys(self):
        _method = self.METHOD(('libfptr_update_fnm_keys', self.library))
        return _method(self.interface)

    def writeSalesNotice(self):
        _method = self.METHOD(('libfptr_write_sales_notice', self.library))
        return _method(self.interface)

    def checkMarkingCodeValidationsReady(self):
        _method = self.METHOD(('libfptr_check_marking_code_validations_ready', self.library))
        return _method(self.interface)

    def clearMarkingCodeValidationResult(self):
        _method = self.METHOD(('libfptr_clear_marking_code_validation_result', self.library))
        return _method(self.interface)

    def pingMarkingServer(self):
        _method = self.METHOD(('libfptr_ping_marking_server', self.library))
        return _method(self.interface)

    def getMarkingServerStatus(self):
        _method = self.METHOD(('libfptr_get_marking_server_status', self.library))
        return _method(self.interface)

    def isDriverLocked(self):
        _method = self.METHOD(('libfptr_is_driver_locked', self.library))
        return _method(self.interface)

    def getLastDocumentJournal(self):
        _method = self.METHOD(('libfptr_get_last_document_journal', self.library))
        return _method(self.interface)

    def findDocumentInJournal(self):
        _method = self.METHOD(('libfptr_find_document_in_journal', self.library))
        return _method(self.interface)


    # delete this comment

