Access to general platform-dependent features.

The following variables are defined by this class:

  • log.level - Log level to use Logger.LEVEL
  • log.format - Log format to use Logger.FORMAT
  • log.stack.limit - Stack trace limit, see https://nodejs.org/api/errors.html#errorstacktracelimit
  • mdns.networkInterface - Network interface to use for MDNS broadcasts and scanning, default are all available interfaces
  • mdns.ipv4 - Also announce/scan on IPv4 interfaces
  • network.interface - Map of interface names to types, expected to be defined as object with name as key and of {type: string|number} objects with types: 1=Wifi, 2=Ethernet, 3=Cellular, 4=Thread (strings or numbers can be used). Can also be provided via env or cli like MATTER_NETWORK_INTERFACE_ETH0_TYPE=Ethernet

TODO - could remove global singletons by moving here

Constructors

Accessors

Methods

  • Remove an environmental service.

    Parameters

    • type: (new (...args: any[]) => any)

      the class of the service to remove

        • new (...args): any
        • Parameters

          • Rest...args: any[]

          Returns any

    • Optionalinstance: any

      optional instance expected, if existing instance does not match it is not deleted

    Returns void

  • Access an environmental service that may not exist.

    Type Parameters

    • T extends object

    Parameters

    • type: (new (...args: any[]) => T)
        • new (...args): T
        • Parameters

          • Rest...args: any[]

          Returns T

    Returns undefined | T

  • Install a preinitialized version of an environmental service.

    Type Parameters

    • T extends {}

    Parameters

    • type: (new (...args: any[]) => T)
        • new (...args): T
        • Parameters

          • Rest...args: any[]

          Returns T

    • instance: T

    Returns void