src/controller/CHIPDevice.h
void Init(ControllerDeviceInitParams params, uint16_t listenPort, FabricIndex fabric)
    {
        mTransportMgr    = params.transportMgr;
        mSessionManager  = params.sessionMgr;
        mExchangeMgr     = params.exchangeMgr;
        mInetLayer       = params.inetLayer;
        mListenPort      = listenPort;
        mFabricIndex     = fabric;
        mStorageDelegate = params.storageDelegate;
        mIDAllocator     = params.idAllocator;
        mFabricsTable    = params.fabricsTable;
        mpIMDelegate     = params.imDelegate;
#if CONFIG_NETWORK_LAYER_BLE
        mBleLayer = params.bleLayer;
#endif
    }
/**
     * @brief
     *   Initialize the device object with secure session manager and inet layer object
     *   references. This variant of function is typically used when the device object
     *   is created from a serialized device information. The other parameters (address, port,
     *   interface etc) are part of the serialized device, so those are not required to be
     *   initialized.
     *
     *   Note: The lifetime of session manager and inet layer objects must be longer than
     *   that of this device object. If these objects are freed, while the device object is
     *   still using them, it can lead to unknown behavior and crashes.
     *
     * @param[in] params       Wrapper object for transport manager etc.
     * @param[in] listenPort   Port on which controller is listening (typically CHIP_PORT)
     * @param[in] fabric        Local administrator that's initializing this device object
     */
@brief
Initialize the device object with secure session manager and inet layer object
references. This variant of function is typically used when the device object
is created from a serialized device information. The other parameters (address, port,
interface etc) are part of the serialized device, so those are not required to be
initialized.

The lifetime of session manager and inet layer objects must be longer than
that of this device object. If these objects are freed, while the device object is
still using them, it can lead to unknown behavior and crashes.

@param[in] params       Wrapper object for transport manager etc.
@param[in] listenPort   Port on which controller is listening (typically CHIP_PORT)
@param[in] fabric        Local administrator that's initializing this device object
@brief Initialize the device object with secure session manager and inet layer object references . This variant of function is typically used when the device object is created from a serialized device information . The other parameters ( address port interface etc ) are part of the serialized device so those are not required to be initialized . The lifetime of session manager and inet layer objects must be longer than that of this device object . If these objects are freed while the device object is still using them it can lead to unknown behavior and crashes . @param [ in ] params Wrapper object for transport manager etc . @param [ in ] listenPort Port on which controller is listening ( typically CHIP_PORT ) @param [ in ] fabric Local administrator that ' s initializing this device object
void Init(ControllerDeviceInitParams params, uint16_t listenPort, FabricIndex fabric)
    {
        mTransportMgr    = params.transportMgr;
        mSessionManager  = params.sessionMgr;
        mExchangeMgr     = params.exchangeMgr;
        mInetLayer       = params.inetLayer;
        mListenPort      = listenPort;
        mFabricIndex     = fabric;
        mStorageDelegate = params.storageDelegate;
        mIDAllocator     = params.idAllocator;
        mFabricsTable    = params.fabricsTable;
        mpIMDelegate     = params.imDelegate;
#if CONFIG_NETWORK_LAYER_BLE
        mBleLayer = params.bleLayer;
#endif
    }
void Init ( ControllerDeviceInitParams params , uint16_t listenPort , FabricIndex fabric ) { mTransportMgr = params . transportMgr ; mSessionManager = params . sessionMgr ; mExchangeMgr = params . exchangeMgr ; mInetLayer = params . inetLayer ; mListenPort = listenPort ; mFabricIndex = fabric ; mStorageDelegate = params . storageDelegate ; mIDAllocator = params . idAllocator ; mFabricsTable = params . fabricsTable ; mpIMDelegate = params . imDelegate ; #if CONFIG_NETWORK_LAYER_BLE mBleLayer = params . bleLayer ; #endif }
@brief
   Initialize the device object with secure session manager and inet layer object
   references.
@brief Initialize the device object with secure session manager and inet layer object references .