"use strict";
/* v8 ignore start */
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmberPrivateKey283k1Data = exports.EmberPanId = exports.EmberOutgoingMessageType = exports.EmberNodeType = exports.EmberNodeId = exports.EmberNodeDescriptor = exports.EmberNetworkStatus = exports.EmberNetworkParameters = exports.EmberNetworkInitStruct = exports.EmberNetworkInitBitmask = exports.EmberNeighborTableEntry = exports.EmberNeighbors = exports.EmberMulticastTableEntry = exports.EmberMulticastId = exports.EmberMultiAddress = exports.EmberMessageDigest = exports.EmberMacPassthroughType = exports.EmberLibraryStatus = exports.EmberKeyType = exports.EmberKeyStructBitmask = exports.EmberKeyStruct = exports.EmberKeyStatus = exports.EmberKeyData = exports.EmberJoinMethod = exports.EmberJoinDecision = exports.EmberInitialSecurityState = exports.EmberInitialSecurityBitmask = exports.EmberIncomingMessageType = exports.EmberGpSinkListEntry = exports.EmberGpSecurityLevel = exports.EmberGpKeyType = exports.EmberGpAddress = exports.EmberEventUnits = exports.EmberEUI64 = exports.EmberDeviceUpdate = exports.EmberDerivedKeyType = exports.EmberCurrentSecurityState = exports.EmberCurrentSecurityBitmask = exports.EmberCounterType = exports.EmberConfigTxPowerMode = exports.EmberConcentratorType = exports.EmberCertificateData = exports.EmberCertificate283k1Data = exports.EmberBindingType = exports.EmberBindingTableEntry = exports.EmberApsOption = exports.EmberApsFrame = exports.EmberAesMmoHashContext = exports.Bytes = exports.Bool = void 0;
exports.NcpResetCode = exports.list = exports.LVList = exports.LVBytes = exports.int8s = exports.fixed_list = exports.EzspZllNetworkOperation = exports.EzspValueId = exports.EzspStruct = exports.EzspStatus = exports.EzspSourceRouteOverheadInformation = exports.EzspPolicyId = exports.EzspNetworkScanType = exports.EzspMfgTokenId = exports.EzspExtendedValueId = exports.EzspEndpointFlags = exports.EzspDecisionId = exports.EzspConfigId = exports.EmberZllState = exports.EmberZllSecurityAlgorithmData = exports.EmberZllNetwork = exports.EmberZllKeyIndex = exports.EmberZllInitialSecurityState = exports.EmberZllDeviceInfoRecord = exports.EmberZllAddressAssignment = exports.EmberZigbeeNetwork = exports.EmberZdoConfigurationFlags = exports.EmberZDOCmd = exports.EmberTokTypeStackZllSecurity = exports.EmberTokTypeStackZllData = exports.EmberStatus = exports.EmberStackError = exports.EmberSmacData = exports.EmberSimpleDescriptor = exports.EmberSignatureData = exports.EmberSignature283k1Data = exports.EmberSecurityManagerNetworkKeyInfo = exports.EmberSecurityManagerContext = exports.EmberRoutingTableEntry = exports.EmberRoutingTable = exports.EmberRouteTableEntry = exports.EmberRf4ceVendorInfo = exports.EmberRf4ceTxOption = exports.EmberRf4cePairingTableEntry = exports.EmberRf4ceNodeCapabilities = exports.EmberRf4ceApplicationInfo = exports.EmberRf4ceApplicationCapabilities = exports.EmberPublicKeyData = exports.EmberPublicKey283k1Data = exports.EmberPrivateKeyData = void 0;
exports.WordList = exports.uint64_t = exports.uint32_t = exports.uint24_t = exports.uint16_t = exports.uint8_t = exports.uint_t = exports.SLStatus = exports.SecureEzspSessionId = exports.SecureEzspSecurityType = exports.SecureEzspSecurityLevel = exports.SecureEzspRandomNumber = void 0;
exports.deserialize = deserialize;
exports.serialize = serialize;
const basic_1 = require("./basic");
Object.defineProperty(exports, "Bytes", { enumerable: true, get: function () { return basic_1.Bytes; } });
Object.defineProperty(exports, "fixed_list", { enumerable: true, get: function () { return basic_1.fixed_list; } });
Object.defineProperty(exports, "int8s", { enumerable: true, get: function () { return basic_1.int8s; } });
Object.defineProperty(exports, "LVBytes", { enumerable: true, get: function () { return basic_1.LVBytes; } });
Object.defineProperty(exports, "LVList", { enumerable: true, get: function () { return basic_1.LVList; } });
Object.defineProperty(exports, "list", { enumerable: true, get: function () { return basic_1.list; } });
Object.defineProperty(exports, "uint_t", { enumerable: true, get: function () { return basic_1.uint_t; } });
Object.defineProperty(exports, "uint8_t", { enumerable: true, get: function () { return basic_1.uint8_t; } });
Object.defineProperty(exports, "uint16_t", { enumerable: true, get: function () { return basic_1.uint16_t; } });
Object.defineProperty(exports, "uint24_t", { enumerable: true, get: function () { return basic_1.uint24_t; } });
Object.defineProperty(exports, "uint32_t", { enumerable: true, get: function () { return basic_1.uint32_t; } });
Object.defineProperty(exports, "uint64_t", { enumerable: true, get: function () { return basic_1.uint64_t; } });
Object.defineProperty(exports, "WordList", { enumerable: true, get: function () { return basic_1.WordList; } });
const named_1 = require("./named");
Object.defineProperty(exports, "Bool", { enumerable: true, get: function () { return named_1.Bool; } });
Object.defineProperty(exports, "EmberApsOption", { enumerable: true, get: function () { return named_1.EmberApsOption; } });
Object.defineProperty(exports, "EmberBindingType", { enumerable: true, get: function () { return named_1.EmberBindingType; } });
Object.defineProperty(exports, "EmberConcentratorType", { enumerable: true, get: function () { return named_1.EmberConcentratorType; } });
Object.defineProperty(exports, "EmberConfigTxPowerMode", { enumerable: true, get: function () { return named_1.EmberConfigTxPowerMode; } });
Object.defineProperty(exports, "EmberCounterType", { enumerable: true, get: function () { return named_1.EmberCounterType; } });
Object.defineProperty(exports, "EmberCurrentSecurityBitmask", { enumerable: true, get: function () { return named_1.EmberCurrentSecurityBitmask; } });
Object.defineProperty(exports, "EmberDerivedKeyType", { enumerable: true, get: function () { return named_1.EmberDerivedKeyType; } });
Object.defineProperty(exports, "EmberDeviceUpdate", { enumerable: true, get: function () { return named_1.EmberDeviceUpdate; } });
Object.defineProperty(exports, "EmberEUI64", { enumerable: true, get: function () { return named_1.EmberEUI64; } });
Object.defineProperty(exports, "EmberEventUnits", { enumerable: true, get: function () { return named_1.EmberEventUnits; } });
Object.defineProperty(exports, "EmberGpKeyType", { enumerable: true, get: function () { return named_1.EmberGpKeyType; } });
Object.defineProperty(exports, "EmberGpSecurityLevel", { enumerable: true, get: function () { return named_1.EmberGpSecurityLevel; } });
Object.defineProperty(exports, "EmberIncomingMessageType", { enumerable: true, get: function () { return named_1.EmberIncomingMessageType; } });
Object.defineProperty(exports, "EmberInitialSecurityBitmask", { enumerable: true, get: function () { return named_1.EmberInitialSecurityBitmask; } });
Object.defineProperty(exports, "EmberJoinDecision", { enumerable: true, get: function () { return named_1.EmberJoinDecision; } });
Object.defineProperty(exports, "EmberJoinMethod", { enumerable: true, get: function () { return named_1.EmberJoinMethod; } });
Object.defineProperty(exports, "EmberKeyStatus", { enumerable: true, get: function () { return named_1.EmberKeyStatus; } });
Object.defineProperty(exports, "EmberKeyStructBitmask", { enumerable: true, get: function () { return named_1.EmberKeyStructBitmask; } });
Object.defineProperty(exports, "EmberKeyType", { enumerable: true, get: function () { return named_1.EmberKeyType; } });
Object.defineProperty(exports, "EmberLibraryStatus", { enumerable: true, get: function () { return named_1.EmberLibraryStatus; } });
Object.defineProperty(exports, "EmberMacPassthroughType", { enumerable: true, get: function () { return named_1.EmberMacPassthroughType; } });
Object.defineProperty(exports, "EmberMulticastId", { enumerable: true, get: function () { return named_1.EmberMulticastId; } });
Object.defineProperty(exports, "EmberNetworkInitBitmask", { enumerable: true, get: function () { return named_1.EmberNetworkInitBitmask; } });
Object.defineProperty(exports, "EmberNetworkStatus", { enumerable: true, get: function () { return named_1.EmberNetworkStatus; } });
Object.defineProperty(exports, "EmberNodeId", { enumerable: true, get: function () { return named_1.EmberNodeId; } });
Object.defineProperty(exports, "EmberNodeType", { enumerable: true, get: function () { return named_1.EmberNodeType; } });
Object.defineProperty(exports, "EmberOutgoingMessageType", { enumerable: true, get: function () { return named_1.EmberOutgoingMessageType; } });
Object.defineProperty(exports, "EmberPanId", { enumerable: true, get: function () { return named_1.EmberPanId; } });
Object.defineProperty(exports, "EmberRf4ceApplicationCapabilities", { enumerable: true, get: function () { return named_1.EmberRf4ceApplicationCapabilities; } });
Object.defineProperty(exports, "EmberRf4ceNodeCapabilities", { enumerable: true, get: function () { return named_1.EmberRf4ceNodeCapabilities; } });
Object.defineProperty(exports, "EmberRf4ceTxOption", { enumerable: true, get: function () { return named_1.EmberRf4ceTxOption; } });
Object.defineProperty(exports, "EmberStackError", { enumerable: true, get: function () { return named_1.EmberStackError; } });
Object.defineProperty(exports, "EmberStatus", { enumerable: true, get: function () { return named_1.EmberStatus; } });
Object.defineProperty(exports, "EmberZDOCmd", { enumerable: true, get: function () { return named_1.EmberZDOCmd; } });
Object.defineProperty(exports, "EmberZdoConfigurationFlags", { enumerable: true, get: function () { return named_1.EmberZdoConfigurationFlags; } });
Object.defineProperty(exports, "EmberZllKeyIndex", { enumerable: true, get: function () { return named_1.EmberZllKeyIndex; } });
Object.defineProperty(exports, "EmberZllState", { enumerable: true, get: function () { return named_1.EmberZllState; } });
Object.defineProperty(exports, "EzspConfigId", { enumerable: true, get: function () { return named_1.EzspConfigId; } });
Object.defineProperty(exports, "EzspDecisionId", { enumerable: true, get: function () { return named_1.EzspDecisionId; } });
Object.defineProperty(exports, "EzspEndpointFlags", { enumerable: true, get: function () { return named_1.EzspEndpointFlags; } });
Object.defineProperty(exports, "EzspExtendedValueId", { enumerable: true, get: function () { return named_1.EzspExtendedValueId; } });
Object.defineProperty(exports, "EzspMfgTokenId", { enumerable: true, get: function () { return named_1.EzspMfgTokenId; } });
Object.defineProperty(exports, "EzspNetworkScanType", { enumerable: true, get: function () { return named_1.EzspNetworkScanType; } });
Object.defineProperty(exports, "EzspPolicyId", { enumerable: true, get: function () { return named_1.EzspPolicyId; } });
Object.defineProperty(exports, "EzspSourceRouteOverheadInformation", { enumerable: true, get: function () { return named_1.EzspSourceRouteOverheadInformation; } });
Object.defineProperty(exports, "EzspStatus", { enumerable: true, get: function () { return named_1.EzspStatus; } });
Object.defineProperty(exports, "EzspValueId", { enumerable: true, get: function () { return named_1.EzspValueId; } });
Object.defineProperty(exports, "EzspZllNetworkOperation", { enumerable: true, get: function () { return named_1.EzspZllNetworkOperation; } });
Object.defineProperty(exports, "NcpResetCode", { enumerable: true, get: function () { return named_1.NcpResetCode; } });
Object.defineProperty(exports, "SecureEzspRandomNumber", { enumerable: true, get: function () { return named_1.SecureEzspRandomNumber; } });
Object.defineProperty(exports, "SecureEzspSecurityLevel", { enumerable: true, get: function () { return named_1.SecureEzspSecurityLevel; } });
Object.defineProperty(exports, "SecureEzspSecurityType", { enumerable: true, get: function () { return named_1.SecureEzspSecurityType; } });
Object.defineProperty(exports, "SecureEzspSessionId", { enumerable: true, get: function () { return named_1.SecureEzspSessionId; } });
Object.defineProperty(exports, "SLStatus", { enumerable: true, get: function () { return named_1.SLStatus; } });
const struct_1 = require("./struct");
Object.defineProperty(exports, "EmberAesMmoHashContext", { enumerable: true, get: function () { return struct_1.EmberAesMmoHashContext; } });
Object.defineProperty(exports, "EmberApsFrame", { enumerable: true, get: function () { return struct_1.EmberApsFrame; } });
Object.defineProperty(exports, "EmberBindingTableEntry", { enumerable: true, get: function () { return struct_1.EmberBindingTableEntry; } });
Object.defineProperty(exports, "EmberCertificate283k1Data", { enumerable: true, get: function () { return struct_1.EmberCertificate283k1Data; } });
Object.defineProperty(exports, "EmberCertificateData", { enumerable: true, get: function () { return struct_1.EmberCertificateData; } });
Object.defineProperty(exports, "EmberCurrentSecurityState", { enumerable: true, get: function () { return struct_1.EmberCurrentSecurityState; } });
Object.defineProperty(exports, "EmberGpAddress", { enumerable: true, get: function () { return struct_1.EmberGpAddress; } });
Object.defineProperty(exports, "EmberGpSinkListEntry", { enumerable: true, get: function () { return struct_1.EmberGpSinkListEntry; } });
Object.defineProperty(exports, "EmberInitialSecurityState", { enumerable: true, get: function () { return struct_1.EmberInitialSecurityState; } });
Object.defineProperty(exports, "EmberKeyData", { enumerable: true, get: function () { return struct_1.EmberKeyData; } });
Object.defineProperty(exports, "EmberKeyStruct", { enumerable: true, get: function () { return struct_1.EmberKeyStruct; } });
Object.defineProperty(exports, "EmberMessageDigest", { enumerable: true, get: function () { return struct_1.EmberMessageDigest; } });
Object.defineProperty(exports, "EmberMultiAddress", { enumerable: true, get: function () { return struct_1.EmberMultiAddress; } });
Object.defineProperty(exports, "EmberMulticastTableEntry", { enumerable: true, get: function () { return struct_1.EmberMulticastTableEntry; } });
Object.defineProperty(exports, "EmberNeighbors", { enumerable: true, get: function () { return struct_1.EmberNeighbors; } });
Object.defineProperty(exports, "EmberNeighborTableEntry", { enumerable: true, get: function () { return struct_1.EmberNeighborTableEntry; } });
Object.defineProperty(exports, "EmberNetworkInitStruct", { enumerable: true, get: function () { return struct_1.EmberNetworkInitStruct; } });
Object.defineProperty(exports, "EmberNetworkParameters", { enumerable: true, get: function () { return struct_1.EmberNetworkParameters; } });
Object.defineProperty(exports, "EmberNodeDescriptor", { enumerable: true, get: function () { return struct_1.EmberNodeDescriptor; } });
Object.defineProperty(exports, "EmberPrivateKey283k1Data", { enumerable: true, get: function () { return struct_1.EmberPrivateKey283k1Data; } });
Object.defineProperty(exports, "EmberPrivateKeyData", { enumerable: true, get: function () { return struct_1.EmberPrivateKeyData; } });
Object.defineProperty(exports, "EmberPublicKey283k1Data", { enumerable: true, get: function () { return struct_1.EmberPublicKey283k1Data; } });
Object.defineProperty(exports, "EmberPublicKeyData", { enumerable: true, get: function () { return struct_1.EmberPublicKeyData; } });
Object.defineProperty(exports, "EmberRf4ceApplicationInfo", { enumerable: true, get: function () { return struct_1.EmberRf4ceApplicationInfo; } });
Object.defineProperty(exports, "EmberRf4cePairingTableEntry", { enumerable: true, get: function () { return struct_1.EmberRf4cePairingTableEntry; } });
Object.defineProperty(exports, "EmberRf4ceVendorInfo", { enumerable: true, get: function () { return struct_1.EmberRf4ceVendorInfo; } });
Object.defineProperty(exports, "EmberRouteTableEntry", { enumerable: true, get: function () { return struct_1.EmberRouteTableEntry; } });
Object.defineProperty(exports, "EmberRoutingTable", { enumerable: true, get: function () { return struct_1.EmberRoutingTable; } });
Object.defineProperty(exports, "EmberRoutingTableEntry", { enumerable: true, get: function () { return struct_1.EmberRoutingTableEntry; } });
Object.defineProperty(exports, "EmberSecurityManagerContext", { enumerable: true, get: function () { return struct_1.EmberSecurityManagerContext; } });
Object.defineProperty(exports, "EmberSecurityManagerNetworkKeyInfo", { enumerable: true, get: function () { return struct_1.EmberSecurityManagerNetworkKeyInfo; } });
Object.defineProperty(exports, "EmberSignature283k1Data", { enumerable: true, get: function () { return struct_1.EmberSignature283k1Data; } });
Object.defineProperty(exports, "EmberSignatureData", { enumerable: true, get: function () { return struct_1.EmberSignatureData; } });
Object.defineProperty(exports, "EmberSimpleDescriptor", { enumerable: true, get: function () { return struct_1.EmberSimpleDescriptor; } });
Object.defineProperty(exports, "EmberSmacData", { enumerable: true, get: function () { return struct_1.EmberSmacData; } });
Object.defineProperty(exports, "EmberTokTypeStackZllData", { enumerable: true, get: function () { return struct_1.EmberTokTypeStackZllData; } });
Object.defineProperty(exports, "EmberTokTypeStackZllSecurity", { enumerable: true, get: function () { return struct_1.EmberTokTypeStackZllSecurity; } });
Object.defineProperty(exports, "EmberZigbeeNetwork", { enumerable: true, get: function () { return struct_1.EmberZigbeeNetwork; } });
Object.defineProperty(exports, "EmberZllAddressAssignment", { enumerable: true, get: function () { return struct_1.EmberZllAddressAssignment; } });
Object.defineProperty(exports, "EmberZllDeviceInfoRecord", { enumerable: true, get: function () { return struct_1.EmberZllDeviceInfoRecord; } });
Object.defineProperty(exports, "EmberZllInitialSecurityState", { enumerable: true, get: function () { return struct_1.EmberZllInitialSecurityState; } });
Object.defineProperty(exports, "EmberZllNetwork", { enumerable: true, get: function () { return struct_1.EmberZllNetwork; } });
Object.defineProperty(exports, "EmberZllSecurityAlgorithmData", { enumerable: true, get: function () { return struct_1.EmberZllSecurityAlgorithmData; } });
Object.defineProperty(exports, "EzspStruct", { enumerable: true, get: function () { return struct_1.EzspStruct; } });
function deserialize(payload, schema) {
    const result = [];
    let value;
    let data = payload;
    for (const type of schema) {
        [value, data] = type.deserialize(type, data);
        result.push(value);
    }
    return [result, data];
}
function serialize(data, schema) {
    return Buffer.concat(schema.map((s, idx) => s.serialize(s, data[idx])));
}
//# sourceMappingURL=index.js.map