Package com.tccc.kos.core.service.device


package com.tccc.kos.core.service.device
Device management and identification services for KOS.

This package provides a comprehensive device abstraction layer that allows external systems to discover and interact with device information without needing to query multiple endpoints. The device model serves as a unified view of the system's identity, configuration, and capabilities.

The core components include:

  • Device - Abstract base class for device representations
  • DeviceService - Service for device management and change notifications
  • AssemblyDevice - Default device implementation exposing assemblies

Device Model:
The Device class serves as a view object that aggregates key device data including name, serial number, node ID, and assemblies. This pattern facilitates external system integration by providing a single endpoint for device discovery rather than requiring multiple API calls to gather device information.

Serial Number Management:
The package includes a comprehensive serial number management system through the serialnum sub-package. Serial number providers implement a ready pattern, allowing for scenarios where serial number access may be delayed (e.g., waiting for hardware initialization or critical data availability).

Usage Pattern:
System applications typically subclass Device and register it with the DeviceService using setDevice(). The device is then accessible via REST API and can be filtered using DeviceView JSON views for external system consumption.

See Also: