Closed ivanbaj closed 7 months ago
How can I assign a handler to provider loaded from MIB via registerProviders method?
I need to load a MIB and set values dynamically as the request (GET) are coming in.
I am able to do this for a provider defined in JS but I can't figure put how to do this win automatically created providers form the loaded MIB file.
Hi @ivanbaj - you can assign a handler directly on the provider e.g.
agent.getProvider("yourRegisteredProviderName").handler = (mibRequest) => { console.log("Extra hello"); mibRequest.done(); }
How can I assign a handler to provider loaded from MIB via registerProviders method?
I need to load a MIB and set values dynamically as the request (GET) are coming in.
I am able to do this for a provider defined in JS but I can't figure put how to do this win automatically created providers form the loaded MIB file.