Class DeviceConfig

java.lang.Object
com.trdp.config.DeviceConfig

public class DeviceConfig extends Object
Root configuration object representing a TRDP <device> element.

Contains all configuration for a single TRDP device: bus interfaces (with their telegrams and communication parameters), data set definitions, global communication parameters, service definitions, and mapped device overrides.

Instances are created by TrdpConfig.load(java.nio.file.Path) or TrdpConfig.load(java.io.InputStream). All list getters return non-null, unmodifiable lists.

See Also:
  • Method Details

    • getHostName

      public String getHostName()
      Returns the device host name (required, max 15 characters).
    • getType

      public String getType()
      Returns the device type (e.g. "VCU-C"), or null if not specified.
    • getLeaderName

      public String getLeaderName()
      Returns the leader device name for redundancy, or null if not specified.
    • getDeviceConfiguration

      public DeviceConfiguration getDeviceConfiguration()
      Returns the device-level configuration (memory settings), or null if not specified.
    • getDebug

      public DebugConfig getDebug()
      Returns the debug configuration, or null if not specified.
    • getBusInterfaces

      public List<BusInterface> getBusInterfaces()
      Returns the bus interfaces defined for this device.
    • getMappedDevices

      public List<MappedDevice> getMappedDevices()
      Returns the mapped device overrides.
    • getDataSets

      public List<DataSetDefinition> getDataSets()
      Returns the data set definitions.
    • getComParameters

      public List<ComParameter> getComParameters()
      Returns the global communication parameter sets.
    • getServices

      public List<ServiceDefinition> getServices()
      Returns the service-oriented interface definitions.
    • getDataSetById

      public Optional<DataSetDefinition> getDataSetById(int id)
      Looks up a data set definition by its ID (first-found-wins).
      Parameters:
      id - the data set ID (must be >= 1000 per XSD).
      Returns:
      the matching data set, or empty if not found.
    • getComParameterById

      public Optional<ComParameter> getComParameterById(long id)
      Looks up a communication parameter set by its ID (first-found-wins).
      Parameters:
      id - the com-parameter ID.
      Returns:
      the matching parameter set, or empty if not found.
    • toString

      public String toString()
      Overrides:
      toString in class Object