@matter/protocol 0.16.0-alpha.0-20250816-d22ad240d → 0.16.0-alpha.0-20250819-0a388db8b
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/Val.d.ts +6 -0
- package/dist/cjs/action/Val.d.ts.map +1 -1
- package/dist/cjs/action/Val.js.map +1 -1
- package/dist/cjs/action/client/ClientInteraction.d.ts +1 -1
- package/dist/cjs/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/cjs/action/client/ClientInteraction.js +4 -4
- package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
- package/dist/cjs/action/client/ClientSubscription.d.ts +2 -1
- package/dist/cjs/action/client/ClientSubscription.d.ts.map +1 -1
- package/dist/cjs/action/client/ClientSubscriptionHandler.js +2 -2
- package/dist/cjs/action/client/ClientSubscriptionHandler.js.map +1 -1
- package/dist/cjs/action/client/ClientSubscriptions.d.ts.map +1 -1
- package/dist/cjs/action/client/ClientSubscriptions.js +11 -7
- package/dist/cjs/action/client/ClientSubscriptions.js.map +1 -1
- package/dist/cjs/action/request/Subscribe.d.ts +6 -6
- package/dist/cjs/action/request/Subscribe.d.ts.map +1 -1
- package/dist/cjs/action/request/Subscribe.js +11 -9
- package/dist/cjs/action/request/Subscribe.js.map +1 -1
- package/dist/cjs/advertisement/Advertisement.d.ts +3 -3
- package/dist/cjs/advertisement/Advertisement.d.ts.map +1 -1
- package/dist/cjs/advertisement/Advertisement.js +5 -5
- package/dist/cjs/advertisement/Advertisement.js.map +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertisement.d.ts.map +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertisement.js +7 -6
- package/dist/cjs/advertisement/ble/BleAdvertisement.js.map +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertiser.d.ts +11 -10
- package/dist/cjs/advertisement/ble/BleAdvertiser.d.ts.map +1 -1
- package/dist/cjs/advertisement/ble/BleAdvertiser.js +4 -4
- package/dist/cjs/advertisement/ble/BleAdvertiser.js.map +1 -1
- package/dist/cjs/advertisement/mdns/MdnsAdvertisement.d.ts.map +1 -1
- package/dist/cjs/advertisement/mdns/MdnsAdvertisement.js +7 -7
- package/dist/cjs/advertisement/mdns/MdnsAdvertisement.js.map +1 -1
- package/dist/cjs/advertisement/mdns/MdnsAdvertiser.d.ts +2 -2
- package/dist/cjs/advertisement/mdns/MdnsAdvertiser.d.ts.map +1 -1
- package/dist/cjs/advertisement/mdns/MdnsAdvertiser.js +4 -4
- package/dist/cjs/advertisement/mdns/MdnsAdvertiser.js.map +1 -1
- package/dist/cjs/ble/Ble.d.ts +2 -2
- package/dist/cjs/ble/Ble.d.ts.map +1 -1
- package/dist/cjs/ble/Ble.js.map +1 -1
- package/dist/cjs/ble/BleConsts.d.ts +4 -4
- package/dist/cjs/ble/BleConsts.d.ts.map +1 -1
- package/dist/cjs/ble/BleConsts.js +7 -7
- package/dist/cjs/ble/BleConsts.js.map +1 -1
- package/dist/cjs/ble/BtpSessionHandler.js +2 -2
- package/dist/cjs/ble/BtpSessionHandler.js.map +1 -1
- package/dist/cjs/certificate/AttestationCertificateManager.js +3 -3
- package/dist/cjs/certificate/AttestationCertificateManager.js.map +1 -1
- package/dist/cjs/certificate/CertificateAuthority.js +2 -2
- package/dist/cjs/certificate/CertificateAuthority.js.map +1 -1
- package/dist/cjs/certificate/kinds/OperationalBase.js +2 -2
- package/dist/cjs/certificate/kinds/OperationalBase.js.map +1 -1
- package/dist/cjs/cluster/client/ClusterClient.js +5 -5
- package/dist/cjs/cluster/client/ClusterClient.js.map +1 -1
- package/dist/cjs/cluster/client/ClusterClientTypes.d.ts +3 -3
- package/dist/cjs/cluster/client/ClusterClientTypes.d.ts.map +1 -1
- package/dist/cjs/cluster/client/EventClient.d.ts +2 -1
- package/dist/cjs/cluster/client/EventClient.d.ts.map +1 -1
- package/dist/cjs/cluster/client/EventClient.js +3 -3
- package/dist/cjs/cluster/client/EventClient.js.map +1 -1
- package/dist/cjs/common/FailsafeContext.d.ts +4 -4
- package/dist/cjs/common/FailsafeContext.d.ts.map +1 -1
- package/dist/cjs/common/FailsafeContext.js +8 -8
- package/dist/cjs/common/FailsafeContext.js.map +1 -1
- package/dist/cjs/common/FailsafeTimer.d.ts +3 -3
- package/dist/cjs/common/FailsafeTimer.d.ts.map +1 -1
- package/dist/cjs/common/FailsafeTimer.js +8 -8
- package/dist/cjs/common/FailsafeTimer.js.map +1 -1
- package/dist/cjs/common/Scanner.d.ts +7 -7
- package/dist/cjs/common/Scanner.d.ts.map +1 -1
- package/dist/cjs/common/Scanner.js.map +1 -1
- package/dist/cjs/events/OccurrenceManager.js +1 -1
- package/dist/cjs/events/OccurrenceManager.js.map +1 -1
- package/dist/cjs/groups/FabricGroups.d.ts +1 -1
- package/dist/cjs/groups/FabricGroups.js +1 -1
- package/dist/cjs/groups/Groups.d.ts +1 -1
- package/dist/cjs/groups/KeySets.d.ts +3 -3
- package/dist/cjs/groups/KeySets.d.ts.map +1 -1
- package/dist/cjs/groups/KeySets.js +12 -4
- package/dist/cjs/groups/KeySets.js.map +1 -1
- package/dist/cjs/interaction/InteractionClient.d.ts +9 -9
- package/dist/cjs/interaction/InteractionClient.d.ts.map +1 -1
- package/dist/cjs/interaction/InteractionClient.js +33 -33
- package/dist/cjs/interaction/InteractionClient.js.map +1 -1
- package/dist/cjs/interaction/InteractionMessenger.d.ts +10 -10
- package/dist/cjs/interaction/InteractionMessenger.d.ts.map +1 -1
- package/dist/cjs/interaction/InteractionMessenger.js +15 -15
- package/dist/cjs/interaction/InteractionMessenger.js.map +1 -1
- package/dist/cjs/interaction/Subscription.d.ts +3 -4
- package/dist/cjs/interaction/Subscription.d.ts.map +1 -1
- package/dist/cjs/interaction/Subscription.js +9 -12
- package/dist/cjs/interaction/Subscription.js.map +1 -1
- package/dist/cjs/interaction/SubscriptionClient.d.ts +3 -3
- package/dist/cjs/interaction/SubscriptionClient.d.ts.map +1 -1
- package/dist/cjs/interaction/SubscriptionClient.js +3 -3
- package/dist/cjs/interaction/SubscriptionClient.js.map +1 -1
- package/dist/cjs/mdns/MdnsClient.d.ts +9 -9
- package/dist/cjs/mdns/MdnsClient.d.ts.map +1 -1
- package/dist/cjs/mdns/MdnsClient.js +86 -82
- package/dist/cjs/mdns/MdnsClient.js.map +1 -1
- package/dist/cjs/mdns/MdnsServer.d.ts.map +1 -1
- package/dist/cjs/mdns/MdnsServer.js +11 -9
- package/dist/cjs/mdns/MdnsServer.js.map +1 -1
- package/dist/cjs/peer/ControllerCommissioner.d.ts +2 -2
- package/dist/cjs/peer/ControllerCommissioner.d.ts.map +1 -1
- package/dist/cjs/peer/ControllerCommissioner.js +7 -7
- package/dist/cjs/peer/ControllerCommissioner.js.map +1 -1
- package/dist/cjs/peer/ControllerCommissioningFlow.d.ts.map +1 -1
- package/dist/cjs/peer/ControllerCommissioningFlow.js +37 -35
- package/dist/cjs/peer/ControllerCommissioningFlow.js.map +1 -1
- package/dist/cjs/peer/ControllerDiscovery.d.ts +4 -4
- package/dist/cjs/peer/ControllerDiscovery.d.ts.map +1 -1
- package/dist/cjs/peer/ControllerDiscovery.js +12 -17
- package/dist/cjs/peer/ControllerDiscovery.js.map +1 -1
- package/dist/cjs/peer/InteractionQueue.d.ts.map +1 -1
- package/dist/cjs/peer/InteractionQueue.js +2 -2
- package/dist/cjs/peer/InteractionQueue.js.map +1 -1
- package/dist/cjs/peer/PeerSet.d.ts +2 -2
- package/dist/cjs/peer/PeerSet.d.ts.map +1 -1
- package/dist/cjs/peer/PeerSet.js +25 -25
- package/dist/cjs/peer/PeerSet.js.map +1 -1
- package/dist/cjs/protocol/DeviceCommissioner.d.ts.map +1 -1
- package/dist/cjs/protocol/DeviceCommissioner.js +1 -1
- package/dist/cjs/protocol/DeviceCommissioner.js.map +1 -1
- package/dist/cjs/protocol/ExchangeManager.d.ts +1 -1
- package/dist/cjs/protocol/ExchangeManager.d.ts.map +1 -1
- package/dist/cjs/protocol/ExchangeManager.js +2 -5
- package/dist/cjs/protocol/ExchangeManager.js.map +1 -1
- package/dist/cjs/protocol/ExchangeProvider.d.ts +4 -4
- package/dist/cjs/protocol/ExchangeProvider.d.ts.map +1 -1
- package/dist/cjs/protocol/ExchangeProvider.js +3 -3
- package/dist/cjs/protocol/ExchangeProvider.js.map +1 -1
- package/dist/cjs/protocol/MessageChannel.d.ts +5 -5
- package/dist/cjs/protocol/MessageChannel.d.ts.map +1 -1
- package/dist/cjs/protocol/MessageChannel.js +19 -15
- package/dist/cjs/protocol/MessageChannel.js.map +1 -1
- package/dist/cjs/protocol/MessageExchange.d.ts +6 -6
- package/dist/cjs/protocol/MessageExchange.d.ts.map +1 -1
- package/dist/cjs/protocol/MessageExchange.js +35 -33
- package/dist/cjs/protocol/MessageExchange.js.map +1 -1
- package/dist/cjs/securechannel/SecureChannelMessenger.d.ts +8 -8
- package/dist/cjs/securechannel/SecureChannelMessenger.d.ts.map +1 -1
- package/dist/cjs/securechannel/SecureChannelMessenger.js +17 -17
- package/dist/cjs/securechannel/SecureChannelMessenger.js.map +1 -1
- package/dist/cjs/session/InsecureSession.d.ts +2 -2
- package/dist/cjs/session/InsecureSession.d.ts.map +1 -1
- package/dist/cjs/session/InsecureSession.js.map +1 -1
- package/dist/cjs/session/NodeSession.js +3 -3
- package/dist/cjs/session/Session.d.ts +7 -7
- package/dist/cjs/session/Session.d.ts.map +1 -1
- package/dist/cjs/session/Session.js +19 -19
- package/dist/cjs/session/Session.js.map +1 -1
- package/dist/cjs/session/SessionIntervals.d.ts +7 -6
- package/dist/cjs/session/SessionIntervals.d.ts.map +1 -1
- package/dist/cjs/session/SessionIntervals.js +8 -8
- package/dist/cjs/session/SessionIntervals.js.map +1 -1
- package/dist/cjs/session/SessionManager.d.ts +2 -2
- package/dist/cjs/session/SessionManager.d.ts.map +1 -1
- package/dist/cjs/session/SessionManager.js +6 -6
- package/dist/cjs/session/SessionManager.js.map +1 -1
- package/dist/cjs/session/case/CaseClient.d.ts +2 -1
- package/dist/cjs/session/case/CaseClient.d.ts.map +1 -1
- package/dist/cjs/session/case/CaseClient.js +2 -2
- package/dist/cjs/session/case/CaseClient.js.map +1 -1
- package/dist/cjs/session/pase/PaseMessenger.d.ts.map +1 -1
- package/dist/cjs/session/pase/PaseMessenger.js +4 -7
- package/dist/cjs/session/pase/PaseMessenger.js.map +1 -1
- package/dist/cjs/session/pase/PaseServer.d.ts.map +1 -1
- package/dist/cjs/session/pase/PaseServer.js +1 -1
- package/dist/cjs/session/pase/PaseServer.js.map +1 -1
- package/dist/esm/action/Val.d.ts +6 -0
- package/dist/esm/action/Val.d.ts.map +1 -1
- package/dist/esm/action/Val.js.map +1 -1
- package/dist/esm/action/client/ClientInteraction.d.ts +1 -1
- package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/esm/action/client/ClientInteraction.js +5 -5
- package/dist/esm/action/client/ClientInteraction.js.map +1 -1
- package/dist/esm/action/client/ClientSubscription.d.ts +2 -1
- package/dist/esm/action/client/ClientSubscription.d.ts.map +1 -1
- package/dist/esm/action/client/ClientSubscriptionHandler.js +2 -2
- package/dist/esm/action/client/ClientSubscriptionHandler.js.map +1 -1
- package/dist/esm/action/client/ClientSubscriptions.d.ts.map +1 -1
- package/dist/esm/action/client/ClientSubscriptions.js +14 -8
- package/dist/esm/action/client/ClientSubscriptions.js.map +1 -1
- package/dist/esm/action/request/Subscribe.d.ts +6 -6
- package/dist/esm/action/request/Subscribe.d.ts.map +1 -1
- package/dist/esm/action/request/Subscribe.js +12 -10
- package/dist/esm/action/request/Subscribe.js.map +1 -1
- package/dist/esm/advertisement/Advertisement.d.ts +3 -3
- package/dist/esm/advertisement/Advertisement.d.ts.map +1 -1
- package/dist/esm/advertisement/Advertisement.js +16 -7
- package/dist/esm/advertisement/Advertisement.js.map +1 -1
- package/dist/esm/advertisement/ble/BleAdvertisement.d.ts.map +1 -1
- package/dist/esm/advertisement/ble/BleAdvertisement.js +7 -6
- package/dist/esm/advertisement/ble/BleAdvertisement.js.map +1 -1
- package/dist/esm/advertisement/ble/BleAdvertiser.d.ts +11 -10
- package/dist/esm/advertisement/ble/BleAdvertiser.d.ts.map +1 -1
- package/dist/esm/advertisement/ble/BleAdvertiser.js +6 -6
- package/dist/esm/advertisement/ble/BleAdvertiser.js.map +1 -1
- package/dist/esm/advertisement/mdns/MdnsAdvertisement.d.ts.map +1 -1
- package/dist/esm/advertisement/mdns/MdnsAdvertisement.js +17 -8
- package/dist/esm/advertisement/mdns/MdnsAdvertisement.js.map +1 -1
- package/dist/esm/advertisement/mdns/MdnsAdvertiser.d.ts +2 -2
- package/dist/esm/advertisement/mdns/MdnsAdvertiser.d.ts.map +1 -1
- package/dist/esm/advertisement/mdns/MdnsAdvertiser.js +14 -6
- package/dist/esm/advertisement/mdns/MdnsAdvertiser.js.map +1 -1
- package/dist/esm/ble/Ble.d.ts +2 -2
- package/dist/esm/ble/Ble.d.ts.map +1 -1
- package/dist/esm/ble/Ble.js +5 -1
- package/dist/esm/ble/Ble.js.map +1 -1
- package/dist/esm/ble/BleConsts.d.ts +4 -4
- package/dist/esm/ble/BleConsts.d.ts.map +1 -1
- package/dist/esm/ble/BleConsts.js +8 -8
- package/dist/esm/ble/BleConsts.js.map +1 -1
- package/dist/esm/ble/BtpSessionHandler.js +4 -4
- package/dist/esm/ble/BtpSessionHandler.js.map +1 -1
- package/dist/esm/certificate/AttestationCertificateManager.js +3 -3
- package/dist/esm/certificate/AttestationCertificateManager.js.map +1 -1
- package/dist/esm/certificate/CertificateAuthority.js +2 -2
- package/dist/esm/certificate/CertificateAuthority.js.map +1 -1
- package/dist/esm/certificate/kinds/OperationalBase.js +2 -2
- package/dist/esm/certificate/kinds/OperationalBase.js.map +1 -1
- package/dist/esm/cluster/client/ClusterClient.js +5 -5
- package/dist/esm/cluster/client/ClusterClient.js.map +1 -1
- package/dist/esm/cluster/client/ClusterClientTypes.d.ts +3 -3
- package/dist/esm/cluster/client/ClusterClientTypes.d.ts.map +1 -1
- package/dist/esm/cluster/client/EventClient.d.ts +2 -1
- package/dist/esm/cluster/client/EventClient.d.ts.map +1 -1
- package/dist/esm/cluster/client/EventClient.js +3 -3
- package/dist/esm/cluster/client/EventClient.js.map +1 -1
- package/dist/esm/common/FailsafeContext.d.ts +4 -4
- package/dist/esm/common/FailsafeContext.d.ts.map +1 -1
- package/dist/esm/common/FailsafeContext.js +9 -8
- package/dist/esm/common/FailsafeContext.js.map +1 -1
- package/dist/esm/common/FailsafeTimer.d.ts +3 -3
- package/dist/esm/common/FailsafeTimer.d.ts.map +1 -1
- package/dist/esm/common/FailsafeTimer.js +8 -8
- package/dist/esm/common/FailsafeTimer.js.map +1 -1
- package/dist/esm/common/Scanner.d.ts +7 -7
- package/dist/esm/common/Scanner.d.ts.map +1 -1
- package/dist/esm/common/Scanner.js +5 -1
- package/dist/esm/common/Scanner.js.map +1 -1
- package/dist/esm/events/OccurrenceManager.js +1 -1
- package/dist/esm/events/OccurrenceManager.js.map +1 -1
- package/dist/esm/groups/FabricGroups.d.ts +1 -1
- package/dist/esm/groups/FabricGroups.js +1 -1
- package/dist/esm/groups/Groups.d.ts +1 -1
- package/dist/esm/groups/KeySets.d.ts +3 -3
- package/dist/esm/groups/KeySets.d.ts.map +1 -1
- package/dist/esm/groups/KeySets.js +13 -5
- package/dist/esm/groups/KeySets.js.map +1 -1
- package/dist/esm/interaction/InteractionClient.d.ts +9 -9
- package/dist/esm/interaction/InteractionClient.d.ts.map +1 -1
- package/dist/esm/interaction/InteractionClient.js +34 -33
- package/dist/esm/interaction/InteractionClient.js.map +1 -1
- package/dist/esm/interaction/InteractionMessenger.d.ts +10 -10
- package/dist/esm/interaction/InteractionMessenger.d.ts.map +1 -1
- package/dist/esm/interaction/InteractionMessenger.js +16 -15
- package/dist/esm/interaction/InteractionMessenger.js.map +1 -1
- package/dist/esm/interaction/Subscription.d.ts +3 -4
- package/dist/esm/interaction/Subscription.d.ts.map +1 -1
- package/dist/esm/interaction/Subscription.js +9 -12
- package/dist/esm/interaction/Subscription.js.map +1 -1
- package/dist/esm/interaction/SubscriptionClient.d.ts +3 -3
- package/dist/esm/interaction/SubscriptionClient.d.ts.map +1 -1
- package/dist/esm/interaction/SubscriptionClient.js +4 -4
- package/dist/esm/interaction/SubscriptionClient.js.map +1 -1
- package/dist/esm/mdns/MdnsClient.d.ts +9 -9
- package/dist/esm/mdns/MdnsClient.d.ts.map +1 -1
- package/dist/esm/mdns/MdnsClient.js +94 -82
- package/dist/esm/mdns/MdnsClient.js.map +1 -1
- package/dist/esm/mdns/MdnsServer.d.ts.map +1 -1
- package/dist/esm/mdns/MdnsServer.js +14 -9
- package/dist/esm/mdns/MdnsServer.js.map +1 -1
- package/dist/esm/peer/ControllerCommissioner.d.ts +2 -2
- package/dist/esm/peer/ControllerCommissioner.d.ts.map +1 -1
- package/dist/esm/peer/ControllerCommissioner.js +11 -8
- package/dist/esm/peer/ControllerCommissioner.js.map +1 -1
- package/dist/esm/peer/ControllerCommissioningFlow.d.ts.map +1 -1
- package/dist/esm/peer/ControllerCommissioningFlow.js +44 -35
- package/dist/esm/peer/ControllerCommissioningFlow.js.map +1 -1
- package/dist/esm/peer/ControllerDiscovery.d.ts +4 -4
- package/dist/esm/peer/ControllerDiscovery.d.ts.map +1 -1
- package/dist/esm/peer/ControllerDiscovery.js +20 -18
- package/dist/esm/peer/ControllerDiscovery.js.map +1 -1
- package/dist/esm/peer/InteractionQueue.d.ts.map +1 -1
- package/dist/esm/peer/InteractionQueue.js +3 -3
- package/dist/esm/peer/InteractionQueue.js.map +1 -1
- package/dist/esm/peer/PeerSet.d.ts +2 -2
- package/dist/esm/peer/PeerSet.d.ts.map +1 -1
- package/dist/esm/peer/PeerSet.js +29 -26
- package/dist/esm/peer/PeerSet.js.map +1 -1
- package/dist/esm/protocol/DeviceCommissioner.d.ts.map +1 -1
- package/dist/esm/protocol/DeviceCommissioner.js +2 -2
- package/dist/esm/protocol/DeviceCommissioner.js.map +1 -1
- package/dist/esm/protocol/ExchangeManager.d.ts +1 -1
- package/dist/esm/protocol/ExchangeManager.d.ts.map +1 -1
- package/dist/esm/protocol/ExchangeManager.js +3 -6
- package/dist/esm/protocol/ExchangeManager.js.map +1 -1
- package/dist/esm/protocol/ExchangeProvider.d.ts +4 -4
- package/dist/esm/protocol/ExchangeProvider.d.ts.map +1 -1
- package/dist/esm/protocol/ExchangeProvider.js +4 -4
- package/dist/esm/protocol/ExchangeProvider.js.map +1 -1
- package/dist/esm/protocol/MessageChannel.d.ts +5 -5
- package/dist/esm/protocol/MessageChannel.d.ts.map +1 -1
- package/dist/esm/protocol/MessageChannel.js +20 -16
- package/dist/esm/protocol/MessageChannel.js.map +1 -1
- package/dist/esm/protocol/MessageExchange.d.ts +6 -6
- package/dist/esm/protocol/MessageExchange.d.ts.map +1 -1
- package/dist/esm/protocol/MessageExchange.js +39 -34
- package/dist/esm/protocol/MessageExchange.js.map +1 -1
- package/dist/esm/securechannel/SecureChannelMessenger.d.ts +8 -8
- package/dist/esm/securechannel/SecureChannelMessenger.d.ts.map +1 -1
- package/dist/esm/securechannel/SecureChannelMessenger.js +18 -18
- package/dist/esm/securechannel/SecureChannelMessenger.js.map +1 -1
- package/dist/esm/session/InsecureSession.d.ts +2 -2
- package/dist/esm/session/InsecureSession.d.ts.map +1 -1
- package/dist/esm/session/InsecureSession.js.map +1 -1
- package/dist/esm/session/NodeSession.js +3 -3
- package/dist/esm/session/Session.d.ts +7 -7
- package/dist/esm/session/Session.d.ts.map +1 -1
- package/dist/esm/session/Session.js +27 -20
- package/dist/esm/session/Session.js.map +1 -1
- package/dist/esm/session/SessionIntervals.d.ts +7 -6
- package/dist/esm/session/SessionIntervals.d.ts.map +1 -1
- package/dist/esm/session/SessionIntervals.js +8 -8
- package/dist/esm/session/SessionIntervals.js.map +1 -1
- package/dist/esm/session/SessionManager.d.ts +2 -2
- package/dist/esm/session/SessionManager.d.ts.map +1 -1
- package/dist/esm/session/SessionManager.js +6 -6
- package/dist/esm/session/SessionManager.js.map +1 -1
- package/dist/esm/session/case/CaseClient.d.ts +2 -1
- package/dist/esm/session/case/CaseClient.d.ts.map +1 -1
- package/dist/esm/session/case/CaseClient.js +2 -2
- package/dist/esm/session/case/CaseClient.js.map +1 -1
- package/dist/esm/session/pase/PaseMessenger.d.ts.map +1 -1
- package/dist/esm/session/pase/PaseMessenger.js +5 -11
- package/dist/esm/session/pase/PaseMessenger.js.map +1 -1
- package/dist/esm/session/pase/PaseServer.d.ts.map +1 -1
- package/dist/esm/session/pase/PaseServer.js +2 -1
- package/dist/esm/session/pase/PaseServer.js.map +1 -1
- package/package.json +6 -6
- package/src/action/Val.ts +5 -0
- package/src/action/client/ClientInteraction.ts +4 -4
- package/src/action/client/ClientSubscription.ts +2 -1
- package/src/action/client/ClientSubscriptionHandler.ts +2 -2
- package/src/action/client/ClientSubscriptions.ts +14 -8
- package/src/action/request/Subscribe.ts +17 -15
- package/src/advertisement/Advertisement.ts +18 -8
- package/src/advertisement/ble/BleAdvertisement.ts +7 -6
- package/src/advertisement/ble/BleAdvertiser.ts +11 -11
- package/src/advertisement/mdns/MdnsAdvertisement.ts +20 -9
- package/src/advertisement/mdns/MdnsAdvertiser.ts +17 -7
- package/src/ble/Ble.ts +11 -2
- package/src/ble/BleConsts.ts +5 -5
- package/src/ble/BtpSessionHandler.ts +4 -4
- package/src/certificate/AttestationCertificateManager.ts +3 -3
- package/src/certificate/CertificateAuthority.ts +2 -2
- package/src/certificate/kinds/OperationalBase.ts +3 -3
- package/src/cluster/client/ClusterClient.ts +8 -8
- package/src/cluster/client/ClusterClientTypes.ts +3 -3
- package/src/cluster/client/EventClient.ts +5 -5
- package/src/common/FailsafeContext.ts +11 -13
- package/src/common/FailsafeTimer.ts +11 -13
- package/src/common/Scanner.ts +16 -7
- package/src/events/OccurrenceManager.ts +1 -1
- package/src/groups/FabricGroups.ts +1 -1
- package/src/groups/KeySets.ts +14 -6
- package/src/interaction/InteractionClient.ts +46 -44
- package/src/interaction/InteractionMessenger.ts +24 -22
- package/src/interaction/Subscription.ts +10 -14
- package/src/interaction/SubscriptionClient.ts +6 -6
- package/src/mdns/MdnsClient.ts +105 -82
- package/src/mdns/MdnsServer.ts +14 -9
- package/src/peer/ControllerCommissioner.ts +12 -9
- package/src/peer/ControllerCommissioningFlow.ts +48 -39
- package/src/peer/ControllerDiscovery.ts +22 -18
- package/src/peer/InteractionQueue.ts +3 -3
- package/src/peer/PeerSet.ts +34 -28
- package/src/protocol/DeviceCommissioner.ts +2 -2
- package/src/protocol/ExchangeManager.ts +3 -6
- package/src/protocol/ExchangeProvider.ts +6 -6
- package/src/protocol/MessageChannel.ts +26 -21
- package/src/protocol/MessageExchange.ts +42 -38
- package/src/securechannel/SecureChannelMessenger.ts +16 -22
- package/src/session/InsecureSession.ts +2 -2
- package/src/session/NodeSession.ts +3 -3
- package/src/session/Session.ts +31 -21
- package/src/session/SessionIntervals.ts +11 -11
- package/src/session/SessionManager.ts +10 -9
- package/src/session/case/CaseClient.ts +3 -3
- package/src/session/pase/PaseMessenger.ts +5 -11
- package/src/session/pase/PaseServer.ts +2 -1
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
import { AccessControl } from "#clusters/access-control";
|
|
8
8
|
import {
|
|
9
9
|
Diagnostic,
|
|
10
|
+
Duration,
|
|
10
11
|
Environment,
|
|
11
12
|
Environmental,
|
|
12
13
|
ImplementationError,
|
|
13
14
|
Logger,
|
|
14
15
|
MatterFlowError,
|
|
15
16
|
PromiseQueue,
|
|
17
|
+
Seconds,
|
|
16
18
|
ServerAddressIp,
|
|
17
19
|
Timer,
|
|
18
20
|
UnexpectedDataError,
|
|
@@ -61,8 +63,8 @@ import { RegisteredSubscription, SubscriptionClient } from "./SubscriptionClient
|
|
|
61
63
|
const logger = Logger.get("InteractionClient");
|
|
62
64
|
|
|
63
65
|
const REQUEST_ALL = [{}];
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
+
const DEFAULT_TIMED_REQUEST_TIMEOUT = Seconds(10);
|
|
67
|
+
const DEFAULT_MINIMUM_RESPONSE_TIMEOUT_WITH_FAILSAFE = Seconds(30);
|
|
66
68
|
|
|
67
69
|
const AclClusterId = AccessControl.Complete.id;
|
|
68
70
|
const AclAttributeId = AccessControl.Complete.attributes.acl.id;
|
|
@@ -204,8 +206,8 @@ export class InteractionClient {
|
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
/** Calculates the current maximum response time for a message use in additional logic like timers. */
|
|
207
|
-
|
|
208
|
-
return this.#exchangeProvider.
|
|
209
|
+
maximumPeerResponseTime(expectedProcessingTime?: Duration) {
|
|
210
|
+
return this.#exchangeProvider.maximumPeerResponseTime(expectedProcessingTime);
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
removeSubscription(subscriptionId: number) {
|
|
@@ -544,18 +546,18 @@ export class InteractionClient {
|
|
|
544
546
|
dataVersion?: number;
|
|
545
547
|
};
|
|
546
548
|
asTimedRequest?: boolean;
|
|
547
|
-
|
|
549
|
+
timedRequestTimeout?: Duration;
|
|
548
550
|
suppressResponse?: boolean;
|
|
549
551
|
executeQueued?: boolean;
|
|
550
552
|
chunkLists?: boolean;
|
|
551
553
|
}): Promise<void> {
|
|
552
|
-
const { attributeData, asTimedRequest,
|
|
554
|
+
const { attributeData, asTimedRequest, timedRequestTimeout, suppressResponse, executeQueued, chunkLists } =
|
|
553
555
|
options;
|
|
554
556
|
const { endpointId, clusterId, attribute, value, dataVersion } = attributeData;
|
|
555
557
|
const response = await this.setMultipleAttributes({
|
|
556
558
|
attributes: [{ endpointId, clusterId, attribute, value, dataVersion }],
|
|
557
559
|
asTimedRequest,
|
|
558
|
-
|
|
560
|
+
timedRequestTimeout,
|
|
559
561
|
suppressResponse,
|
|
560
562
|
executeQueued,
|
|
561
563
|
chunkLists,
|
|
@@ -585,7 +587,7 @@ export class InteractionClient {
|
|
|
585
587
|
dataVersion?: number;
|
|
586
588
|
}[];
|
|
587
589
|
asTimedRequest?: boolean;
|
|
588
|
-
|
|
590
|
+
timedRequestTimeout?: Duration;
|
|
589
591
|
suppressResponse?: boolean;
|
|
590
592
|
executeQueued?: boolean;
|
|
591
593
|
chunkLists?: boolean;
|
|
@@ -595,7 +597,7 @@ export class InteractionClient {
|
|
|
595
597
|
const {
|
|
596
598
|
attributes,
|
|
597
599
|
asTimedRequest,
|
|
598
|
-
|
|
600
|
+
timedRequestTimeout = DEFAULT_TIMED_REQUEST_TIMEOUT,
|
|
599
601
|
suppressResponse = this.isGroupAddress,
|
|
600
602
|
chunkLists = true, // Should be true currently to stay in sync with chip sdk
|
|
601
603
|
} = options;
|
|
@@ -654,7 +656,7 @@ export class InteractionClient {
|
|
|
654
656
|
const timedRequest =
|
|
655
657
|
attributes.some(({ attribute: { timed } }) => timed) ||
|
|
656
658
|
asTimedRequest === true ||
|
|
657
|
-
options.
|
|
659
|
+
options.timedRequestTimeout !== undefined;
|
|
658
660
|
if (this.isGroupAddress && timedRequest) {
|
|
659
661
|
throw new ImplementationError("Timed requests are not supported for group address writes.");
|
|
660
662
|
}
|
|
@@ -662,7 +664,7 @@ export class InteractionClient {
|
|
|
662
664
|
const response = await this.withMessenger<TypeFromSchema<typeof TlvWriteResponse> | undefined>(
|
|
663
665
|
async messenger => {
|
|
664
666
|
if (timedRequest) {
|
|
665
|
-
await messenger.sendTimedRequest(
|
|
667
|
+
await messenger.sendTimedRequest(timedRequestTimeout);
|
|
666
668
|
}
|
|
667
669
|
|
|
668
670
|
return await messenger.sendWriteCommand({
|
|
@@ -747,11 +749,11 @@ export class InteractionClient {
|
|
|
747
749
|
const {
|
|
748
750
|
subscribeResponse: { subscriptionId, maxInterval },
|
|
749
751
|
report,
|
|
750
|
-
|
|
752
|
+
maximumPeerResponseTime,
|
|
751
753
|
} = await this.withMessenger<{
|
|
752
754
|
subscribeResponse: TypeFromSchema<typeof TlvSubscribeResponse>;
|
|
753
755
|
report: DataReport;
|
|
754
|
-
|
|
756
|
+
maximumPeerResponseTime: Duration;
|
|
755
757
|
}>(async messenger => {
|
|
756
758
|
await messenger.sendSubscribeRequest({
|
|
757
759
|
interactionModelRevision: Specification.INTERACTION_MODEL_REVISION,
|
|
@@ -769,7 +771,7 @@ export class InteractionClient {
|
|
|
769
771
|
return {
|
|
770
772
|
subscribeResponse,
|
|
771
773
|
report,
|
|
772
|
-
|
|
774
|
+
maximumPeerResponseTime: this.maximumPeerResponseTime(),
|
|
773
775
|
};
|
|
774
776
|
}, executeQueued);
|
|
775
777
|
|
|
@@ -800,8 +802,8 @@ export class InteractionClient {
|
|
|
800
802
|
await this.#registerSubscription(
|
|
801
803
|
{
|
|
802
804
|
id: subscriptionId,
|
|
803
|
-
|
|
804
|
-
|
|
805
|
+
maximumPeerResponseTime,
|
|
806
|
+
maxInterval: Seconds(maxInterval),
|
|
805
807
|
onData: subscriptionListener,
|
|
806
808
|
onTimeout: updateTimeoutHandler,
|
|
807
809
|
},
|
|
@@ -821,8 +823,8 @@ export class InteractionClient {
|
|
|
821
823
|
endpointId: EndpointNumber;
|
|
822
824
|
clusterId: ClusterId;
|
|
823
825
|
event: E;
|
|
824
|
-
|
|
825
|
-
|
|
826
|
+
minIntervalFloor: Duration;
|
|
827
|
+
maxIntervalCeiling: Duration;
|
|
826
828
|
isUrgent?: boolean;
|
|
827
829
|
minimumEventNumber?: EventNumber;
|
|
828
830
|
isFabricFiltered?: boolean;
|
|
@@ -840,8 +842,8 @@ export class InteractionClient {
|
|
|
840
842
|
endpointId,
|
|
841
843
|
clusterId,
|
|
842
844
|
event,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
+
minIntervalFloor,
|
|
846
|
+
maxIntervalCeiling,
|
|
845
847
|
isUrgent,
|
|
846
848
|
minimumEventNumber,
|
|
847
849
|
isFabricFiltered = true,
|
|
@@ -853,32 +855,32 @@ export class InteractionClient {
|
|
|
853
855
|
const { id: eventId } = event;
|
|
854
856
|
|
|
855
857
|
logger.debug(
|
|
856
|
-
`Sending subscribe request for event: ${resolveEventName({ endpointId, clusterId, eventId })} with minInterval=${
|
|
858
|
+
`Sending subscribe request for event: ${resolveEventName({ endpointId, clusterId, eventId })} with minInterval=${minIntervalFloor}/maxInterval=${maxIntervalCeiling}`,
|
|
857
859
|
);
|
|
858
860
|
|
|
859
861
|
const {
|
|
860
862
|
report,
|
|
861
863
|
subscribeResponse: { subscriptionId, maxInterval },
|
|
862
|
-
|
|
864
|
+
maximumPeerResponseTime,
|
|
863
865
|
} = await this.withMessenger<{
|
|
864
866
|
subscribeResponse: TypeFromSchema<typeof TlvSubscribeResponse>;
|
|
865
867
|
report: DataReport;
|
|
866
|
-
|
|
868
|
+
maximumPeerResponseTime: Duration;
|
|
867
869
|
}>(async messenger => {
|
|
868
870
|
await messenger.sendSubscribeRequest({
|
|
869
871
|
interactionModelRevision: Specification.INTERACTION_MODEL_REVISION,
|
|
870
872
|
eventRequests: [{ endpointId, clusterId, eventId, isUrgent }],
|
|
871
873
|
eventFilters: minimumEventNumber !== undefined ? [{ eventMin: minimumEventNumber }] : undefined,
|
|
872
874
|
keepSubscriptions: true,
|
|
873
|
-
minIntervalFloorSeconds,
|
|
874
|
-
maxIntervalCeilingSeconds,
|
|
875
|
+
minIntervalFloorSeconds: Seconds.of(minIntervalFloor),
|
|
876
|
+
maxIntervalCeilingSeconds: Seconds.of(maxIntervalCeiling),
|
|
875
877
|
isFabricFiltered,
|
|
876
878
|
});
|
|
877
879
|
const { subscribeResponse, report } = await messenger.readAggregateSubscribeResponse();
|
|
878
880
|
return {
|
|
879
881
|
subscribeResponse,
|
|
880
882
|
report,
|
|
881
|
-
|
|
883
|
+
maximumPeerResponseTime: this.maximumPeerResponseTime(),
|
|
882
884
|
};
|
|
883
885
|
}, executeQueued);
|
|
884
886
|
|
|
@@ -906,8 +908,8 @@ export class InteractionClient {
|
|
|
906
908
|
await this.#registerSubscription(
|
|
907
909
|
{
|
|
908
910
|
id: subscriptionId,
|
|
909
|
-
|
|
910
|
-
|
|
911
|
+
maximumPeerResponseTime,
|
|
912
|
+
maxInterval: Seconds(maxInterval),
|
|
911
913
|
onData: subscriptionListener,
|
|
912
914
|
onTimeout: updateTimeoutHandler,
|
|
913
915
|
},
|
|
@@ -1027,11 +1029,11 @@ export class InteractionClient {
|
|
|
1027
1029
|
const {
|
|
1028
1030
|
report,
|
|
1029
1031
|
subscribeResponse: { subscriptionId, maxInterval },
|
|
1030
|
-
|
|
1032
|
+
maximumPeerResponseTime,
|
|
1031
1033
|
} = await this.withMessenger<{
|
|
1032
1034
|
subscribeResponse: TypeFromSchema<typeof TlvSubscribeResponse>;
|
|
1033
1035
|
report: DataReport;
|
|
1034
|
-
|
|
1036
|
+
maximumPeerResponseTime: Duration;
|
|
1035
1037
|
}>(async messenger => {
|
|
1036
1038
|
await messenger.sendSubscribeRequest({
|
|
1037
1039
|
interactionModelRevision: Specification.INTERACTION_MODEL_REVISION,
|
|
@@ -1051,7 +1053,7 @@ export class InteractionClient {
|
|
|
1051
1053
|
return {
|
|
1052
1054
|
subscribeResponse,
|
|
1053
1055
|
report,
|
|
1054
|
-
|
|
1056
|
+
maximumPeerResponseTime: this.maximumPeerResponseTime(),
|
|
1055
1057
|
};
|
|
1056
1058
|
}, executeQueued);
|
|
1057
1059
|
|
|
@@ -1125,8 +1127,8 @@ export class InteractionClient {
|
|
|
1125
1127
|
await this.#registerSubscription(
|
|
1126
1128
|
{
|
|
1127
1129
|
id: subscriptionId,
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
+
maximumPeerResponseTime,
|
|
1131
|
+
maxInterval: Seconds(maxInterval),
|
|
1130
1132
|
|
|
1131
1133
|
onData: dataReport => subscriptionListener(DecodedDataReport(dataReport)),
|
|
1132
1134
|
|
|
@@ -1155,13 +1157,13 @@ export class InteractionClient {
|
|
|
1155
1157
|
asTimedRequest?: boolean;
|
|
1156
1158
|
|
|
1157
1159
|
/** Use this timeout and send the request as Timed Request. If this is specified the above parameter is implied. */
|
|
1158
|
-
|
|
1160
|
+
timedRequestTimeout?: Duration;
|
|
1159
1161
|
|
|
1160
1162
|
/**
|
|
1161
1163
|
* Expected processing time on the device side for this command.
|
|
1162
1164
|
* useExtendedFailSafeMessageResponseTimeout is ignored if this value is set.
|
|
1163
1165
|
*/
|
|
1164
|
-
|
|
1166
|
+
expectedProcessingTime?: Duration;
|
|
1165
1167
|
|
|
1166
1168
|
/** Use an extended Message Response Timeout as defined for FailSafe cases which is 30s. */
|
|
1167
1169
|
useExtendedFailSafeMessageResponseTimeout?: boolean;
|
|
@@ -1179,14 +1181,14 @@ export class InteractionClient {
|
|
|
1179
1181
|
clusterId,
|
|
1180
1182
|
command: { requestId, requestSchema, responseId, responseSchema, optional, timed },
|
|
1181
1183
|
asTimedRequest,
|
|
1182
|
-
timedRequestTimeoutMs =
|
|
1183
|
-
|
|
1184
|
+
timedRequestTimeout: timedRequestTimeoutMs = DEFAULT_TIMED_REQUEST_TIMEOUT,
|
|
1185
|
+
expectedProcessingTime,
|
|
1184
1186
|
useExtendedFailSafeMessageResponseTimeout = false,
|
|
1185
1187
|
skipValidation,
|
|
1186
1188
|
} = options;
|
|
1187
1189
|
let { request } = options;
|
|
1188
1190
|
const timedRequest =
|
|
1189
|
-
(timed && !skipValidation) || asTimedRequest === true || options.
|
|
1191
|
+
(timed && !skipValidation) || asTimedRequest === true || options.timedRequestTimeout !== undefined;
|
|
1190
1192
|
|
|
1191
1193
|
if (this.isGroupAddress) {
|
|
1192
1194
|
if (endpointId !== undefined) {
|
|
@@ -1234,9 +1236,9 @@ export class InteractionClient {
|
|
|
1234
1236
|
suppressResponse: false,
|
|
1235
1237
|
interactionModelRevision: Specification.INTERACTION_MODEL_REVISION,
|
|
1236
1238
|
},
|
|
1237
|
-
|
|
1239
|
+
expectedProcessingTime ??
|
|
1238
1240
|
(useExtendedFailSafeMessageResponseTimeout
|
|
1239
|
-
?
|
|
1241
|
+
? DEFAULT_MINIMUM_RESPONSE_TIMEOUT_WITH_FAILSAFE
|
|
1240
1242
|
: undefined),
|
|
1241
1243
|
);
|
|
1242
1244
|
if (response === undefined) {
|
|
@@ -1301,7 +1303,7 @@ export class InteractionClient {
|
|
|
1301
1303
|
request: RequestType<C>;
|
|
1302
1304
|
command: C;
|
|
1303
1305
|
asTimedRequest?: boolean;
|
|
1304
|
-
|
|
1306
|
+
timedRequestTimeout?: Duration;
|
|
1305
1307
|
executeQueued?: boolean;
|
|
1306
1308
|
}): Promise<void> {
|
|
1307
1309
|
const { executeQueued } = options;
|
|
@@ -1312,9 +1314,9 @@ export class InteractionClient {
|
|
|
1312
1314
|
request,
|
|
1313
1315
|
command: { requestId, requestSchema, timed },
|
|
1314
1316
|
asTimedRequest,
|
|
1315
|
-
|
|
1317
|
+
timedRequestTimeout = DEFAULT_TIMED_REQUEST_TIMEOUT,
|
|
1316
1318
|
} = options;
|
|
1317
|
-
const timedRequest = timed || asTimedRequest === true || options.
|
|
1319
|
+
const timedRequest = timed || asTimedRequest === true || options.timedRequestTimeout !== undefined;
|
|
1318
1320
|
|
|
1319
1321
|
if (this.isGroupAddress) {
|
|
1320
1322
|
if (timed) {
|
|
@@ -1336,7 +1338,7 @@ export class InteractionClient {
|
|
|
1336
1338
|
|
|
1337
1339
|
await this.withMessenger<void>(async messenger => {
|
|
1338
1340
|
if (timedRequest) {
|
|
1339
|
-
await messenger.sendTimedRequest(
|
|
1341
|
+
await messenger.sendTimedRequest(timedRequestTimeout);
|
|
1340
1342
|
}
|
|
1341
1343
|
|
|
1342
1344
|
const response = await messenger.sendInvokeCommand({
|
|
@@ -8,9 +8,11 @@ import { ReadResult } from "#action/response/ReadResult.js";
|
|
|
8
8
|
import {
|
|
9
9
|
Bytes,
|
|
10
10
|
Diagnostic,
|
|
11
|
+
Duration,
|
|
11
12
|
InternalError,
|
|
12
13
|
Logger,
|
|
13
14
|
MatterFlowError,
|
|
15
|
+
Millis,
|
|
14
16
|
NoResponseTimeoutError,
|
|
15
17
|
UnexpectedDataError,
|
|
16
18
|
} from "#general";
|
|
@@ -120,7 +122,7 @@ class InteractionMessenger {
|
|
|
120
122
|
|
|
121
123
|
async waitForSuccess(
|
|
122
124
|
expectedMessageInfo: string,
|
|
123
|
-
options?: {
|
|
125
|
+
options?: { expectedProcessingTime?: Duration; timeout?: Duration },
|
|
124
126
|
) {
|
|
125
127
|
// If the status is not Success, this would throw an Error.
|
|
126
128
|
await this.nextMessage(MessageType.StatusResponse, options, `Success-${expectedMessageInfo}`);
|
|
@@ -129,8 +131,8 @@ class InteractionMessenger {
|
|
|
129
131
|
async nextMessage(
|
|
130
132
|
expectedMessageType: number,
|
|
131
133
|
options?: {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
expectedProcessingTime?: Duration;
|
|
135
|
+
timeout?: Duration;
|
|
134
136
|
},
|
|
135
137
|
expectedMessageInfo?: string,
|
|
136
138
|
) {
|
|
@@ -140,8 +142,8 @@ class InteractionMessenger {
|
|
|
140
142
|
async anyNextMessage(
|
|
141
143
|
expectedMessageInfo: string,
|
|
142
144
|
options?: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
expectedProcessingTime?: Duration;
|
|
146
|
+
timeout?: Duration;
|
|
145
147
|
},
|
|
146
148
|
) {
|
|
147
149
|
return this.#nextMessage(undefined, options, expectedMessageInfo);
|
|
@@ -150,13 +152,13 @@ class InteractionMessenger {
|
|
|
150
152
|
async #nextMessage(
|
|
151
153
|
expectedMessageType?: number,
|
|
152
154
|
options?: {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
expectedProcessingTime?: Duration;
|
|
156
|
+
timeout?: Duration;
|
|
155
157
|
},
|
|
156
158
|
expectedMessageInfo?: string,
|
|
157
159
|
) {
|
|
158
|
-
const {
|
|
159
|
-
const message = await this.exchange.nextMessage({
|
|
160
|
+
const { expectedProcessingTime, timeout } = options ?? {};
|
|
161
|
+
const message = await this.exchange.nextMessage({ expectedProcessingTime, timeout });
|
|
160
162
|
const messageType = message.payloadHeader.messageType;
|
|
161
163
|
if (expectedMessageType !== undefined && expectedMessageInfo === undefined) {
|
|
162
164
|
expectedMessageInfo = MessageType[expectedMessageType];
|
|
@@ -697,7 +699,7 @@ export class InteractionServerMessenger extends InteractionMessenger {
|
|
|
697
699
|
logContext,
|
|
698
700
|
});
|
|
699
701
|
// We wait for a Success Message - when we don't request an Ack only wait 500ms
|
|
700
|
-
await this.waitForSuccess("DataReport", {
|
|
702
|
+
await this.waitForSuccess("DataReport", { timeout: waitForAck ? undefined : Millis(500) });
|
|
701
703
|
}
|
|
702
704
|
}
|
|
703
705
|
|
|
@@ -778,8 +780,8 @@ export class InteractionServerMessenger extends InteractionMessenger {
|
|
|
778
780
|
}
|
|
779
781
|
|
|
780
782
|
export class IncomingInteractionClientMessenger extends InteractionMessenger {
|
|
781
|
-
async waitFor(expectedMessageInfo: string, messageType: number,
|
|
782
|
-
const message = await this.anyNextMessage(expectedMessageInfo, {
|
|
783
|
+
async waitFor(expectedMessageInfo: string, messageType: number, timeout?: Duration) {
|
|
784
|
+
const message = await this.anyNextMessage(expectedMessageInfo, { timeout });
|
|
783
785
|
const {
|
|
784
786
|
payloadHeader: { messageType: receivedMessageType },
|
|
785
787
|
} = message;
|
|
@@ -1031,13 +1033,13 @@ export class InteractionClientMessenger extends IncomingInteractionClientMesseng
|
|
|
1031
1033
|
};
|
|
1032
1034
|
}
|
|
1033
1035
|
|
|
1034
|
-
async sendInvokeCommand(invokeRequest: InvokeRequest,
|
|
1036
|
+
async sendInvokeCommand(invokeRequest: InvokeRequest, expectedProcessingTime?: Duration) {
|
|
1035
1037
|
if (invokeRequest.suppressResponse) {
|
|
1036
1038
|
await this.requestWithSuppressedResponse(
|
|
1037
1039
|
MessageType.InvokeRequest,
|
|
1038
1040
|
TlvInvokeRequest,
|
|
1039
1041
|
invokeRequest,
|
|
1040
|
-
|
|
1042
|
+
expectedProcessingTime,
|
|
1041
1043
|
);
|
|
1042
1044
|
} else {
|
|
1043
1045
|
return await this.request(
|
|
@@ -1046,7 +1048,7 @@ export class InteractionClientMessenger extends IncomingInteractionClientMesseng
|
|
|
1046
1048
|
MessageType.InvokeResponse,
|
|
1047
1049
|
TlvInvokeResponse,
|
|
1048
1050
|
invokeRequest,
|
|
1049
|
-
|
|
1051
|
+
expectedProcessingTime,
|
|
1050
1052
|
);
|
|
1051
1053
|
}
|
|
1052
1054
|
}
|
|
@@ -1065,9 +1067,9 @@ export class InteractionClientMessenger extends IncomingInteractionClientMesseng
|
|
|
1065
1067
|
}
|
|
1066
1068
|
}
|
|
1067
1069
|
|
|
1068
|
-
sendTimedRequest(
|
|
1070
|
+
sendTimedRequest(timeout: Duration) {
|
|
1069
1071
|
return this.request(MessageType.TimedRequest, TlvTimedRequest, MessageType.StatusResponse, TlvStatusResponse, {
|
|
1070
|
-
timeout
|
|
1072
|
+
timeout,
|
|
1071
1073
|
interactionModelRevision: Specification.INTERACTION_MODEL_REVISION,
|
|
1072
1074
|
});
|
|
1073
1075
|
}
|
|
@@ -1076,11 +1078,11 @@ export class InteractionClientMessenger extends IncomingInteractionClientMesseng
|
|
|
1076
1078
|
requestMessageType: number,
|
|
1077
1079
|
requestSchema: TlvSchema<RequestT>,
|
|
1078
1080
|
request: RequestT,
|
|
1079
|
-
|
|
1081
|
+
expectedProcessingTime?: Duration,
|
|
1080
1082
|
): Promise<void> {
|
|
1081
1083
|
await this.send(requestMessageType, requestSchema.encode(request), {
|
|
1082
1084
|
expectAckOnly: true,
|
|
1083
|
-
|
|
1085
|
+
expectedProcessingTime: expectedProcessingTime,
|
|
1084
1086
|
logContext: {
|
|
1085
1087
|
invokeFlags: Diagnostic.asFlags({
|
|
1086
1088
|
suppressResponse: true,
|
|
@@ -1095,15 +1097,15 @@ export class InteractionClientMessenger extends IncomingInteractionClientMesseng
|
|
|
1095
1097
|
responseMessageType: number,
|
|
1096
1098
|
responseSchema: TlvSchema<ResponseT>,
|
|
1097
1099
|
request: RequestT,
|
|
1098
|
-
|
|
1100
|
+
expectedProcessingTime?: Duration,
|
|
1099
1101
|
): Promise<ResponseT> {
|
|
1100
1102
|
await this.send(requestMessageType, requestSchema.encode(request), {
|
|
1101
1103
|
expectAckOnly: false,
|
|
1102
|
-
|
|
1104
|
+
expectedProcessingTime,
|
|
1103
1105
|
});
|
|
1104
1106
|
const responseMessage = await this.nextMessage(
|
|
1105
1107
|
responseMessageType,
|
|
1106
|
-
{
|
|
1108
|
+
{ expectedProcessingTime },
|
|
1107
1109
|
MessageType[responseMessageType] ?? `Response-${Diagnostic.hex(responseMessageType)}`,
|
|
1108
1110
|
);
|
|
1109
1111
|
return responseSchema.decode(responseMessage.payload);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { AsyncObservable, InternalError, Logger } from "#general";
|
|
7
|
+
import { AsyncObservable, Duration, InternalError, Logger } from "#general";
|
|
8
8
|
import { NodeSession } from "#session/NodeSession.js";
|
|
9
9
|
import { TlvAttributePath, TlvDataVersionFilter, TlvEventFilter, TlvEventPath, TypeFromSchema } from "#types";
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ export abstract class Subscription {
|
|
|
30
30
|
#isCanceledByPeer?: boolean;
|
|
31
31
|
#criteria: SubscriptionCriteria;
|
|
32
32
|
#cancelled = AsyncObservable<[subscription: Subscription]>();
|
|
33
|
-
#
|
|
33
|
+
#maxInterval?: Duration;
|
|
34
34
|
|
|
35
35
|
constructor(session: NodeSession, id: SubscriptionId, criteria: SubscriptionCriteria) {
|
|
36
36
|
this.#session = session;
|
|
@@ -62,22 +62,18 @@ export abstract class Subscription {
|
|
|
62
62
|
return this.#cancelled;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
get
|
|
66
|
-
if (this.#
|
|
67
|
-
throw new InternalError("Subscription
|
|
65
|
+
get maxInterval() {
|
|
66
|
+
if (this.#maxInterval === undefined) {
|
|
67
|
+
throw new InternalError("Subscription maxInterval accessed before it was set");
|
|
68
68
|
}
|
|
69
|
-
return this.#
|
|
69
|
+
return this.#maxInterval;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
set
|
|
73
|
-
if (this.#
|
|
74
|
-
throw new InternalError("Subscription
|
|
72
|
+
set maxInterval(value: Duration) {
|
|
73
|
+
if (this.#maxInterval !== undefined) {
|
|
74
|
+
throw new InternalError("Subscription maxInterval set twice");
|
|
75
75
|
}
|
|
76
|
-
this.#
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
get maxInterval(): number {
|
|
80
|
-
return Math.ceil(this.maxIntervalMs / 1000);
|
|
76
|
+
this.#maxInterval = value;
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Environment, Environmental, Logger, MaybePromise, Time, Timer } from "#general";
|
|
7
|
+
import { Duration, Environment, Environmental, Logger, MaybePromise, Millis, Time, Timer } from "#general";
|
|
8
8
|
import { MessageExchange } from "#protocol/MessageExchange.js";
|
|
9
9
|
import { ProtocolHandler } from "#protocol/ProtocolHandler.js";
|
|
10
10
|
import { INTERACTION_PROTOCOL_ID } from "#types";
|
|
@@ -14,8 +14,8 @@ const logger = Logger.get("SubscriptionClient");
|
|
|
14
14
|
|
|
15
15
|
export interface RegisteredSubscription {
|
|
16
16
|
id: number;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
maximumPeerResponseTime: Duration;
|
|
18
|
+
maxInterval: Duration;
|
|
19
19
|
onData: (dataReport: DataReport) => MaybePromise<void>;
|
|
20
20
|
onTimeout?: () => void;
|
|
21
21
|
}
|
|
@@ -53,10 +53,10 @@ export class SubscriptionClient implements ProtocolHandler {
|
|
|
53
53
|
this.#timeouts.delete(id);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
const
|
|
56
|
+
const maxInterval = Millis(subscription.maxInterval + subscription.maximumPeerResponseTime);
|
|
57
57
|
|
|
58
|
-
timer = Time.getTimer("Subscription timeout",
|
|
59
|
-
logger.info(`Subscription ${id} timed out after ${
|
|
58
|
+
timer = Time.getTimer("Subscription timeout", maxInterval, () => {
|
|
59
|
+
logger.info(`Subscription ${id} timed out after ${Duration.format(maxInterval)}`);
|
|
60
60
|
this.delete(id);
|
|
61
61
|
onTimeout();
|
|
62
62
|
}).start();
|