/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { SupportedTransportsBitmap } from "#common/SupportedTransportsBitmap.js"; import { SessionIntervals } from "./SessionIntervals.js"; /** * Minimum peer specification version for which TCP transport is honored. Some Matter 1.4 devices advertise TCP * support but do not implement it reliably, so {@link SessionParameters} clears TCP from the supported transports of * any peer reporting an older (or unknown) spec version. */ export declare const MIN_TCP_SPEC_VERSION = 17104896; export interface SessionParameters extends SessionIntervals { /** Version of Data Model for the Session parameters side where it appears. */ dataModelRevision: number; /** Version of Interaction Model for the Session parameters side where it appears. */ interactionModelRevision: number; /** Version of Specification for the Session parameters side where it appears. */ specificationVersion: number; /** The maximum number of elements in the InvokeRequests list that the Node is able to process. */ maxPathsPerInvoke: number; /** A bitmap of the supported transport protocols in addition to MRP. */ supportedTransports: SessionParameters.SupportedTransports; /** * Maximum size of the message carried over TCP, excluding the framing message length field, that the node is * capable of receiving from its peer. */ maxTcpMessageSize?: number; } export declare function SessionParameters(config?: SessionParameters.Config): SessionParameters; export declare namespace SessionParameters { interface SupportedTransports extends Partial { } /** * Normalize the session parameters a peer sent without filling fallbacks: decode the supported transports and drop * values the peer left out. Undefined when nothing remains. */ function reported(config?: Config): Partial | undefined; /** * Validate a MAX_TCP_MESSAGE_SIZE we configure for ourselves: a whole number from {@link MAX_UDP_MESSAGE_SIZE} to * the uint32 maximum of the session parameter field. * * @param name names the setting in the error message * @throws ImplementationError for any other value */ function assertMaxTcpMessageSize(maxTcpMessageSize: number, name?: string): void; interface Config extends Partial> { supportedTransports?: number | SupportedTransports; } /** * Session parameters we use for peers if not supplied by the peer. */ const fallbacks: { idleInterval: import("@matter/general").Duration; activeInterval: import("@matter/general").Duration; activeThreshold: import("@matter/general").Duration; /** * Fallback value for Data Model Revision when not provided in Session parameters. We use Matter 1.2 as * assumption. */ dataModelRevision: number; /** * Fallback value for Interaction Model Revision when not provided in Session parameters. We use Matter 1.2 as * assumption. */ interactionModelRevision: number; /** * Fallback value for Specification Version when not provided in Session parameters. We use 0 as assumption which is * "before 1.3". */ specificationVersion: number; /** * Fallback value for the maximum number of paths that can be included in a single invoke message when not * provided in, or reported as zero by, Session parameters. * * @see {@link MatterSpecification.v161.Core} § 11.1.5.23 */ maxPathsPerInvoke: number; /** * No TCP support by default. */ supportedTransports: {}; /** * Fallback value for MAX_TCP_MESSAGE_SIZE when a TCP-capable peer does not provide it, or reports zero. * Zero cannot be a real limit; a stack sends it when it announces TCP support without setting a size. * * @see {@link MatterSpecification.v161.Core} § 4.13.1 */ maxTcpMessageSize: number; }; /** * Session parameters we use for ourselves. */ const defaults: { idleInterval: import("@matter/general").Duration; activeInterval: import("@matter/general").Duration; activeThreshold: import("@matter/general").Duration; /** * Fallback value for the maximum number of paths that can be included in a single invoke message when not * provided in, or reported as zero by, Session parameters. * * @see {@link MatterSpecification.v161.Core} § 11.1.5.23 */ maxPathsPerInvoke: number; /** * No TCP support by default. */ supportedTransports: {}; /** * Fallback value for MAX_TCP_MESSAGE_SIZE when a TCP-capable peer does not provide it, or reports zero. * Zero cannot be a real limit; a stack sends it when it announces TCP support without setting a size. * * @see {@link MatterSpecification.v161.Core} § 4.13.1 */ maxTcpMessageSize: number; dataModelRevision: number; interactionModelRevision: number; specificationVersion: number; }; } //# sourceMappingURL=SessionParameters.d.ts.map