@matter/protocol 0.16.0-alpha.0-20251217-038f88085 → 0.16.0-alpha.0-20251221-21acf226d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/action/client/ClientBdx.d.ts +17 -0
- package/dist/cjs/action/client/ClientBdx.d.ts.map +1 -0
- package/dist/cjs/action/client/ClientBdx.js +22 -0
- package/dist/cjs/action/client/ClientBdx.js.map +6 -0
- package/dist/cjs/action/client/ClientInteraction.d.ts +10 -1
- package/dist/cjs/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/cjs/action/client/ClientInteraction.js +25 -2
- package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
- package/dist/cjs/action/client/QueuedClientInteraction.d.ts +11 -3
- package/dist/cjs/action/client/QueuedClientInteraction.d.ts.map +1 -1
- package/dist/cjs/action/client/QueuedClientInteraction.js +6 -2
- package/dist/cjs/action/client/QueuedClientInteraction.js.map +1 -1
- package/dist/cjs/action/client/index.d.ts +1 -0
- package/dist/cjs/action/client/index.d.ts.map +1 -1
- package/dist/cjs/action/client/index.js +1 -0
- package/dist/cjs/action/client/index.js.map +1 -1
- package/dist/cjs/action/request/Read.d.ts.map +1 -1
- package/dist/cjs/action/request/Read.js +2 -2
- package/dist/cjs/action/request/Read.js.map +1 -1
- package/dist/cjs/action/request/Write.js +4 -3
- package/dist/cjs/action/request/Write.js.map +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertisement.d.ts +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertisement.d.ts.map +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertisement.js +2 -2
- package/dist/cjs/advertisement/ble/BleAdvertisement.js.map +1 -1
- package/dist/cjs/advertisement/mdns/CommissionableMdnsAdvertisement.d.ts +1 -1
- package/dist/cjs/advertisement/mdns/CommissionableMdnsAdvertisement.js +1 -1
- package/dist/cjs/advertisement/mdns/CommissionableMdnsAdvertisement.js.map +1 -1
- package/dist/cjs/advertisement/mdns/OperationalMdnsAdvertisement.d.ts.map +1 -1
- package/dist/cjs/advertisement/mdns/OperationalMdnsAdvertisement.js +3 -5
- package/dist/cjs/advertisement/mdns/OperationalMdnsAdvertisement.js.map +1 -1
- package/dist/cjs/bdx/BdxClient.d.ts +2 -0
- package/dist/cjs/bdx/BdxClient.d.ts.map +1 -1
- package/dist/cjs/bdx/BdxClient.js +6 -0
- package/dist/cjs/bdx/BdxClient.js.map +1 -1
- package/dist/cjs/bdx/BdxError.d.ts +2 -0
- package/dist/cjs/bdx/BdxError.d.ts.map +1 -1
- package/dist/cjs/bdx/BdxError.js +2 -0
- package/dist/cjs/bdx/BdxError.js.map +1 -1
- package/dist/cjs/bdx/BdxMessenger.d.ts +5 -1
- package/dist/cjs/bdx/BdxMessenger.d.ts.map +1 -1
- package/dist/cjs/bdx/BdxMessenger.js +12 -4
- package/dist/cjs/bdx/BdxMessenger.js.map +1 -1
- package/dist/cjs/bdx/BdxProtocol.d.ts +14 -7
- package/dist/cjs/bdx/BdxProtocol.d.ts.map +1 -1
- package/dist/cjs/bdx/BdxProtocol.js +81 -19
- package/dist/cjs/bdx/BdxProtocol.js.map +1 -1
- package/dist/cjs/bdx/BdxSession.d.ts +10 -3
- package/dist/cjs/bdx/BdxSession.d.ts.map +1 -1
- package/dist/cjs/bdx/BdxSession.js +33 -8
- package/dist/cjs/bdx/BdxSession.js.map +1 -1
- package/dist/cjs/bdx/BdxSessionConfiguration.d.ts +16 -1
- package/dist/cjs/bdx/BdxSessionConfiguration.d.ts.map +1 -1
- package/dist/cjs/bdx/BdxSessionConfiguration.js +6 -1
- package/dist/cjs/bdx/BdxSessionConfiguration.js.map +1 -1
- package/dist/cjs/bdx/FileDesignator.d.ts +15 -1
- package/dist/cjs/bdx/FileDesignator.d.ts.map +1 -1
- package/dist/cjs/bdx/FileDesignator.js +28 -2
- package/dist/cjs/bdx/FileDesignator.js.map +1 -1
- package/dist/cjs/bdx/PersistedFileDesignator.d.ts +10 -2
- package/dist/cjs/bdx/PersistedFileDesignator.d.ts.map +1 -1
- package/dist/cjs/bdx/PersistedFileDesignator.js +23 -5
- package/dist/cjs/bdx/PersistedFileDesignator.js.map +1 -1
- package/dist/cjs/bdx/ScopedStorage.d.ts +18 -0
- package/dist/cjs/bdx/ScopedStorage.d.ts.map +1 -0
- package/dist/cjs/bdx/ScopedStorage.js +36 -0
- package/dist/cjs/bdx/ScopedStorage.js.map +6 -0
- package/dist/cjs/bdx/bdx-session-initiator.d.ts.map +1 -1
- package/dist/cjs/bdx/bdx-session-initiator.js +10 -2
- package/dist/cjs/bdx/bdx-session-initiator.js.map +1 -1
- package/dist/cjs/bdx/flow/DrivenSendingFlow.d.ts.map +1 -1
- package/dist/cjs/bdx/flow/DrivenSendingFlow.js +2 -0
- package/dist/cjs/bdx/flow/DrivenSendingFlow.js.map +1 -1
- package/dist/cjs/bdx/flow/DrivingReceivingFlow.d.ts.map +1 -1
- package/dist/cjs/bdx/flow/DrivingReceivingFlow.js +1 -0
- package/dist/cjs/bdx/flow/DrivingReceivingFlow.js.map +1 -1
- package/dist/cjs/bdx/flow/Flow.d.ts +7 -0
- package/dist/cjs/bdx/flow/Flow.d.ts.map +1 -1
- package/dist/cjs/bdx/flow/Flow.js +22 -1
- package/dist/cjs/bdx/flow/Flow.js.map +1 -1
- package/dist/cjs/bdx/flow/FollowingReceivingFlow.d.ts.map +1 -1
- package/dist/cjs/bdx/flow/FollowingReceivingFlow.js +3 -0
- package/dist/cjs/bdx/flow/FollowingReceivingFlow.js.map +1 -1
- package/dist/cjs/bdx/flow/FollowingSendingFlow.d.ts.map +1 -1
- package/dist/cjs/bdx/flow/FollowingSendingFlow.js +1 -0
- package/dist/cjs/bdx/flow/FollowingSendingFlow.js.map +1 -1
- package/dist/cjs/bdx/flow/OutboundFlow.d.ts.map +1 -1
- package/dist/cjs/bdx/flow/OutboundFlow.js +1 -0
- package/dist/cjs/bdx/flow/OutboundFlow.js.map +1 -1
- package/dist/cjs/bdx/index.d.ts +1 -0
- package/dist/cjs/bdx/index.d.ts.map +1 -1
- package/dist/cjs/bdx/index.js +1 -0
- package/dist/cjs/bdx/index.js.map +1 -1
- package/dist/cjs/certificate/kinds/Icac.d.ts.map +1 -1
- package/dist/cjs/certificate/kinds/Icac.js +1 -7
- package/dist/cjs/certificate/kinds/Icac.js.map +1 -1
- package/dist/cjs/certificate/kinds/Rcac.d.ts +1 -0
- package/dist/cjs/certificate/kinds/Rcac.d.ts.map +1 -1
- package/dist/cjs/certificate/kinds/Rcac.js +3 -0
- package/dist/cjs/certificate/kinds/Rcac.js.map +1 -1
- package/dist/cjs/certificate/kinds/definitions/operational.d.ts +1 -1
- package/dist/cjs/certificate/kinds/definitions/operational.js +1 -1
- package/dist/cjs/certificate/kinds/definitions/operational.js.map +1 -1
- package/dist/cjs/common/FailsafeContext.js +2 -2
- package/dist/cjs/common/FailsafeContext.js.map +1 -1
- package/dist/cjs/dcl/DclClient.d.ts.map +1 -1
- package/dist/cjs/dcl/DclClient.js +1 -2
- package/dist/cjs/dcl/DclClient.js.map +1 -1
- package/dist/cjs/dcl/DclOtaUpdateService.d.ts +30 -31
- package/dist/cjs/dcl/DclOtaUpdateService.d.ts.map +1 -1
- package/dist/cjs/dcl/DclOtaUpdateService.js +191 -92
- package/dist/cjs/dcl/DclOtaUpdateService.js.map +2 -2
- package/dist/cjs/dcl/index.d.ts +0 -3
- package/dist/cjs/dcl/index.d.ts.map +1 -1
- package/dist/cjs/dcl/index.js +0 -3
- package/dist/cjs/dcl/index.js.map +1 -1
- package/dist/cjs/fabric/Fabric.d.ts +53 -9
- package/dist/cjs/fabric/Fabric.d.ts.map +1 -1
- package/dist/cjs/fabric/Fabric.js +59 -32
- package/dist/cjs/fabric/Fabric.js.map +1 -1
- package/dist/cjs/fabric/FabricAuthority.js +1 -1
- package/dist/cjs/fabric/FabricAuthority.js.map +1 -1
- package/dist/cjs/fabric/FabricManager.d.ts +14 -5
- package/dist/cjs/fabric/FabricManager.d.ts.map +1 -1
- package/dist/cjs/fabric/FabricManager.js +63 -42
- package/dist/cjs/fabric/FabricManager.js.map +1 -1
- package/dist/cjs/groups/FabricGroups.d.ts.map +1 -1
- package/dist/cjs/groups/FabricGroups.js +4 -8
- package/dist/cjs/groups/FabricGroups.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interaction/InteractionMessenger.d.ts +1 -106
- package/dist/cjs/interaction/InteractionMessenger.d.ts.map +1 -1
- package/dist/cjs/interaction/InteractionMessenger.js +2 -143
- package/dist/cjs/interaction/InteractionMessenger.js.map +2 -2
- package/dist/cjs/interaction/index.d.ts +0 -1
- package/dist/cjs/interaction/index.d.ts.map +1 -1
- package/dist/cjs/interaction/index.js +0 -1
- package/dist/cjs/interaction/index.js.map +1 -1
- package/dist/cjs/mdns/MdnsClient.d.ts +4 -4
- package/dist/cjs/mdns/MdnsClient.d.ts.map +1 -1
- package/dist/cjs/mdns/MdnsClient.js +12 -15
- package/dist/cjs/mdns/MdnsClient.js.map +1 -1
- package/dist/cjs/mdns/MdnsConsts.d.ts +3 -3
- package/dist/cjs/mdns/MdnsConsts.d.ts.map +1 -1
- package/dist/cjs/mdns/MdnsConsts.js +3 -2
- package/dist/cjs/mdns/MdnsConsts.js.map +1 -1
- package/dist/{esm/dcl → cjs/ota}/OtaImageHeader.d.ts.map +1 -1
- package/dist/cjs/{dcl → ota}/OtaImageHeader.js.map +1 -1
- package/dist/cjs/{dcl → ota}/OtaImageReader.d.ts.map +1 -1
- package/dist/cjs/{dcl → ota}/OtaImageReader.js +0 -2
- package/dist/cjs/ota/OtaImageReader.js.map +6 -0
- package/dist/{esm/dcl → cjs/ota}/OtaImageWriter.d.ts +1 -1
- package/dist/cjs/{dcl → ota}/OtaImageWriter.d.ts.map +1 -1
- package/dist/cjs/{dcl → ota}/OtaImageWriter.js.map +1 -1
- package/dist/cjs/ota/index.d.ts +9 -0
- package/dist/cjs/ota/index.d.ts.map +1 -0
- package/dist/cjs/ota/index.js +26 -0
- package/dist/cjs/ota/index.js.map +6 -0
- package/dist/cjs/peer/ControllerCommissioner.d.ts.map +1 -1
- package/dist/cjs/peer/ControllerCommissioner.js +5 -0
- package/dist/cjs/peer/ControllerCommissioner.js.map +1 -1
- package/dist/cjs/peer/ControllerCommissioningFlow.d.ts +11 -3
- package/dist/cjs/peer/ControllerCommissioningFlow.d.ts.map +1 -1
- package/dist/cjs/peer/ControllerCommissioningFlow.js +119 -40
- package/dist/cjs/peer/ControllerCommissioningFlow.js.map +1 -1
- package/dist/cjs/peer/PeerSet.d.ts.map +1 -1
- package/dist/cjs/peer/PeerSet.js +17 -10
- package/dist/cjs/peer/PeerSet.js.map +1 -1
- package/dist/cjs/protocol/DeviceAdvertiser.js +3 -3
- package/dist/cjs/protocol/DeviceAdvertiser.js.map +1 -1
- package/dist/cjs/protocol/ExchangeProvider.d.ts +2 -2
- package/dist/cjs/protocol/ExchangeProvider.d.ts.map +1 -1
- package/dist/cjs/protocol/ExchangeProvider.js +2 -2
- package/dist/cjs/protocol/ExchangeProvider.js.map +1 -1
- package/dist/cjs/protocol/MessageExchange.js +3 -3
- package/dist/cjs/protocol/MessageExchange.js.map +1 -1
- package/dist/cjs/protocol/ProtocolMocks.d.ts +2 -2
- package/dist/cjs/protocol/ProtocolMocks.d.ts.map +1 -1
- package/dist/cjs/protocol/ProtocolMocks.js +1 -1
- package/dist/cjs/protocol/ProtocolMocks.js.map +1 -1
- package/dist/cjs/session/NodeSession.d.ts.map +1 -1
- package/dist/cjs/session/NodeSession.js +2 -2
- package/dist/cjs/session/NodeSession.js.map +1 -1
- package/dist/cjs/session/Session.d.ts.map +1 -1
- package/dist/cjs/session/Session.js +1 -0
- package/dist/cjs/session/Session.js.map +1 -1
- package/dist/cjs/session/SessionManager.js +2 -2
- package/dist/cjs/session/SessionManager.js.map +1 -1
- package/dist/cjs/session/SessionParameters.d.ts.map +1 -1
- package/dist/cjs/session/SessionParameters.js +7 -1
- package/dist/cjs/session/SessionParameters.js.map +1 -1
- package/dist/cjs/session/pase/PaseServer.d.ts.map +1 -1
- package/dist/cjs/session/pase/PaseServer.js +1 -0
- package/dist/cjs/session/pase/PaseServer.js.map +1 -1
- package/dist/esm/action/client/ClientBdx.d.ts +17 -0
- package/dist/esm/action/client/ClientBdx.d.ts.map +1 -0
- package/dist/esm/action/client/ClientBdx.js +6 -0
- package/dist/esm/action/client/ClientBdx.js.map +6 -0
- package/dist/esm/action/client/ClientInteraction.d.ts +10 -1
- package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/esm/action/client/ClientInteraction.js +24 -1
- package/dist/esm/action/client/ClientInteraction.js.map +1 -1
- package/dist/esm/action/client/QueuedClientInteraction.d.ts +11 -3
- package/dist/esm/action/client/QueuedClientInteraction.d.ts.map +1 -1
- package/dist/esm/action/client/QueuedClientInteraction.js +5 -1
- package/dist/esm/action/client/QueuedClientInteraction.js.map +1 -1
- package/dist/esm/action/client/index.d.ts +1 -0
- package/dist/esm/action/client/index.d.ts.map +1 -1
- package/dist/esm/action/client/index.js +1 -0
- package/dist/esm/action/client/index.js.map +1 -1
- package/dist/esm/action/request/Read.d.ts.map +1 -1
- package/dist/esm/action/request/Read.js +2 -2
- package/dist/esm/action/request/Read.js.map +1 -1
- package/dist/esm/action/request/Write.js +4 -3
- package/dist/esm/action/request/Write.js.map +1 -1
- package/dist/esm/advertisement/ble/BleAdvertisement.d.ts +1 -1
- package/dist/esm/advertisement/ble/BleAdvertisement.d.ts.map +1 -1
- package/dist/esm/advertisement/ble/BleAdvertisement.js +2 -2
- package/dist/esm/advertisement/ble/BleAdvertisement.js.map +1 -1
- package/dist/esm/advertisement/mdns/CommissionableMdnsAdvertisement.d.ts +1 -1
- package/dist/esm/advertisement/mdns/CommissionableMdnsAdvertisement.js +1 -1
- package/dist/esm/advertisement/mdns/CommissionableMdnsAdvertisement.js.map +1 -1
- package/dist/esm/advertisement/mdns/OperationalMdnsAdvertisement.d.ts.map +1 -1
- package/dist/esm/advertisement/mdns/OperationalMdnsAdvertisement.js +4 -6
- package/dist/esm/advertisement/mdns/OperationalMdnsAdvertisement.js.map +1 -1
- package/dist/esm/bdx/BdxClient.d.ts +2 -0
- package/dist/esm/bdx/BdxClient.d.ts.map +1 -1
- package/dist/esm/bdx/BdxClient.js +6 -0
- package/dist/esm/bdx/BdxClient.js.map +1 -1
- package/dist/esm/bdx/BdxError.d.ts +2 -0
- package/dist/esm/bdx/BdxError.d.ts.map +1 -1
- package/dist/esm/bdx/BdxError.js +2 -0
- package/dist/esm/bdx/BdxError.js.map +1 -1
- package/dist/esm/bdx/BdxMessenger.d.ts +5 -1
- package/dist/esm/bdx/BdxMessenger.d.ts.map +1 -1
- package/dist/esm/bdx/BdxMessenger.js +14 -5
- package/dist/esm/bdx/BdxMessenger.js.map +1 -1
- package/dist/esm/bdx/BdxProtocol.d.ts +14 -7
- package/dist/esm/bdx/BdxProtocol.d.ts.map +1 -1
- package/dist/esm/bdx/BdxProtocol.js +82 -20
- package/dist/esm/bdx/BdxProtocol.js.map +1 -1
- package/dist/esm/bdx/BdxSession.d.ts +10 -3
- package/dist/esm/bdx/BdxSession.d.ts.map +1 -1
- package/dist/esm/bdx/BdxSession.js +34 -9
- package/dist/esm/bdx/BdxSession.js.map +1 -1
- package/dist/esm/bdx/BdxSessionConfiguration.d.ts +16 -1
- package/dist/esm/bdx/BdxSessionConfiguration.d.ts.map +1 -1
- package/dist/esm/bdx/BdxSessionConfiguration.js +6 -1
- package/dist/esm/bdx/BdxSessionConfiguration.js.map +1 -1
- package/dist/esm/bdx/FileDesignator.d.ts +15 -1
- package/dist/esm/bdx/FileDesignator.d.ts.map +1 -1
- package/dist/esm/bdx/FileDesignator.js +29 -3
- package/dist/esm/bdx/FileDesignator.js.map +1 -1
- package/dist/esm/bdx/PersistedFileDesignator.d.ts +10 -2
- package/dist/esm/bdx/PersistedFileDesignator.d.ts.map +1 -1
- package/dist/esm/bdx/PersistedFileDesignator.js +24 -6
- package/dist/esm/bdx/PersistedFileDesignator.js.map +1 -1
- package/dist/esm/bdx/ScopedStorage.d.ts +18 -0
- package/dist/esm/bdx/ScopedStorage.d.ts.map +1 -0
- package/dist/esm/bdx/ScopedStorage.js +16 -0
- package/dist/esm/bdx/ScopedStorage.js.map +6 -0
- package/dist/esm/bdx/bdx-session-initiator.d.ts.map +1 -1
- package/dist/esm/bdx/bdx-session-initiator.js +10 -2
- package/dist/esm/bdx/bdx-session-initiator.js.map +1 -1
- package/dist/esm/bdx/flow/DrivenSendingFlow.d.ts.map +1 -1
- package/dist/esm/bdx/flow/DrivenSendingFlow.js +2 -0
- package/dist/esm/bdx/flow/DrivenSendingFlow.js.map +1 -1
- package/dist/esm/bdx/flow/DrivingReceivingFlow.d.ts.map +1 -1
- package/dist/esm/bdx/flow/DrivingReceivingFlow.js +1 -0
- package/dist/esm/bdx/flow/DrivingReceivingFlow.js.map +1 -1
- package/dist/esm/bdx/flow/Flow.d.ts +7 -0
- package/dist/esm/bdx/flow/Flow.d.ts.map +1 -1
- package/dist/esm/bdx/flow/Flow.js +23 -2
- package/dist/esm/bdx/flow/Flow.js.map +1 -1
- package/dist/esm/bdx/flow/FollowingReceivingFlow.d.ts.map +1 -1
- package/dist/esm/bdx/flow/FollowingReceivingFlow.js +3 -0
- package/dist/esm/bdx/flow/FollowingReceivingFlow.js.map +1 -1
- package/dist/esm/bdx/flow/FollowingSendingFlow.d.ts.map +1 -1
- package/dist/esm/bdx/flow/FollowingSendingFlow.js +1 -0
- package/dist/esm/bdx/flow/FollowingSendingFlow.js.map +1 -1
- package/dist/esm/bdx/flow/OutboundFlow.d.ts.map +1 -1
- package/dist/esm/bdx/flow/OutboundFlow.js +1 -0
- package/dist/esm/bdx/flow/OutboundFlow.js.map +1 -1
- package/dist/esm/bdx/index.d.ts +1 -0
- package/dist/esm/bdx/index.d.ts.map +1 -1
- package/dist/esm/bdx/index.js +1 -0
- package/dist/esm/bdx/index.js.map +1 -1
- package/dist/esm/certificate/kinds/Icac.d.ts.map +1 -1
- package/dist/esm/certificate/kinds/Icac.js +1 -7
- package/dist/esm/certificate/kinds/Icac.js.map +1 -1
- package/dist/esm/certificate/kinds/Rcac.d.ts +1 -0
- package/dist/esm/certificate/kinds/Rcac.d.ts.map +1 -1
- package/dist/esm/certificate/kinds/Rcac.js +3 -0
- package/dist/esm/certificate/kinds/Rcac.js.map +1 -1
- package/dist/esm/certificate/kinds/definitions/operational.d.ts +1 -1
- package/dist/esm/certificate/kinds/definitions/operational.js +1 -1
- package/dist/esm/certificate/kinds/definitions/operational.js.map +1 -1
- package/dist/esm/common/FailsafeContext.js +2 -2
- package/dist/esm/common/FailsafeContext.js.map +1 -1
- package/dist/esm/dcl/DclClient.d.ts.map +1 -1
- package/dist/esm/dcl/DclClient.js +1 -2
- package/dist/esm/dcl/DclClient.js.map +1 -1
- package/dist/esm/dcl/DclOtaUpdateService.d.ts +30 -31
- package/dist/esm/dcl/DclOtaUpdateService.d.ts.map +1 -1
- package/dist/esm/dcl/DclOtaUpdateService.js +191 -93
- package/dist/esm/dcl/DclOtaUpdateService.js.map +2 -2
- package/dist/esm/dcl/index.d.ts +0 -3
- package/dist/esm/dcl/index.d.ts.map +1 -1
- package/dist/esm/dcl/index.js +0 -3
- package/dist/esm/dcl/index.js.map +1 -1
- package/dist/esm/fabric/Fabric.d.ts +53 -9
- package/dist/esm/fabric/Fabric.d.ts.map +1 -1
- package/dist/esm/fabric/Fabric.js +67 -33
- package/dist/esm/fabric/Fabric.js.map +1 -1
- package/dist/esm/fabric/FabricAuthority.js +1 -1
- package/dist/esm/fabric/FabricAuthority.js.map +1 -1
- package/dist/esm/fabric/FabricManager.d.ts +14 -5
- package/dist/esm/fabric/FabricManager.d.ts.map +1 -1
- package/dist/esm/fabric/FabricManager.js +66 -43
- package/dist/esm/fabric/FabricManager.js.map +1 -1
- package/dist/esm/groups/FabricGroups.d.ts.map +1 -1
- package/dist/esm/groups/FabricGroups.js +5 -9
- package/dist/esm/groups/FabricGroups.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interaction/InteractionMessenger.d.ts +1 -106
- package/dist/esm/interaction/InteractionMessenger.d.ts.map +1 -1
- package/dist/esm/interaction/InteractionMessenger.js +2 -144
- package/dist/esm/interaction/InteractionMessenger.js.map +2 -2
- package/dist/esm/interaction/index.d.ts +0 -1
- package/dist/esm/interaction/index.d.ts.map +1 -1
- package/dist/esm/interaction/index.js +0 -1
- package/dist/esm/interaction/index.js.map +1 -1
- package/dist/esm/mdns/MdnsClient.d.ts +4 -4
- package/dist/esm/mdns/MdnsClient.d.ts.map +1 -1
- package/dist/esm/mdns/MdnsClient.js +13 -17
- package/dist/esm/mdns/MdnsClient.js.map +1 -1
- package/dist/esm/mdns/MdnsConsts.d.ts +3 -3
- package/dist/esm/mdns/MdnsConsts.d.ts.map +1 -1
- package/dist/esm/mdns/MdnsConsts.js +3 -2
- package/dist/esm/mdns/MdnsConsts.js.map +1 -1
- package/dist/{cjs/dcl → esm/ota}/OtaImageHeader.d.ts.map +1 -1
- package/dist/esm/{dcl → ota}/OtaImageHeader.js.map +1 -1
- package/dist/esm/{dcl → ota}/OtaImageReader.d.ts.map +1 -1
- package/dist/esm/{dcl → ota}/OtaImageReader.js +0 -3
- package/dist/esm/ota/OtaImageReader.js.map +6 -0
- package/dist/{cjs/dcl → esm/ota}/OtaImageWriter.d.ts +1 -1
- package/dist/esm/{dcl → ota}/OtaImageWriter.d.ts.map +1 -1
- package/dist/esm/{dcl → ota}/OtaImageWriter.js.map +1 -1
- package/dist/esm/ota/index.d.ts +9 -0
- package/dist/esm/ota/index.d.ts.map +1 -0
- package/dist/esm/ota/index.js +9 -0
- package/dist/esm/ota/index.js.map +6 -0
- package/dist/esm/peer/ControllerCommissioner.d.ts.map +1 -1
- package/dist/esm/peer/ControllerCommissioner.js +5 -0
- package/dist/esm/peer/ControllerCommissioner.js.map +1 -1
- package/dist/esm/peer/ControllerCommissioningFlow.d.ts +11 -3
- package/dist/esm/peer/ControllerCommissioningFlow.d.ts.map +1 -1
- package/dist/esm/peer/ControllerCommissioningFlow.js +119 -41
- package/dist/esm/peer/ControllerCommissioningFlow.js.map +1 -1
- package/dist/esm/peer/PeerSet.d.ts.map +1 -1
- package/dist/esm/peer/PeerSet.js +17 -10
- package/dist/esm/peer/PeerSet.js.map +1 -1
- package/dist/esm/protocol/DeviceAdvertiser.js +3 -3
- package/dist/esm/protocol/DeviceAdvertiser.js.map +1 -1
- package/dist/esm/protocol/ExchangeProvider.d.ts +2 -2
- package/dist/esm/protocol/ExchangeProvider.d.ts.map +1 -1
- package/dist/esm/protocol/ExchangeProvider.js +2 -2
- package/dist/esm/protocol/ExchangeProvider.js.map +1 -1
- package/dist/esm/protocol/MessageExchange.js +3 -3
- package/dist/esm/protocol/MessageExchange.js.map +1 -1
- package/dist/esm/protocol/ProtocolMocks.d.ts +2 -2
- package/dist/esm/protocol/ProtocolMocks.d.ts.map +1 -1
- package/dist/esm/protocol/ProtocolMocks.js +11 -2
- package/dist/esm/protocol/ProtocolMocks.js.map +1 -1
- package/dist/esm/session/NodeSession.d.ts.map +1 -1
- package/dist/esm/session/NodeSession.js +3 -3
- package/dist/esm/session/NodeSession.js.map +1 -1
- package/dist/esm/session/Session.d.ts.map +1 -1
- package/dist/esm/session/Session.js +1 -0
- package/dist/esm/session/Session.js.map +1 -1
- package/dist/esm/session/SessionManager.js +2 -2
- package/dist/esm/session/SessionManager.js.map +1 -1
- package/dist/esm/session/SessionParameters.d.ts.map +1 -1
- package/dist/esm/session/SessionParameters.js +7 -1
- package/dist/esm/session/SessionParameters.js.map +1 -1
- package/dist/esm/session/pase/PaseServer.d.ts.map +1 -1
- package/dist/esm/session/pase/PaseServer.js +1 -0
- package/dist/esm/session/pase/PaseServer.js.map +1 -1
- package/package.json +6 -6
- package/src/action/client/ClientBdx.ts +19 -0
- package/src/action/client/ClientInteraction.ts +34 -4
- package/src/action/client/QueuedClientInteraction.ts +16 -12
- package/src/action/client/index.ts +1 -0
- package/src/action/request/Read.ts +8 -2
- package/src/action/request/Write.ts +3 -3
- package/src/advertisement/ble/BleAdvertisement.ts +4 -4
- package/src/advertisement/mdns/CommissionableMdnsAdvertisement.ts +1 -1
- package/src/advertisement/mdns/OperationalMdnsAdvertisement.ts +4 -6
- package/src/bdx/BdxClient.ts +8 -0
- package/src/bdx/BdxError.ts +2 -0
- package/src/bdx/BdxMessenger.ts +16 -5
- package/src/bdx/BdxProtocol.ts +104 -22
- package/src/bdx/BdxSession.ts +38 -16
- package/src/bdx/BdxSessionConfiguration.ts +24 -2
- package/src/bdx/FileDesignator.ts +31 -2
- package/src/bdx/PersistedFileDesignator.ts +35 -8
- package/src/bdx/ScopedStorage.ts +25 -0
- package/src/bdx/bdx-session-initiator.ts +11 -2
- package/src/bdx/flow/DrivenSendingFlow.ts +3 -0
- package/src/bdx/flow/DrivingReceivingFlow.ts +1 -0
- package/src/bdx/flow/Flow.ts +29 -2
- package/src/bdx/flow/FollowingReceivingFlow.ts +3 -0
- package/src/bdx/flow/FollowingSendingFlow.ts +2 -0
- package/src/bdx/flow/OutboundFlow.ts +1 -0
- package/src/bdx/index.ts +1 -0
- package/src/certificate/kinds/Icac.ts +4 -1
- package/src/certificate/kinds/Rcac.ts +4 -0
- package/src/certificate/kinds/definitions/operational.ts +1 -1
- package/src/common/FailsafeContext.ts +2 -2
- package/src/dcl/DclClient.ts +1 -2
- package/src/dcl/DclOtaUpdateService.ts +266 -125
- package/src/dcl/index.ts +0 -3
- package/src/fabric/Fabric.ts +118 -39
- package/src/fabric/FabricAuthority.ts +1 -1
- package/src/fabric/FabricManager.ts +76 -49
- package/src/groups/FabricGroups.ts +5 -9
- package/src/index.ts +1 -0
- package/src/interaction/InteractionMessenger.ts +2 -186
- package/src/interaction/index.ts +0 -1
- package/src/mdns/MdnsClient.ts +14 -19
- package/src/mdns/MdnsConsts.ts +5 -4
- package/src/{dcl → ota}/OtaImageReader.ts +1 -5
- package/src/{dcl → ota}/OtaImageWriter.ts +1 -1
- package/src/ota/index.ts +9 -0
- package/src/peer/ControllerCommissioner.ts +7 -0
- package/src/peer/ControllerCommissioningFlow.ts +161 -54
- package/src/peer/PeerSet.ts +25 -12
- package/src/protocol/DeviceAdvertiser.ts +5 -5
- package/src/protocol/ExchangeProvider.ts +3 -3
- package/src/protocol/MessageExchange.ts +3 -3
- package/src/protocol/ProtocolMocks.ts +13 -4
- package/src/session/NodeSession.ts +3 -3
- package/src/session/Session.ts +1 -0
- package/src/session/SessionManager.ts +2 -2
- package/src/session/SessionParameters.ts +10 -2
- package/src/session/pase/PaseServer.ts +2 -1
- package/dist/cjs/dcl/OtaImageReader.js.map +0 -6
- package/dist/cjs/interaction/SubscriptionClient.d.ts +0 -39
- package/dist/cjs/interaction/SubscriptionClient.d.ts.map +0 -1
- package/dist/cjs/interaction/SubscriptionClient.js +0 -93
- package/dist/cjs/interaction/SubscriptionClient.js.map +0 -6
- package/dist/esm/dcl/OtaImageReader.js.map +0 -6
- package/dist/esm/interaction/SubscriptionClient.d.ts +0 -39
- package/dist/esm/interaction/SubscriptionClient.d.ts.map +0 -1
- package/dist/esm/interaction/SubscriptionClient.js +0 -73
- package/dist/esm/interaction/SubscriptionClient.js.map +0 -6
- package/src/interaction/SubscriptionClient.ts +0 -104
- /package/dist/cjs/{dcl → ota}/OtaImageHeader.d.ts +0 -0
- /package/dist/cjs/{dcl → ota}/OtaImageHeader.js +0 -0
- /package/dist/cjs/{dcl → ota}/OtaImageReader.d.ts +0 -0
- /package/dist/cjs/{dcl → ota}/OtaImageWriter.js +0 -0
- /package/dist/esm/{dcl → ota}/OtaImageHeader.d.ts +0 -0
- /package/dist/esm/{dcl → ota}/OtaImageHeader.js +0 -0
- /package/dist/esm/{dcl → ota}/OtaImageReader.d.ts +0 -0
- /package/dist/esm/{dcl → ota}/OtaImageWriter.js +0 -0
- /package/src/{dcl → ota}/OtaImageHeader.ts +0 -0
|
@@ -8,12 +8,14 @@ import { ClientInteraction } from "#action/client/ClientInteraction.js";
|
|
|
8
8
|
import { ClientRead } from "#action/client/ClientRead.js";
|
|
9
9
|
import { Invoke } from "#action/request/Invoke.js";
|
|
10
10
|
import { Read } from "#action/request/Read.js";
|
|
11
|
+
import { Write } from "#action/request/Write.js";
|
|
11
12
|
import { Certificate } from "#certificate/kinds/Certificate.js";
|
|
12
13
|
import { BasicInformation } from "#clusters/basic-information";
|
|
13
14
|
import { Descriptor } from "#clusters/descriptor";
|
|
14
15
|
import { GeneralCommissioning } from "#clusters/general-commissioning";
|
|
15
16
|
import { NetworkCommissioning } from "#clusters/network-commissioning";
|
|
16
17
|
import { OperationalCredentials } from "#clusters/operational-credentials";
|
|
18
|
+
import { OtaSoftwareUpdateRequestor } from "#clusters/ota-software-update-requestor";
|
|
17
19
|
import { TimeSynchronizationCluster } from "#clusters/time-synchronization";
|
|
18
20
|
import {
|
|
19
21
|
Bytes,
|
|
@@ -23,11 +25,11 @@ import {
|
|
|
23
25
|
ImplementationError,
|
|
24
26
|
Instant,
|
|
25
27
|
Logger,
|
|
26
|
-
Millis,
|
|
27
28
|
Minutes,
|
|
28
29
|
repackErrorAs,
|
|
29
30
|
Seconds,
|
|
30
31
|
Time,
|
|
32
|
+
Timer,
|
|
31
33
|
Timespan,
|
|
32
34
|
Timestamp,
|
|
33
35
|
UnexpectedDataError,
|
|
@@ -37,6 +39,7 @@ import {
|
|
|
37
39
|
ClusterType,
|
|
38
40
|
EndpointNumber,
|
|
39
41
|
FabricIndex,
|
|
42
|
+
NodeId,
|
|
40
43
|
Status,
|
|
41
44
|
StatusResponseError,
|
|
42
45
|
TypeFromPartialBitSchema,
|
|
@@ -52,6 +55,11 @@ import { PeerAddress } from "./PeerAddress.js";
|
|
|
52
55
|
|
|
53
56
|
const logger = Logger.get("ControllerCommissioner");
|
|
54
57
|
|
|
58
|
+
export interface OtaProviderLocation {
|
|
59
|
+
nodeId: NodeId;
|
|
60
|
+
endpoint: EndpointNumber;
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
/**
|
|
56
64
|
* User specific options for the Commissioning process
|
|
57
65
|
*/
|
|
@@ -86,6 +94,9 @@ export type ControllerCommissioningFlowOptions = {
|
|
|
86
94
|
networkName: string;
|
|
87
95
|
operationalDataset: string;
|
|
88
96
|
};
|
|
97
|
+
|
|
98
|
+
/** The Location of the OTA provider for this fabric set on the commissioned devices if OTA is supported */
|
|
99
|
+
otaUpdateProviderLocation?: OtaProviderLocation;
|
|
89
100
|
};
|
|
90
101
|
|
|
91
102
|
/** Types representation of a general commissioning response. */
|
|
@@ -137,10 +148,14 @@ type CollectedCommissioningData = {
|
|
|
137
148
|
basicCommissioningInfo?: TypeFromSchema<typeof GeneralCommissioning.TlvBasicCommissioningInfo>;
|
|
138
149
|
productName?: string;
|
|
139
150
|
networkFeatures?: {
|
|
140
|
-
endpointId:
|
|
151
|
+
endpointId: EndpointNumber;
|
|
141
152
|
value: TypeFromPartialBitSchema<typeof NetworkCommissioning.Complete.features>;
|
|
142
153
|
}[];
|
|
143
|
-
networkStatus?: {
|
|
154
|
+
networkStatus?: {
|
|
155
|
+
endpointId: EndpointNumber;
|
|
156
|
+
value: TypeFromSchema<typeof NetworkCommissioning.TlvNetworkInfo>[];
|
|
157
|
+
}[];
|
|
158
|
+
otaRequestorList?: EndpointNumber[];
|
|
144
159
|
rootPartsList?: EndpointNumber[];
|
|
145
160
|
rootServerList?: ClusterId[];
|
|
146
161
|
vendorId?: VendorId;
|
|
@@ -182,6 +197,9 @@ class RecoverableCommissioningError extends CommissioningError {}
|
|
|
182
197
|
|
|
183
198
|
const DEFAULT_FAILSAFE_TIME = Minutes.one;
|
|
184
199
|
|
|
200
|
+
/** When we execute longer actions like network connections or reconnection, we need to keep the BTP session alive */
|
|
201
|
+
const BTP_IDLE_ALIVE_INTERVAL = Seconds(25);
|
|
202
|
+
|
|
185
203
|
const RootEndpointNumber = EndpointNumber(0);
|
|
186
204
|
|
|
187
205
|
/**
|
|
@@ -205,6 +223,7 @@ export class ControllerCommissioningFlow {
|
|
|
205
223
|
protected lastBreadcrumb = 1;
|
|
206
224
|
protected collectedCommissioningData: CollectedCommissioningData = {};
|
|
207
225
|
#defaultFailSafeTime = DEFAULT_FAILSAFE_TIME;
|
|
226
|
+
#armFailsafeInterval?: Timer;
|
|
208
227
|
|
|
209
228
|
constructor(
|
|
210
229
|
/** ClientInteraction for the initiated PASE session */
|
|
@@ -247,7 +266,11 @@ export class ControllerCommissioningFlow {
|
|
|
247
266
|
for (const step of this.commissioningSteps) {
|
|
248
267
|
logger.info(`Executing commissioning step ${step.stepNumber}.${step.subStepNumber}: ${step.name}`);
|
|
249
268
|
try {
|
|
250
|
-
if (
|
|
269
|
+
if (
|
|
270
|
+
step.reArmFailsafe &&
|
|
271
|
+
!failSafeTimerReArmedAfterPreviousStep &&
|
|
272
|
+
!this.#armFailsafeInterval?.isRunning
|
|
273
|
+
) {
|
|
251
274
|
logger.debug(`Re-Arming failsafe timer before executing step`);
|
|
252
275
|
await this.#armFailsafe();
|
|
253
276
|
}
|
|
@@ -269,7 +292,7 @@ export class ControllerCommissioningFlow {
|
|
|
269
292
|
|
|
270
293
|
/**
|
|
271
294
|
* Commissioner SHALL re-arm the Fail-safe timer on the Commissionee to the desired commissioning
|
|
272
|
-
* timeout within 60 seconds of the completion of PASE session establishment, using the ArmFailSafe
|
|
295
|
+
* timeout within 60 seconds of the completion of a PASE session establishment, using the ArmFailSafe
|
|
273
296
|
* command (see Section 11.9.6.2, “ArmFailSafe Command”)
|
|
274
297
|
*/
|
|
275
298
|
const timeLeft = Timespan(Time.nowMs, this.#currentFailSafeEndTime).duration;
|
|
@@ -277,7 +300,7 @@ export class ControllerCommissioningFlow {
|
|
|
277
300
|
logger.info(
|
|
278
301
|
`After Commissioning step ${step.stepNumber}.${step.subStepNumber}: ${
|
|
279
302
|
step.name
|
|
280
|
-
} succeeded, ${timeLeft}
|
|
303
|
+
} succeeded, ${Duration.format(timeLeft)} left for failsafe timer, re-arming failsafe`,
|
|
281
304
|
);
|
|
282
305
|
await this.#armFailsafe();
|
|
283
306
|
failSafeTimerReArmedAfterPreviousStep = true;
|
|
@@ -496,11 +519,20 @@ export class ControllerCommissioningFlow {
|
|
|
496
519
|
});
|
|
497
520
|
|
|
498
521
|
this.commissioningSteps.push({
|
|
499
|
-
stepNumber:
|
|
522
|
+
stepNumber: 98, // Should be allowed in Step 13, but Tasmota is not supporting this
|
|
500
523
|
subStepNumber: 1,
|
|
501
524
|
name: "OperationalCredentials.UpdateFabricLabel",
|
|
502
525
|
stepLogic: () => this.#updateFabricLabel(),
|
|
503
526
|
});
|
|
527
|
+
|
|
528
|
+
if (this.commissioningOptions.otaUpdateProviderLocation !== undefined) {
|
|
529
|
+
this.commissioningSteps.push({
|
|
530
|
+
stepNumber: 99,
|
|
531
|
+
subStepNumber: 1,
|
|
532
|
+
name: "AdditionalLogic.AddDefaultOtaProvider",
|
|
533
|
+
stepLogic: () => this.#addDefaultOtaProvider(),
|
|
534
|
+
});
|
|
535
|
+
}
|
|
504
536
|
}
|
|
505
537
|
|
|
506
538
|
#sortSteps() {
|
|
@@ -621,16 +653,22 @@ export class ControllerCommissioningFlow {
|
|
|
621
653
|
cluster: NetworkCommissioning.Complete,
|
|
622
654
|
attributes: ["featureMap", "networks"],
|
|
623
655
|
}),
|
|
656
|
+
Read.Attribute({
|
|
657
|
+
cluster: OtaSoftwareUpdateRequestor.Complete,
|
|
658
|
+
attributes: ["defaultOtaProviders"],
|
|
659
|
+
}),
|
|
624
660
|
),
|
|
625
661
|
);
|
|
662
|
+
|
|
626
663
|
const networkFeatures = new Array<{
|
|
627
|
-
endpointId:
|
|
664
|
+
endpointId: EndpointNumber;
|
|
628
665
|
value: TypeFromPartialBitSchema<typeof NetworkCommissioning.Complete.features>;
|
|
629
666
|
}>();
|
|
630
667
|
const networkStatus = new Array<{
|
|
631
|
-
endpointId:
|
|
668
|
+
endpointId: EndpointNumber;
|
|
632
669
|
value: TypeFromSchema<typeof NetworkCommissioning.TlvNetworkInfo>[];
|
|
633
670
|
}>();
|
|
671
|
+
const otaRequestors = new Array<EndpointNumber>();
|
|
634
672
|
|
|
635
673
|
for await (const data of networkData) {
|
|
636
674
|
for (const entry of data) {
|
|
@@ -641,22 +679,29 @@ export class ControllerCommissioningFlow {
|
|
|
641
679
|
path: { endpointId, attributeId },
|
|
642
680
|
value,
|
|
643
681
|
} = entry;
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
682
|
+
switch (attributeId) {
|
|
683
|
+
case NetworkCommissioning.Complete.attributes.featureMap.id:
|
|
684
|
+
networkFeatures.push({
|
|
685
|
+
endpointId,
|
|
686
|
+
value: value as TypeFromPartialBitSchema<typeof NetworkCommissioning.Complete.features>,
|
|
687
|
+
});
|
|
688
|
+
break;
|
|
689
|
+
case NetworkCommissioning.Complete.attributes.networks.id:
|
|
690
|
+
networkStatus.push({
|
|
691
|
+
endpointId,
|
|
692
|
+
value: value as TypeFromSchema<typeof NetworkCommissioning.TlvNetworkInfo>[],
|
|
693
|
+
});
|
|
694
|
+
break;
|
|
695
|
+
case OtaSoftwareUpdateRequestor.Complete.attributes.defaultOtaProviders.id:
|
|
696
|
+
otaRequestors.push(endpointId);
|
|
697
|
+
break;
|
|
654
698
|
}
|
|
655
699
|
}
|
|
656
700
|
}
|
|
657
701
|
|
|
658
702
|
this.collectedCommissioningData.networkFeatures = networkFeatures;
|
|
659
703
|
this.collectedCommissioningData.networkStatus = networkStatus;
|
|
704
|
+
this.collectedCommissioningData.otaRequestorList = otaRequestors;
|
|
660
705
|
|
|
661
706
|
return {
|
|
662
707
|
code: CommissioningStepResultCode.Success,
|
|
@@ -667,11 +712,11 @@ export class ControllerCommissioningFlow {
|
|
|
667
712
|
/**
|
|
668
713
|
* Step 7
|
|
669
714
|
* Commissioner SHALL re-arm the Fail-safe timer on the Commissionee to the desired commissioning
|
|
670
|
-
* timeout within 60 seconds of the completion of PASE session establishment, using the
|
|
715
|
+
* timeout within 60 seconds of the completion of a PASE session establishment, using the
|
|
671
716
|
* ArmFailSafe command (see Section 11.10.6.2, “ArmFailSafe Command”). A Commissioner MAY
|
|
672
|
-
*
|
|
717
|
+
* collect device information including guidance on the fail-safe value from the Commissionee by
|
|
673
718
|
* reading BasicCommissioningInfo attribute (see Section 11.10.5.2, “BasicCommissioningInfo
|
|
674
|
-
* Attribute”)
|
|
719
|
+
* Attribute”) before invoking the ArmFailSafe command.
|
|
675
720
|
*/
|
|
676
721
|
async #armFailsafe(time?: Duration) {
|
|
677
722
|
if (this.collectedCommissioningData.basicCommissioningInfo === undefined) {
|
|
@@ -722,12 +767,39 @@ export class ControllerCommissioningFlow {
|
|
|
722
767
|
async #ensureFailsafeTimerFor(maxProcessingTime: Duration) {
|
|
723
768
|
const minFailsafeTime = this.interaction.maximumPeerResponseTime(maxProcessingTime);
|
|
724
769
|
|
|
770
|
+
if (this.interaction.channelType === ChannelType.BLE) {
|
|
771
|
+
this.#armFailsafeInterval?.stop();
|
|
772
|
+
|
|
773
|
+
this.#armFailsafeInterval = Time.getPeriodicTimer(
|
|
774
|
+
"Re-Arm Failsafe during longer interactions",
|
|
775
|
+
BTP_IDLE_ALIVE_INTERVAL,
|
|
776
|
+
() => {
|
|
777
|
+
const now = Time.nowMs;
|
|
778
|
+
if (this.#commissioningExpiryTime !== undefined && now < this.#commissioningExpiryTime) {
|
|
779
|
+
logger.debug(
|
|
780
|
+
`Re-Arm Failsafe Timer during longer actions with device. Time left: ${Duration.format(Timespan(now, this.#commissioningExpiryTime).duration)}`,
|
|
781
|
+
);
|
|
782
|
+
this.#armFailsafe().catch(error => {
|
|
783
|
+
logger.info("Error while re-arming failsafe during reconnect", error);
|
|
784
|
+
this.#armFailsafeInterval?.stop();
|
|
785
|
+
});
|
|
786
|
+
} else {
|
|
787
|
+
// Stop as soon as we are over the maximum commissioning time
|
|
788
|
+
this.#armFailsafeInterval?.stop();
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
).start();
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
// When not on BLE, we just ensure the Failsafe timer is armed long enough
|
|
725
795
|
const timeLeft = this.#failSafeTimeLeft;
|
|
726
796
|
if (timeLeft < minFailsafeTime) {
|
|
727
|
-
logger.debug(
|
|
797
|
+
logger.debug(
|
|
798
|
+
`Failsafe timer has only ${Duration.format(timeLeft)} left, re-arming for at least ${Duration.format(minFailsafeTime)}`,
|
|
799
|
+
);
|
|
728
800
|
await this.#armFailsafe(Duration.max(minFailsafeTime, this.#defaultFailSafeTime));
|
|
729
801
|
} else {
|
|
730
|
-
logger.debug(`Failsafe timer is already set for at least ${
|
|
802
|
+
logger.debug(`Failsafe timer is already set for at least ${Duration.format(timeLeft)}`);
|
|
731
803
|
}
|
|
732
804
|
}
|
|
733
805
|
|
|
@@ -1189,7 +1261,6 @@ export class ControllerCommissioningFlow {
|
|
|
1189
1261
|
|
|
1190
1262
|
// Only Scan when the device supports concurrent connections
|
|
1191
1263
|
if (this.collectedCommissioningData.supportsConcurrentConnection !== false) {
|
|
1192
|
-
// TODO add message transmission time
|
|
1193
1264
|
await this.#ensureFailsafeTimerFor(Seconds(scanMaxTimeSeconds));
|
|
1194
1265
|
|
|
1195
1266
|
const { networkingStatus, wiFiScanResults, debugText } = await this.#invokeCommand(
|
|
@@ -1273,7 +1344,6 @@ export class ControllerCommissioningFlow {
|
|
|
1273
1344
|
};
|
|
1274
1345
|
}
|
|
1275
1346
|
|
|
1276
|
-
// TODO Add retransmission time
|
|
1277
1347
|
await this.#ensureFailsafeTimerFor(Seconds(connectMaxTimeSeconds));
|
|
1278
1348
|
|
|
1279
1349
|
const connectResult = await this.#invokeCommand(
|
|
@@ -1282,7 +1352,7 @@ export class ControllerCommissioningFlow {
|
|
|
1282
1352
|
cluster: NetworkCommissioning.Complete,
|
|
1283
1353
|
command: "connectNetwork",
|
|
1284
1354
|
fields: {
|
|
1285
|
-
networkId
|
|
1355
|
+
networkId,
|
|
1286
1356
|
breadcrumb: this.lastBreadcrumb++,
|
|
1287
1357
|
},
|
|
1288
1358
|
},
|
|
@@ -1440,7 +1510,7 @@ export class ControllerCommissioningFlow {
|
|
|
1440
1510
|
`Commissionee added Thread network ${this.commissioningOptions.threadNetwork.networkName} with network index ${networkIndex}`,
|
|
1441
1511
|
);
|
|
1442
1512
|
|
|
1443
|
-
const updatedNetworks = await this.#readConcreteAttributeValues(
|
|
1513
|
+
const [updatedNetworks] = await this.#readConcreteAttributeValues(
|
|
1444
1514
|
Read(
|
|
1445
1515
|
Read.Attribute({
|
|
1446
1516
|
endpoint: RootEndpointNumber,
|
|
@@ -1474,7 +1544,7 @@ export class ControllerCommissioningFlow {
|
|
|
1474
1544
|
cluster: NetworkCommissioning.Complete,
|
|
1475
1545
|
command: "connectNetwork",
|
|
1476
1546
|
fields: {
|
|
1477
|
-
networkId
|
|
1547
|
+
networkId,
|
|
1478
1548
|
breadcrumb: this.lastBreadcrumb++,
|
|
1479
1549
|
},
|
|
1480
1550
|
},
|
|
@@ -1513,31 +1583,12 @@ export class ControllerCommissioningFlow {
|
|
|
1513
1583
|
|
|
1514
1584
|
logger.debug(`Reconnecting with device with ${isConcurrentFlow ? "concurrent" : "non-concurrent"} flow ...`);
|
|
1515
1585
|
|
|
1516
|
-
// Reconnection with discovery could take longer
|
|
1586
|
+
// Reconnection with discovery could take longer than the default failsafe time, so we need to
|
|
1517
1587
|
// re-arm the failsafe when we are in a concurrent commissioning flow also in parallel to
|
|
1518
1588
|
// the operative reconnection
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
Millis(this.#defaultFailSafeTime / 2),
|
|
1523
|
-
() => {
|
|
1524
|
-
const now = Time.nowMs;
|
|
1525
|
-
if (this.#commissioningExpiryTime !== undefined && now < this.#commissioningExpiryTime) {
|
|
1526
|
-
logger.error(
|
|
1527
|
-
`Re-Arm Failsafe Timer during reconnect with device. Time left: ${Math.round((this.#commissioningExpiryTime - now) / 1000)}s`,
|
|
1528
|
-
);
|
|
1529
|
-
this.#armFailsafe().catch(error => {
|
|
1530
|
-
logger.error("Error while re-arming failsafe during reconnect", error);
|
|
1531
|
-
reArmFailsafeInterval.stop();
|
|
1532
|
-
});
|
|
1533
|
-
} else {
|
|
1534
|
-
// Stop as soon as we are over the maximum commissioning time
|
|
1535
|
-
reArmFailsafeInterval.stop();
|
|
1536
|
-
}
|
|
1537
|
-
},
|
|
1538
|
-
);
|
|
1539
|
-
if (isConcurrentFlow) {
|
|
1540
|
-
reArmFailsafeInterval.start();
|
|
1589
|
+
await this.#ensureFailsafeTimerFor(Seconds(120));
|
|
1590
|
+
if (!isConcurrentFlow) {
|
|
1591
|
+
this.#armFailsafeInterval?.stop();
|
|
1541
1592
|
}
|
|
1542
1593
|
|
|
1543
1594
|
let transitionResult: ClientInteraction | undefined;
|
|
@@ -1549,10 +1600,10 @@ export class ControllerCommissioningFlow {
|
|
|
1549
1600
|
);
|
|
1550
1601
|
} catch (cause) {
|
|
1551
1602
|
throw new OperativeConnectionFailedError("Operative reconnection with device failed", { cause });
|
|
1603
|
+
} finally {
|
|
1604
|
+
this.#armFailsafeInterval?.stop();
|
|
1552
1605
|
}
|
|
1553
1606
|
|
|
1554
|
-
reArmFailsafeInterval.stop();
|
|
1555
|
-
|
|
1556
1607
|
if (transitionResult === undefined) {
|
|
1557
1608
|
logger.debug("CASE commissioning handled externally, terminating commissioning flow");
|
|
1558
1609
|
return {
|
|
@@ -1600,4 +1651,60 @@ export class ControllerCommissioningFlow {
|
|
|
1600
1651
|
breadcrumb: this.lastBreadcrumb,
|
|
1601
1652
|
};
|
|
1602
1653
|
}
|
|
1654
|
+
|
|
1655
|
+
async #addDefaultOtaProvider() {
|
|
1656
|
+
if (this.commissioningOptions.otaUpdateProviderLocation === undefined) {
|
|
1657
|
+
return {
|
|
1658
|
+
code: CommissioningStepResultCode.Skipped,
|
|
1659
|
+
breadcrumb: this.lastBreadcrumb,
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
if (!this.collectedCommissioningData?.otaRequestorList?.length) {
|
|
1664
|
+
logger.debug("No OTA Requestor found, skipping adding default OTA provider");
|
|
1665
|
+
return {
|
|
1666
|
+
code: CommissioningStepResultCode.Skipped,
|
|
1667
|
+
breadcrumb: this.lastBreadcrumb,
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
const { nodeId: providerNodeId, endpoint } = this.commissioningOptions.otaUpdateProviderLocation;
|
|
1672
|
+
|
|
1673
|
+
let success = false;
|
|
1674
|
+
for (const requestorEndpoint of this.collectedCommissioningData.otaRequestorList) {
|
|
1675
|
+
try {
|
|
1676
|
+
// Fabric scoped attribute, so we just overwrite our value
|
|
1677
|
+
await this.interaction.write(
|
|
1678
|
+
Write(
|
|
1679
|
+
Write.Attribute({
|
|
1680
|
+
endpoint: requestorEndpoint,
|
|
1681
|
+
cluster: OtaSoftwareUpdateRequestor.Complete,
|
|
1682
|
+
attributes: ["defaultOtaProviders"],
|
|
1683
|
+
value: [
|
|
1684
|
+
{
|
|
1685
|
+
providerNodeId,
|
|
1686
|
+
endpoint,
|
|
1687
|
+
fabricIndex: this.fabric.fabricIndex,
|
|
1688
|
+
},
|
|
1689
|
+
],
|
|
1690
|
+
}),
|
|
1691
|
+
),
|
|
1692
|
+
);
|
|
1693
|
+
success = true;
|
|
1694
|
+
logger.debug(`Added default OTA provider on endpoint ${endpoint}`);
|
|
1695
|
+
} catch (error) {
|
|
1696
|
+
// Ok to just log, we will check again also in the SoftwareUpdateManager
|
|
1697
|
+
logger.info("Could not set default OTA provider", error);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
return {
|
|
1702
|
+
code: success ? CommissioningStepResultCode.Success : CommissioningStepResultCode.Failure,
|
|
1703
|
+
breadcrumb: this.lastBreadcrumb,
|
|
1704
|
+
};
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
close() {
|
|
1708
|
+
this.#armFailsafeInterval?.stop();
|
|
1709
|
+
}
|
|
1603
1710
|
}
|
package/src/peer/PeerSet.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { CaseClient } from "#session/case/CaseClient.js";
|
|
|
42
42
|
import { SecureSession } from "#session/SecureSession.js";
|
|
43
43
|
import { Session } from "#session/Session.js";
|
|
44
44
|
import { SessionManager } from "#session/SessionManager.js";
|
|
45
|
+
import { SessionParameters } from "#session/SessionParameters.js";
|
|
45
46
|
import { CaseAuthenticatedTag, NodeId, SECURE_CHANNEL_PROTOCOL_ID, SecureChannelStatusCode } from "#types";
|
|
46
47
|
import { ControllerDiscovery, DiscoveryError, PairRetransmissionLimitReachedError } from "./ControllerDiscovery.js";
|
|
47
48
|
import { Peer } from "./Peer.js";
|
|
@@ -266,12 +267,12 @@ export class PeerSet implements ImmutableSet<Peer>, ObservableSet<Peer> {
|
|
|
266
267
|
|
|
267
268
|
const peer = this.for(address);
|
|
268
269
|
|
|
269
|
-
// We have a session, so we assume we have connection
|
|
270
|
+
// We have a session, so we assume we have a connection
|
|
270
271
|
if (this.#sessions.maybeSessionFor(address)) {
|
|
271
272
|
return;
|
|
272
273
|
}
|
|
273
274
|
|
|
274
|
-
// There is an active discovery running for Full discovery, we
|
|
275
|
+
// There is an active discovery running for Full discovery, we cannot do more than that, do not block the call
|
|
275
276
|
// because it will error in the next step
|
|
276
277
|
if (peer.activeDiscovery?.type === NodeDiscoveryType.FullDiscovery) {
|
|
277
278
|
return;
|
|
@@ -600,11 +601,14 @@ export class PeerSet implements ImmutableSet<Peer>, ObservableSet<Peer> {
|
|
|
600
601
|
return device !== undefined ? [device] : [];
|
|
601
602
|
},
|
|
602
603
|
async (operationalAddress, peer) => {
|
|
603
|
-
const
|
|
604
|
-
await this.#addOrUpdatePeer(address, operationalAddress, {
|
|
604
|
+
const peerData = {
|
|
605
605
|
...discoveryData,
|
|
606
606
|
...peer,
|
|
607
|
+
};
|
|
608
|
+
const result = await this.#pair(address, operationalAddress, peerData, {
|
|
609
|
+
caseAuthenticatedTags,
|
|
607
610
|
});
|
|
611
|
+
await this.#addOrUpdatePeer(address, operationalAddress, peerData);
|
|
608
612
|
return result;
|
|
609
613
|
},
|
|
610
614
|
);
|
|
@@ -684,15 +688,24 @@ export class PeerSet implements ImmutableSet<Peer>, ObservableSet<Peer> {
|
|
|
684
688
|
|
|
685
689
|
const operationalChannel = await operationalInterface.openChannel(operationalServerAddress);
|
|
686
690
|
const { sessionParameters } = this.#sessions.findResumptionRecordByAddress(address) ?? {};
|
|
691
|
+
|
|
692
|
+
// Build session parameters, only including values that are actually defined
|
|
693
|
+
// to allow SessionParameters fallbacks to apply correctly
|
|
694
|
+
const idleInterval = discoveryData?.SII ?? sessionParameters?.idleInterval;
|
|
695
|
+
const activeInterval = discoveryData?.SAI ?? sessionParameters?.activeInterval;
|
|
696
|
+
const activeThreshold = discoveryData?.SAT ?? sessionParameters?.activeThreshold;
|
|
697
|
+
|
|
698
|
+
const mergedSessionParameters: SessionParameters.Config = {
|
|
699
|
+
...sessionParameters,
|
|
700
|
+
...(idleInterval !== undefined ? { idleInterval } : {}),
|
|
701
|
+
...(activeInterval !== undefined ? { activeInterval } : {}),
|
|
702
|
+
...(activeThreshold !== undefined ? { activeThreshold } : {}),
|
|
703
|
+
};
|
|
704
|
+
|
|
687
705
|
const unsecuredSession = this.#sessions.createUnsecuredSession({
|
|
688
706
|
channel: operationalChannel,
|
|
689
|
-
// Use the session parameters from MDNS announcements when available and rest is assumed to be
|
|
690
|
-
sessionParameters:
|
|
691
|
-
...sessionParameters,
|
|
692
|
-
idleInterval: discoveryData?.SII ?? sessionParameters?.idleInterval,
|
|
693
|
-
activeInterval: discoveryData?.SAI ?? sessionParameters?.activeInterval,
|
|
694
|
-
activeThreshold: discoveryData?.SAT ?? sessionParameters?.activeThreshold,
|
|
695
|
-
},
|
|
707
|
+
// Use the session parameters from MDNS announcements when available and rest is assumed to be fall back
|
|
708
|
+
sessionParameters: mergedSessionParameters,
|
|
696
709
|
isInitiator: true,
|
|
697
710
|
});
|
|
698
711
|
|
|
@@ -735,7 +748,7 @@ export class PeerSet implements ImmutableSet<Peer>, ObservableSet<Peer> {
|
|
|
735
748
|
// It seems the stored resumption record is outdated; we need to retry pairing without resumption
|
|
736
749
|
if (await this.#sessions.deleteResumptionRecord(fabric.addressOf(address.nodeId))) {
|
|
737
750
|
logger.info(
|
|
738
|
-
`Case client: Resumption record seems outdated for Fabric ${NodeId.
|
|
751
|
+
`Case client: Resumption record seems outdated for Fabric ${NodeId.strOf(fabric.nodeId)} (index ${fabric.fabricIndex}) and PeerNode ${NodeId.strOf(address.nodeId)}. Retrying pairing without resumption...`,
|
|
739
752
|
);
|
|
740
753
|
// An endless loop should not happen here, as the resumption record is deleted in the next step
|
|
741
754
|
return await this.#doCasePair(paseSession, address, options);
|
|
@@ -47,7 +47,7 @@ export class DeviceAdvertiser {
|
|
|
47
47
|
this.#advertiseFabric(fabric, "startup");
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
// When
|
|
50
|
+
// When fabric is updated, we might need to adjust announcements
|
|
51
51
|
this.#observers.on(fabrics.events.replaced, async fabric => {
|
|
52
52
|
if (!this.#isOperational) {
|
|
53
53
|
return;
|
|
@@ -63,7 +63,7 @@ export class DeviceAdvertiser {
|
|
|
63
63
|
fabricIndexAdvertisements.every(
|
|
64
64
|
ad =>
|
|
65
65
|
ad.isOperational() &&
|
|
66
|
-
ad.description.fabric.
|
|
66
|
+
ad.description.fabric.globalId === fabric.globalId &&
|
|
67
67
|
ad.description.fabric.nodeId === fabric.nodeId,
|
|
68
68
|
)
|
|
69
69
|
) {
|
|
@@ -77,7 +77,7 @@ export class DeviceAdvertiser {
|
|
|
77
77
|
this.#advertiseFabric(fabric, "startup");
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
// When
|
|
80
|
+
// When fabric is deleted, cancel any active advertisement
|
|
81
81
|
this.#observers.on(fabrics.events.deleting, fabric => {
|
|
82
82
|
Advertisement.cancelAll(this.#advertisements(ad => ad.isOperational() && ad.description.fabric === fabric));
|
|
83
83
|
});
|
|
@@ -86,7 +86,7 @@ export class DeviceAdvertiser {
|
|
|
86
86
|
// configured
|
|
87
87
|
this.#observers.on(sessions.sessions.added, session => {
|
|
88
88
|
const fabricIndex = session.fabric?.fabricIndex;
|
|
89
|
-
const fabric = fabricIndex ? fabrics.
|
|
89
|
+
const fabric = fabricIndex ? fabrics.maybeFor(fabricIndex) : undefined;
|
|
90
90
|
if (!fabric) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
@@ -102,7 +102,7 @@ export class DeviceAdvertiser {
|
|
|
102
102
|
// When a session is closed, conditionally resume broadcast
|
|
103
103
|
this.#observers.on(sessions.sessions.deleted, session => {
|
|
104
104
|
const fabricIndex = session.fabric?.fabricIndex;
|
|
105
|
-
const fabric = fabricIndex ? fabrics.
|
|
105
|
+
const fabric = fabricIndex ? fabrics.maybeFor(fabricIndex) : undefined;
|
|
106
106
|
|
|
107
107
|
// If this was an operational connection, readvertise if we're no longer connected to the peer
|
|
108
108
|
if (fabric) {
|
|
@@ -36,7 +36,7 @@ export abstract class ExchangeProvider {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
abstract maximumPeerResponseTime(expectedProcessingTime?: Duration): Duration;
|
|
39
|
-
abstract initiateExchange(): Promise<MessageExchange>;
|
|
39
|
+
abstract initiateExchange(protocol?: number): Promise<MessageExchange>;
|
|
40
40
|
abstract reconnectChannel(options: { asOf?: Timestamp; resetInitialState?: boolean }): Promise<boolean>;
|
|
41
41
|
abstract session: Session;
|
|
42
42
|
|
|
@@ -103,7 +103,7 @@ export class ReconnectableExchangeProvider extends ExchangeProvider {
|
|
|
103
103
|
return this.#channelUpdated;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
async initiateExchange(): Promise<MessageExchange> {
|
|
106
|
+
async initiateExchange(protocol = INTERACTION_PROTOCOL_ID): Promise<MessageExchange> {
|
|
107
107
|
if (!this.sessions.maybeSessionFor(this.#address)) {
|
|
108
108
|
using _connecting = this.sessions.construction.join(
|
|
109
109
|
"connecting to",
|
|
@@ -115,7 +115,7 @@ export class ReconnectableExchangeProvider extends ExchangeProvider {
|
|
|
115
115
|
if (!this.sessions.maybeSessionFor(this.#address)) {
|
|
116
116
|
throw new SessionClosedError("Channel not connected");
|
|
117
117
|
}
|
|
118
|
-
return this.exchangeManager.initiateExchange(this.#address,
|
|
118
|
+
return this.exchangeManager.initiateExchange(this.#address, protocol);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
async reconnectChannel(options: { asOf?: Timestamp; resetInitialState?: boolean } = {}) {
|
|
@@ -187,9 +187,9 @@ export class MessageExchange {
|
|
|
187
187
|
Diagnostic.dict({
|
|
188
188
|
protocol: this.#protocolId,
|
|
189
189
|
peerSess: Session.idStrOf(this.#peerSessionId),
|
|
190
|
-
SAT: Duration.format(activeThreshold),
|
|
191
|
-
SAI: Duration.format(activeInterval),
|
|
192
|
-
SII: Duration.format(idleInterval),
|
|
190
|
+
SAT: activeThreshold !== undefined ? Duration.format(activeThreshold) : undefined,
|
|
191
|
+
SAI: activeInterval !== undefined ? Duration.format(activeInterval) : undefined,
|
|
192
|
+
SII: idleInterval !== undefined ? Duration.format(idleInterval) : undefined,
|
|
193
193
|
maxTrans: MRP.MAX_TRANSMISSIONS,
|
|
194
194
|
exchangeFlags: Diagnostic.asFlags({
|
|
195
195
|
MRP: this.session.usesMrp,
|
|
@@ -28,7 +28,16 @@ import { MessageType } from "#interaction/InteractionMessenger.js";
|
|
|
28
28
|
import { NodeSession as RealNodeSession } from "#session/NodeSession.js";
|
|
29
29
|
import { Session } from "#session/Session.js";
|
|
30
30
|
import { SessionParameters } from "#session/SessionParameters.js";
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
FabricId,
|
|
33
|
+
FabricIndex,
|
|
34
|
+
GlobalFabricId,
|
|
35
|
+
NodeId,
|
|
36
|
+
SECURE_CHANNEL_PROTOCOL_ID,
|
|
37
|
+
Status,
|
|
38
|
+
TlvStatusResponse,
|
|
39
|
+
VendorId,
|
|
40
|
+
} from "#types";
|
|
32
41
|
import { Specification } from "@matter/model";
|
|
33
42
|
import { MessageChannel as RealMessageChannel } from "./MessageChannel.js";
|
|
34
43
|
import { MessageExchange, MessageExchangeContext } from "./MessageExchange.js";
|
|
@@ -38,7 +47,7 @@ export namespace ProtocolMocks {
|
|
|
38
47
|
* A fabric that will fill any fields not provided with placeholder values.
|
|
39
48
|
*/
|
|
40
49
|
export class Fabric extends RealFabric {
|
|
41
|
-
constructor(config?: Partial<RealFabric.
|
|
50
|
+
constructor(config?: Partial<RealFabric.SyncConfig>, crypto?: Crypto) {
|
|
42
51
|
if (!crypto) {
|
|
43
52
|
crypto = Environment.default.maybeGet(Crypto);
|
|
44
53
|
if (!(crypto instanceof MockCrypto)) {
|
|
@@ -60,7 +69,7 @@ export namespace ProtocolMocks {
|
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
export namespace Fabric {
|
|
63
|
-
export const defaults: RealFabric.
|
|
72
|
+
export const defaults: RealFabric.SyncConfig = {
|
|
64
73
|
fabricId: FabricId(0x2906c908d115d362n),
|
|
65
74
|
fabricIndex: FabricIndex(1),
|
|
66
75
|
identityProtectionKey: Bytes.empty,
|
|
@@ -69,7 +78,7 @@ export namespace ProtocolMocks {
|
|
|
69
78
|
label: "test-fabric",
|
|
70
79
|
nodeId: NodeId(0xcd5544aa7b13ef14n),
|
|
71
80
|
operationalCert: Bytes.empty,
|
|
72
|
-
|
|
81
|
+
globalId: GlobalFabricId(0),
|
|
73
82
|
operationalIdentityProtectionKey: b$`9bc61cd9c62a2df6d64dfcaa9dc472d4`,
|
|
74
83
|
rootCert: Bytes.empty,
|
|
75
84
|
rootNodeId: NodeId(1),
|
|
@@ -28,7 +28,7 @@ import { MessageCounter } from "#protocol/MessageCounter.js";
|
|
|
28
28
|
import { MessageExchange } from "#protocol/MessageExchange.js";
|
|
29
29
|
import { MessageReceptionStateEncryptedWithoutRollover } from "#protocol/MessageReceptionState.js";
|
|
30
30
|
import { SecureChannelMessenger } from "#securechannel/SecureChannelMessenger.js";
|
|
31
|
-
import { CaseAuthenticatedTag, FabricIndex, NodeId } from "#types";
|
|
31
|
+
import { CaseAuthenticatedTag, FabricIndex, GlobalFabricId, NodeId } from "#types";
|
|
32
32
|
import { SecureSession } from "./SecureSession.js";
|
|
33
33
|
import { Session } from "./Session.js";
|
|
34
34
|
import { SessionParameters } from "./SessionParameters.js";
|
|
@@ -321,7 +321,7 @@ export class NodeSession extends SecureSession {
|
|
|
321
321
|
super.addExchange(exchange);
|
|
322
322
|
exchange.closed.on(async () => {
|
|
323
323
|
this.exchanges.delete(exchange);
|
|
324
|
-
if (this.deferredClose && !this.
|
|
324
|
+
if (this.deferredClose && !this.hasActiveExchanges) {
|
|
325
325
|
this.deferredClose = false;
|
|
326
326
|
await this.close();
|
|
327
327
|
}
|
|
@@ -391,7 +391,7 @@ export namespace NodeSession {
|
|
|
391
391
|
Diagnostic.strong(PeerAddress({ fabricIndex: fabric.fabricIndex, nodeId: peerNodeId }).toString()),
|
|
392
392
|
Diagnostic.dict({
|
|
393
393
|
address: messenger.channelName,
|
|
394
|
-
fabric: `${
|
|
394
|
+
fabric: `${GlobalFabricId.strOf(fabric.globalId)} (#${fabric.fabricIndex})`,
|
|
395
395
|
...session.parameterDiagnostics,
|
|
396
396
|
}),
|
|
397
397
|
);
|