摘要 |
An auto-discovery algorithm attempts a scattered-read of register addresses of a device in a utility monitoring system whose identity is unknown to a computer system. If the scattered read is successful, and data from the device includes a device ID code that is matched against a lookup table of devices. If unsuccessful, the algorithm attempts a block-read, and if unsuccessful, iteratively checks each register against the lookup table to determine whether a match exists until either one is found or the device reports an illegal data address exception, whereupon the algorithm stops attempting to read from subsequent addresses. The algorithm analyzes the response from the communications driver of the computer system to determine whether the response is valid, and if not, what type of exception is reported. If a timeout occurs, the algorithm flags the device for a later retry scan, and moves on to attempt to discover the next device. |