Search documentation of snmpkit

# SnmpKit.SnmpMgr.EngineV2 (snmpkit v1.3.17)

Pure response correlator for SNMP operations.

This engine focuses solely on correlating SNMP responses back to their originating processes. It does not handle sending - that is done directly by Tasks using the shared socket from SocketManager.

# Summary

## Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

get_stats(engine)

Gets engine statistics and metrics.

pending_count(engine)

Gets the number of pending requests.

register_request(engine, request_id, caller_pid, timeout_ms \\ 5000)

Registers a request for response correlation.

start_link(opts \\ [])

Starts the Engine response correlator.

stop(engine)

Gracefully shuts down the engine.

unregister_request(engine, request_id)

Unregisters a request (used when caller times out locally).

# Functions

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# get_stats(engine)

Gets engine statistics and metrics.

# pending_count(engine)

Gets the number of pending requests.

# register_request(engine, request_id, caller_pid, timeout_ms \\ 5000)

Registers a request for response correlation.

## Parameters

- `engine` - Engine PID or name
- `request_id` - Unique request identifier
- `caller_pid` - Process to send response to
- `timeout_ms` - Timeout in milliseconds (optional)

## Examples

    SnmpKit.SnmpMgr.EngineV2.register_request(engine, 12345, self(), 5000)

# start_link(opts \\ [])

Starts the Engine response correlator.

## Options

- `:name` - Process name (default: MODULE)

# stop(engine)

Gracefully shuts down the engine.

# unregister_request(engine, request_id)

Unregisters a request (used when caller times out locally).

## Parameters

- `engine` - Engine PID or name
- `request_id` - Request identifier to unregister