Files
iot-dc3/dc3-api
pnoker e38c7d432a feat(driver,manager): broadcast driver metadata events and let drivers refresh on demand
Extends the existing point/device metadata refresh flow to drivers:

- MetadataEvent gains an optional targetServices set so manager-side
  publishers can scope a metadata event to specific driver services
  instead of broadcasting to every listener.
- New DRIVER value on MetadataTypeEnum, plus a new GetById RPC on
  driver_driver.proto so drivers can re-fetch their registered metadata
  without going through the full registration handshake again.
- DriverClient.refreshMetadata(driverId) calls the new RPC and reapplies
  the returned device ids and attribute maps via a shared applyMetadata
  helper.
- MetadataReceiver now handles MetadataTypeEnum.DRIVER:
    DELETE  -> clear DriverMetadata, DeviceMetadata, and PointMetadata
              caches and flip status to OFFLINE
    ADD/UPDATE -> driverClient.refreshMetadata(id)
- Manager-side MetadataEventListener forwards events to RabbitMQ keyed by
  the target services in the event, falling back to broadcast when none
  are specified.
- DeviceServiceImpl, DriverAttributeServiceImpl, PointAttributeServiceImpl,
  and PointServiceImpl populate targetServices using the relevant driver
  service names so changes only wake the drivers that own the affected
  entity.
- DriverDriverServer.getById exposes the new RPC; new DriverDriverServerTest
  covers it.
- MetadataReceiverTest gains driverUpdate / driverDelete cases;
  MetadataEventListenerTest covers the per-service routing.
2026-05-21 15:02:09 +08:00
..