"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var format_helper_1 = require("../../core/format/format-helper");
var converter_1 = require("../converter");
var ReversedUartSettingsConverter = /** @class */ (function () {
    function ReversedUartSettingsConverter() {
        this.converter = new converter_1.UartSettingsConverter();
    }
    ReversedUartSettingsConverter.instance = function () {
        if (!ReversedUartSettingsConverter._instance) {
            ReversedUartSettingsConverter._instance = new ReversedUartSettingsConverter();
        }
        return ReversedUartSettingsConverter._instance;
    };
    ReversedUartSettingsConverter.prototype.decode = function (data) {
        data = data.slice(0, 8).reverse();
        console.debug("ReversedUartSettingsConverter", format_helper_1.FormatHelper.toHexString(data));
        return this.converter.decode(data);
    };
    ReversedUartSettingsConverter.prototype.encode = function (settings) {
        return this.converter.encode(settings).reverse();
    };
    return ReversedUartSettingsConverter;
}());
exports.ReversedUartSettingsConverter = ReversedUartSettingsConverter;
