Discovery Generation
March 26, 2026 · View on GitHub
UDMI / Docs / Specs / Discovery / Generation
Discovery Generation
The generation field is a core mechanism in UDMI discovery and enumeration processes. It is used to trigger, track, and correlate discovery scans and self-enumeration requests. The generation value is an RFC 3339 formatted date-time string.
Depending on the context (e.g., self-enumeration vs. family scanning, sporadic vs. periodic), the generation field behaves differently. This document summarizes these different use cases and expectations.
1. Passive Scanning
A passive scan monitors the network without actively sending out probes. It operates continuously or based on network activity.
- Trigger: A passive scan does not use a
generationmarker to trigger. It is configured simply by defining passive scan parameters (e.g.,passive_holdoff_sec). - State: The
phasewill report aspassiveoractive. There is typically nogenerationfield reported in the state for a purely passive scan, as there is no specific scan cycle to track. - Events: Generated discovery events do not include a
generationvalue.
2. Active Scanning (Sporadic / One-Time)
A sporadic scan is an explicit, one-off request for a device to actively scan a network family for other devices.
- Trigger: Initiated by setting the
generationfield in the target family configuration (config.discovery.families.<family>.generation) to a new timestamp (which must be after the device's last start time and different from the previous scan generation). - State:
- When the scan is scheduled or waiting to start, the family
stateblock reports aphaseofpendingand itsgenerationwill match theconfig'sgeneration. - When the scan begins, the
phasechanges toactive. - Once the scan completes, the
phasechanges tostopped(or the active indicator is removed). Ideally, the state retains thegenerationfield to indicate the timestamp of the last scan performed.
- When the scan is scheduled or waiting to start, the family
- Events: Each discovery event produced as a result of this scan will include the matching
generationvalue, securely correlating the discovered devices with the specific scan trigger. - Completion: After the scan concludes, the
generationentry in theconfigblock can either be removed (with no effect on the device) or updated to a new timestamp to trigger another sporadic scan.
3. Active Scanning (Periodic / Recurring)
A periodic scan is an active scan that repeats automatically at defined intervals, eliminating the need to update the configuration for every scan.
- Trigger: Configured by providing both a
generationtimestamp and ascan_interval_secparameter in the family configuration. Thegenerationtimestamp serves as the base time (or initial start time) for the interval schedule. - Execution Interval: Scans occur at scheduled intervals strictly determined by the base
generationtimestamp plus increments of thescan_interval_sec(i.e.,Ts = Tc + N * Ti). This ensures there is no clock drift over time. - State & Events:
- Unlike the sporadic scan where the state
generationdirectly matches the configgeneration, in a periodic scan, the device updates thegenerationvalue for each loop to uniquely identify the current execution. - This loop-specific
generationfield will be greater than or equal to the basegenerationspecified in theconfig. - This unique
generationtimestamp is reported in thestateblock during the scan and attached to all discovery events produced during that loop.
- Unlike the sporadic scan where the state
- Termination: The recurring loop terminates when either the
generationfield or thescan_interval_secparameter is removed from theconfig.
4. Self Enumeration
Self-enumeration is an explicit request for a single, already-registered device to describe its own capabilities (points, features, etc.), rather than scanning the network for other devices.
- Trigger: Initiated by setting the
generationparameter in the rootdiscoveryblock (config.discovery.generation), as opposed to a specific family block. - State: The
state.discoveryblock reflects thegenerationcurrently being processed. - Events: Generated discovery events contain the corresponding
generationvalue. Because these events originate from the device itself rather than a proxy scan, they do not include afamilyblock; the identity is determined from the message envelope.
Summary Matrix
| Mode | Location in config | Trigger / Role | state Behavior | events Behavior |
|---|---|---|---|---|
| Passive Scan | N/A | None required. | No generation. | No generation. |
| Active Sporadic | families.<family>.generation | Explicit timestamp triggers a one-off scan. | Matches config.generation. Retained after stop. | Matches config.generation. |
| Active Periodic | families.<family>.generation + scan_interval_sec | Base timestamp for calculating the schedule. | Updates every loop to a new, unique timestamp ≥ config.generation. | Matches the current loop's updated generation. |
| Self Enumeration | discovery.generation | Explicit timestamp triggers self-reporting. | Matches config.generation. | Matches config.generation. |